Sweep command

Hi,
I am trying to create a sweep YAML config but the hp are not passed as cli args to my script.

The yaml:


program: src.stance_detection.bert.simpletransformers.sweep_tests
method: grid
metric:
  goal: minimize
  name: loss
parameters:
  n:
    values: [1, 2]
command:
  - ${env}
  - ${interpreter}
  - "-m"
  - ${program}
  - ${args_no_boolean_flags}

The script:

import wandb
from pprint import pprint
import sys

if __name__ == "__main__":
    pprint(sys.argv)
    wandb.init()
    wandb.log({"loss": 0})

I was expecting sys.argv to contain --n=[value]. What am I doing wrong?

It seems to have been a bug in wandb. Updating to 0.12.21 fixed it.

Hi @maxreimer , glad you were able to successfully resolve this. Please do reach back out again with any additional questions.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.