question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CLI]: seep agent fails when running sweeps with 'None' values for sweep parameters

See original GitHub issue

Describe the bug

It looks like recent versions of wandb, definitely wandb==0.12.19, fail when one of the sweep parameters is None.

Note that None values are very common, i.e. for hyperparameters of many models in scikit-learn. For example, this sweep uses None for the value of the max_features hyperparameter in (sklearn.ensemble.GradientBoostingClassifier)[https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html]

The affected sweeps all work fine with wandb==0.12.15. The workaround for me was to downgrade to that, for now.

Sorry, can’t provide a sweep to reproduce. Create any grid search sweep where one of the hyperparameter values takes a value of ‘None’.


2022-07-29 19:24:15,782 - wandb.wandb_agent - ERROR - Exception while processing command: {'run_id': '<redacted>', 'program': 'scripts/train.py', 'type': 'run', 'args': <...> 'max_features': {'value': None},  

......

Traceback (most recent call last):
  File "/home/<redacted>/python3.6/site-packages/wandb/wandb_agent.py", line 299, in _process_command
    result = self._command_run(command)
  File "/home/<redacted>/python3.6/site-packages/wandb/wandb_agent.py", line 409, in _command_run
    sweep_vars: Dict[str, Any] = Agent._create_command_args(command)
  File "/home/<redacted>/python3.6/site-packages/wandb/wandb_agent.py", line 342, in _create_command_args
    raise ValueError('No "value" found for command["args"]["%s"]' % param)
ValueError: No "value" found for command["args"]["max_features"]

Additional Files

No response

Environment

WandB version: 0.12.19

OS: linux

Python version: 3.6.8

Versions of relevant libraries:

Additional Context

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ramit-wandbcommented, Sep 13, 2022

Thanks! That’s exactly what I needed. I’m going to ticket this out internally right now to be resolved by our engineering team and I will keep you updated on the status of this issue.

Thanks, Ramit

0reactions
FabianWesthcommented, Dec 13, 2022

Bump. Please solve this asap as this makes the sweeps quite impractical

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ - Documentation - Weights & Biases - Wandb
Finally, start new W&B Sweep agents with the new Sweep ID. Parameter combinations with completed W&B Runs are not re-executed.
Read more >
wandb.wandb_agent - ERROR - Detected 5 failed runs in a ...
I believe the issue is in your wandb.agent() function call. It's supposed to get a function (name only) as an argument, so the...
Read more >
Sweep from Jupyter Notebook · GitBook
When running an agent from python, the agent runs a specified function instead of using the program key from the sweep configuration file....
Read more >
Unwanted Parameters for ModelUPDATE - PTC Support
To Cut Pipe at Multiple Locations with Automatic Joint Fitting Insertion · To Cut Parallel Pipes at Locations Identical to the Reference Pipe...
Read more >
Parameter Sweep with Vector/Matrix/Array as Parameter
Set up a sweep over parameter B running from 1 to N in integers. ... how can the sweeping result affiliate with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found