# Sweep command

**URL:** <https://community.wandb.ai/t/sweep-command/2749>\
**Category:** W&B Help\
**Tags:** sweeps\
**Created:** [July 14, 2022, 10:06am UTC](https://community.wandb.ai/t/sweep-command/2749 "2022-07-14T10:06:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxreimer](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@maxreimer](https://community.wandb.ai/u/maxreimer)\
**Post date:** [July 14, 2022, 10:06am UTC](https://community.wandb.ai/t/sweep-command/2749/1 "2022-07-14T10:06:58Z")

</div>

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

The yaml:

```nohighlight

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:

```python
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?

---

<div class="post-metadata">

**Author:** ![maxreimer](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@maxreimer](https://community.wandb.ai/u/maxreimer)\
**Post date:** [July 14, 2022, 2:41pm UTC](https://community.wandb.ai/t/sweep-command/2749/2 "2022-07-14T14:41:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mohammadbakir](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mohammadbakir](https://community.wandb.ai/u/mohammadbakir)\
**Post date:** [July 15, 2022, 7:01pm UTC](https://community.wandb.ai/t/sweep-command/2749/3 "2022-07-15T19:01:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [September 13, 2022, 7:02pm UTC](https://community.wandb.ai/t/sweep-command/2749/4 "2022-09-13T19:02:04Z")

</div>

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