Skip to content

Commit

Permalink
Merge branch 'main' into server_release_process_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ngrayluna committed Dec 27, 2023
2 parents 0fff325 + 417b3d2 commit b3617a5
Show file tree
Hide file tree
Showing 47 changed files with 116 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ swap:
what is: what's
when is: when's
where is: where's
will not: won't
will not: won't
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
CLI
Autogenerate
[Cc]heckpointing
CLI
Colab
[Cc]onfig
CTAButtons
[Dd]ataframe
[Dd]equeue
[Dd]equeues
Dockerfile
[Ee]nqueued
GPUs
[Hh]ostname
[Hh]yperparameters
[Hh]yperparameter
GPUs
Kaniko
Kubeflow
[Nn]amespace
Optuna
[Ww]alkthrough
[Pp]seudocode
[Ww]alkthrough
W&B Server
1 change: 1 addition & 0 deletions .github/styles/Vocab/Docs/reject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wandb
10 changes: 10 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: reviewdog
on: [pull_request]

jobs:
vale:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: errata-ai/vale-action@reviewdog
13 changes: 11 additions & 2 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Specifies where Vale should look for its external resources (e.g., styles)
StylesPath = styles
StylesPath = .github/styles

# Specifies the minimum alert severity that Vale will report.
MinAlertLevel = suggestion

# By default, `code` and `tt` are ignored.
IgnoredScopes = code, tt

# To do: Remove CTAButtons from accept.txt

# By default, `script`, `style`, `pre`, and `figure` are ignored.
SkippedScopes = script, style, pre, figure

# Folder in ./styles where we specify terms that we accept and reject.
Vocab=Docs

Packages = Google, Readability

## Format-specific settings
[*.md]
BasedOnStyles = Vale, Google, Readability
BasedOnStyles = Vale, Google

Google.Contractions = No
88 changes: 84 additions & 4 deletions docs/guides/sweeps/define-sweep-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,19 @@ Describe the hyperparameters to explore during the sweep. For each hyperparamete
<TabItem value="nested">

```yaml
optimizer:
parameters:
top_level_param:
min: 0
max: 5
nested_param:
parameters: # required key
learning_rate:
values: [0.01, 0.001]
momentum:
value: 0.9
double_nested_param:
parameters: # <--
x:
value: 0.9
y:
value: 0.8
```

</TabItem>
Expand Down Expand Up @@ -582,3 +589,76 @@ command:
```
</TabItem>
</Tabs>
### Nested Parameters
The sweep configuration format supports specifying nested parameters. To delineate a nested parameter, use an additional `parameters` key under the top level parameter name. Multi-level nesting is allowed. For a complete sweep configuration example:
```yaml
program: train.py
method: bayes
metric:
name: val_loss
goal: minimize
top_level_param:
min: 0
max: 5
nested_param:
parameters: # required key
learning_rate:
values: [0.01, 0.001]
double_nested_param:
parameters: # <--
x:
value: 0.9
y:
value: 0.8
```

The above configuration might result in the following run config (in `train.py`):

```json
{
"top_level_param": 0,
"nested_param": {
"learning_rate": 0.01,
"double_nested_param": {
"x": 0.9,
"y": 0.8
}
}
}
```

:::caution
Nested parameters overwrite keys specified in a run configuration.

For example, suppose you initialize a W&B run with the following configuration:

```python
run = wandb.init(config = {
"nested_param": {
"manual_key": 1
}
}
)
```

If you then create a sweep with the following sweep configuration:

```json
{
"top_level_param": 0,
"nested_param": {
"learning_rate": 0.01,
"double_nested_param": {
"x": 0.9,
"y": 0.8
}
}
}
```

The `nested_param.manual_key` that was passed when the W&B run was initialized will not be available. Instead, the `run.config` will look exactly like the JSON code snippet shown above.
:::

0 comments on commit b3617a5

Please sign in to comment.