> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sweeps

> [card] [Best practices to organize hyperparameter searches](https://docs.coreweave.com/support/models/articles/best-practices-to-organize-hyperparamete)
>
> When you run many hyperparameter searches, tag your runs so you can group and find related experiments later. Tag runs i ...

> [card] [Can I resume a run inside a sweep?](https://docs.coreweave.com/support/models/articles/can-i-resume-a-run-inside-a-sweep)
>
> Run resumption is not supported inside a W\&B sweep. If you pass a run\_id or use wandb.init(resume=...) while a sweep age ...

> [card] [How can I change the directory my sweep logs to locally?](https://docs.coreweave.com/support/models/articles/how-can-i-change-the-directory-my-sweep-)
>
> Set the logging directory for run data by configuring the WANDB\_DIR environment variable. For example:

> [card] [How can I resume a sweep using Python code?](https://docs.coreweave.com/support/models/articles/how-can-i-resume-a-sweep-using-python-co)
>
> To resume a sweep, pass the sweep\_id to the wandb.agent() function.

> [card] [How do I best log models from runs in a sweep?](https://docs.coreweave.com/support/models/articles/how-do-i-best-log-models-from-runs-in-a-)
>
> To log models in a sweep, create a model artifact for the sweep. Each version represents a different run from the sweep. ...

> [card] [How do I enable code logging with Sweeps?](https://docs.coreweave.com/support/models/articles/how-do-i-enable-code-logging-with-sweeps)
>
> To enable code logging for sweeps, add wandb.log\_code() after initializing the W\&B Run. This step is necessary even when ...

> [card] [How do I fix `CommError, Run does not exist` during a sweep?](https://docs.coreweave.com/support/models/articles/commerror-run-does-not-exist-during-swee)
>
> If you see both CommError, Run does not exist and ERROR Error uploading during a sweep, the most likely cause is that yo ...

> [card] [How do I fix `Cuda out of memory` during a sweep?](https://docs.coreweave.com/support/models/articles/cuda-out-of-memory-during-a-sweep)
>
> If you see Cuda out of memory during a sweep, refactor your code to use process-based execution. Rewrite your code as a  ...

> [card] [How do I fix an `anaconda 400 error` during a sweep?](https://docs.coreweave.com/support/models/articles/anaconda-400-error-during-a-sweep)
>
> An anaconda 400 error during a sweep often means you didn't log the metric you're optimizing. You might see: The sweep c ...

> [card] [How do I flag boolean variables as hyperparameters?](https://docs.coreweave.com/support/models/articles/how-do-i-flag-boolean-variables-as-hyperparameters)
>
> To pass hyperparameters as boolean flags, use the macro in the command section of your sweep configuration. The macro au ...

> [card] [How do I rerun a grid search?](https://docs.coreweave.com/support/models/articles/how-do-i-rerun-a-grid-search)
>
> If a grid search completes but some W\&B Runs crashed, delete those runs to rerun them. Then select the Resume button on  ...

> [card] [How do I set default hyperparameter values in a sweep?](https://docs.coreweave.com/support/models/articles/how-do-i-set-default-hyperparameter-values-in-a-sweep)
>
> You don't need to provide values for every hyperparameter in a W\&B Sweep. You can set defaults and let the sweep overrid ...

> [card] [How do I use W\&B Sweeps with SageMaker?](https://docs.coreweave.com/support/models/articles/how-do-i-use-sweeps-with-sagemaker)
>
> You can use W\&B Sweeps with Amazon SageMaker to run hyperparameter searches on SageMaker training jobs. To authenticate  ...

> [card] [How do I use W\&B Sweeps with cloud infrastructure?](https://docs.coreweave.com/support/models/articles/how-do-i-use-sweeps-with-cloud-infrastructure)
>
> To run a W\&B Sweep on cloud infrastructure such as AWS Batch or ECS, publish the sweep\_id so that any W\&B Sweep agent ca ...

> [card] [How do I use custom CLI commands with sweeps?](https://docs.coreweave.com/support/models/articles/how-do-i-use-custom-cli-commands-with-sw)
>
> You can use W\&B Sweeps with custom CLI commands if training configuration passes command-line arguments. This lets you r ...

> [card] [How do I use the parallel coordinates chart in Weights & Biases?](https://docs.coreweave.com/support/models/articles/how-do-i-use-the-parallel-coordinates-chart-in-wandb)
>
> The parallel coordinates chart shows how hyperparameters relate to metrics across many runs. Each line is one run; each  ...

> [card] [How should I run sweeps on SLURM?](https://docs.coreweave.com/support/models/articles/how-should-i-run-sweeps-on-slurm)
>
> For W\&B sweeps on the SLURM scheduling system, run wandb agent --count 1 SWEEP\_ID in each scheduled job. The agent execu ...

> [card] [Is there a way to add extra values to a sweep, or do I need to start a new one?](https://docs.coreweave.com/support/models/articles/is-there-a-way-to-add-extra-values-to-a-)
>
> Once a W\&B Sweep starts, you can't change the sweep configuration. However, you can navigate to any table view, select r ...

> [card] [Optimizing multiple metrics](https://docs.coreweave.com/support/models/articles/optimizing-multiple-metrics)
>
> W\&B Sweeps optimize a single objective metric. To optimize multiple metrics in a single run, combine them into a weighte ...

> [card] [What happens if I edit my Python files while a sweep is running?](https://docs.coreweave.com/support/models/articles/what-happens-if-i-edit-my-python-files-w)
>
> The behavior depends on which file you edit. While a sweep is running: If the train.py script that the sweep uses change ...

> [card] [What is the `Est. Runs` column?](https://docs.coreweave.com/support/models/articles/what-is-the-est-runs-column)
>
> Weights & Biases provides an estimated number of runs generated when creating a W\&B Sweep with a discrete search space.  ...

> [card] [Why is my sweep agent not picking up new runs?](https://docs.coreweave.com/support/models/articles/why-is-my-sweep-agent-not-picking-up-new-runs)
>
> If your sweep agent starts but does not receive new run configurations, or receives one run and then idles, there are se ...
