Skip to content

Commit a293fcb

Browse files
authored
Merge pull request #295 from gridai/dev
Hot Update
2 parents 1db422f + e7a913a commit a293fcb

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

docs/features/runs/17_yaml-configs/2_yaml-api.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following YML file contains a commented version of every YML key. You need t
1010
Use either [cluster context](../../../platform/2_Custom%20Cloud%20Credentials/5_grid-cluster-context.md) or make sure to place your cluster ID in the `cluster` field, replacing the **XXXXXX** placeholder.
1111
:::
1212

13-
```text
13+
<!-- ```text
1414
# Main compute configuration.
1515
compute:
1616
@@ -44,13 +44,69 @@ hyper_params:
4444
# your params here
4545
--foo: 1
4646
-bar: 2
47-
```
47+
``` -->
4848

49-
:::note
50-
Flags in grid YML files have a 1-to-1 mapping with `grid run` flags
51-
:::
5249

53-
In addition to the parameters above, you can also run arbitrary commands on different stages of you training operation.
50+
Config can be used to specify arguments that will be used to run experiments.
51+
Apart from parametrization config allows to define custom `actions` executed in given moments of the experitment lifecycle, and pass environment variables.
52+
You don't have to define more parameters than you actually want to override, missing ones from config we have the default CLI values.
53+
To check the defaults please refer to the CLI docs [here](../../cli.md).
54+
55+
56+
```text
57+
# Main compute configuration. Defines parameters for `grid run` command.
58+
compute:
59+
60+
# For BYOC users, we can specify directly which cluster to run experiments on.
61+
provider:
62+
cluster: prod-2 # [str] --cluster
63+
64+
# Train section defines the training environment each experiement eg. instance type, datastore access, custom actions.
65+
train:
66+
framework: lightning # [enum] --framework
67+
environment:
68+
MY_ENVIRONMENT_VARIABLE: "example" # Pass in environment variables
69+
dependency_file_info:
70+
path: null # [str] --dependency_file
71+
instance: m5a.large # [enum] --instance_type
72+
use_spot: False # [str] --use_spot
73+
74+
# We should ideally remove those are we hope to depricate gpus/cpus
75+
# cpus: int 1 # --cpus - cannot be more than available in the `instance`
76+
# gpus: int 0 # --gpus - cannot be more than available in the `instance`
77+
storage_gb: 100 # [int] --memory [should be greater than 100Gb]
78+
localdir: False # [bool] --localdir
79+
dockerfile: null # [str] --dockerfile
80+
auto_resume: bool # [bool] --auto_resume (flag)
81+
datastore_name: null # [str] --datastore_name
82+
datastore_version: null # [int] --datastore_version
83+
datastore_mount_dir: null # [str] by default mounts to /datastores/{datastore_name} --datastore_mount_dir
84+
actions: # Pass list of commands to be executed at given moment.
85+
on_build: null # List[str]
86+
on_build_start: null
87+
on_build_end: null
88+
on_experiment_end: null
89+
on_experiment_start: null
90+
scratch:
91+
size_gb: 100 # [int] --scratch_size default 100 int
92+
mount_path: /tmp/scratch # [str] --scratch_mount_path default
93+
94+
# This section defines the hyperparameters settings.
95+
# We currently have 3 strategies: grid_search, random_search and none.
96+
# strategy_options are only for the random_search strategy.
97+
hyper_params:
98+
settings:
99+
strategy: grid_search # [enum] One of `['grid_search', 'random_search', 'none']`
100+
strategy_options: # For 'random_search' we must at least define num_trials
101+
num_trials: 1 # [int] we must specify the num_trials (via CLI or config) if we use random_search strategy (--num_trials)
102+
seed: 0 # [int] --seed
103+
104+
# Additional script parameters appended as "{key} {value}"
105+
params: [dict[str, str]] # Dict of key: value entries appended to as script parameters
106+
--foo: 1 # [str: str]
107+
-bar: something
108+
```
109+
54110

55111
## Creating Runs With a Config File
56112

0 commit comments

Comments
 (0)