Skip to content

Commit 765e290

Browse files
committed
fixes to solutions
1 parent 0c6fbd7 commit 765e290

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

s3_reproducibility/config_files.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,12 @@ look online for your answers before looking at the solution. Remember: its not a
218218
and the python code to load the configuration file and instantiate the optimizer could look like this
219219

220220
```python
221+
import os
222+
221223
import hydra
222224
import torch.optim as optim
223225
224-
@hydra.main(config_name="adam.yaml")
226+
@hydra.main(config_name="adam.yaml", config_path=f"{os.getcwd()}/configs")
225227
def main(cfg):
226228
model = ... # define the model we want to optimize
227229
# the first argument of any optimize is the parameters to optimize

s6_the_cloud/using_the_cloud.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ models, and then use other services for different parts of our pipeline.
881881
machineType: n1-highmem-2
882882
replicaCount: 1
883883
containerSpec:
884-
imageUri: gcr.io/<project-id>/<docker-img>
884+
imageUri: <region>-docker.pkg.dev/<project-id>/<registry-name>/<image-name>:<image-tag>
885885
env:
886886
- name: WANDB_API_KEY
887887
value: <your-wandb-api-key>
@@ -913,7 +913,7 @@ to inject secrets into our code without having to store them in the code itself.
913913
imageUri: gcr.io/<project-id>/<docker-img>
914914
env:
915915
- name: WANDB_API_KEY
916-
value: $WANDB_API_KEY
916+
value: $WANDB_API_KEY
917917
```
918918
919919
we do not want to store the `WANDB_API_KEY` in the config file, rather we would like to store it in the Secret
@@ -971,6 +971,8 @@ to inject secrets into our code without having to store them in the code itself.
971971
'--config',
972972
'${_VERTEX_TRAIN_CONFIG}',
973973
]
974+
substitutions:
975+
_VERTEX_TRAIN_CONFIG: 'config.yaml'
974976
availableSecrets:
975977
secretManager:
976978
- versionName: projects/$PROJECT_ID/secrets/WANDB_API_KEY/versions/latest

0 commit comments

Comments
 (0)