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

# Sweeps

<Card title="Best practices to organize hyperparameter searches" href="/support/models/articles/best-practices-to-organize-hyperparamete" arrow="true" horizontal>
  Set unique tags with wandb.init(tags='your\_tag'). This allows efficient filtering of project runs by selecting the corre ...
</Card>

<Card title="Can I rerun a grid search?" href="/support/models/articles/can-i-rerun-a-grid-search" arrow="true" horizontal>
  If a grid search completes but some W\&B Runs need re-execution due to crashes, delete the specific W\&B Runs to re-run. T ...
</Card>

<Card title="Can I use Sweeps and SageMaker?" href="/support/models/articles/can-i-use-sweeps-and-sagemaker" arrow="true" horizontal>
  To authenticate W\&B, complete the following steps: create a requirements.txt file if using a built-in Amazon SageMaker e ...
</Card>

<Card title="Can we flag boolean variables as hyperparameters?" href="/support/models/articles/can-we-flag-boolean-variables-as-hyperpa" arrow="true" horizontal>
  Use the macro in the command section of the configuration to pass hyperparameters as boolean flags. This macro automatic ...
</Card>

<Card title="Can you use W&B Sweeps with cloud infrastructures such as AWS Batch, ECS, etc.?" href="/support/models/articles/can-you-use-wb-sweeps-with-cloud-infrast" arrow="true" horizontal>
  To publish the sweep\_id so that any W\&B Sweep agent can access it, implement a method for these agents to read and execu ...
</Card>

<Card title="Do I need to provide values for all hyperparameters as part of the W&B Sweep. Can I set defaults?" href="/support/models/articles/do-i-need-to-provide-values-for-all-hype" arrow="true" horizontal>
  Access hyperparameter names and values from the sweep configuration using (run.config()), which acts like a dictionary.  ...
</Card>

<Card title="How can I change the directory my sweep logs to locally?" href="/support/models/articles/how-can-i-change-the-directory-my-sweep-" arrow="true" horizontal>
  Set the logging directory for W\&B run data by configuring the environment variable WANDB\_DIR. For example:
</Card>

<Card title="How can I resume a sweep using Python code?" href="/support/models/articles/how-can-i-resume-a-sweep-using-python-co" arrow="true" horizontal>
  To resume a sweep, pass the sweep\_id to the wandb.agent() function.
</Card>

<Card title="How do I best log models from runs in a sweep?" href="/support/models/articles/how-do-i-best-log-models-from-runs-in-a-" arrow="true" horizontal>
  One effective approach for logging models in a sweep involves creating a model artifact for the sweep. Each version repr ...
</Card>

<Card title="How do I enable code logging with Sweeps?" href="/support/models/articles/how-do-i-enable-code-logging-with-sweeps" arrow="true" horizontal>
  To enable code logging for sweeps, add wandb.log\_code() after initializing the W\&B Run. This action is necessary even wh ...
</Card>

<Card title="How do I fix `CommError, Run does not exist` during a sweep?" href="/support/models/articles/commerror-run-does-not-exist-during-swee" arrow="true" horizontal>
  If you see both CommError, Run does not exist and ERROR Error uploading during a sweep, the most likely cause is that yo ...
</Card>

<Card title="How do I fix `Cuda out of memory` during a sweep?" href="/support/models/articles/cuda-out-of-memory-during-a-sweep" arrow="true" horizontal>
  If you see Cuda out of memory during a sweep, refactor your code to use process-based execution. Rewrite your code as a  ...
</Card>

<Card title="How do I fix an `anaconda 400 error` during a sweep?" href="/support/models/articles/anaconda-400-error-during-a-sweep" arrow="true" horizontal>
  The following error usually occurs when you do not log the metric that you are optimizing: To fix this, make sure you ar ...
</Card>

<Card title="How do I use custom CLI commands with sweeps?" href="/support/models/articles/how-do-i-use-custom-cli-commands-with-sw" arrow="true" horizontal>
  You can use W\&B Sweeps with custom CLI commands if training configuration passes command-line arguments. In the example  ...
</Card>

<Card title="How should I run sweeps on SLURM?" href="/support/models/articles/how-should-i-run-sweeps-on-slurm" arrow="true" horizontal>
  When using sweeps with the SLURM scheduling system, run wandb agent --count 1 SWEEP\_ID in each scheduled job. This comma ...
</Card>

<Card title="Is there a way to add extra values to a sweep, or do I need to start a new one?" href="/support/models/articles/is-there-a-way-to-add-extra-values-to-a-" arrow="true" horizontal>
  Once a W\&B Sweep starts, you cannot change the Sweep configuration. However, you can navigate to any table view, select  ...
</Card>

<Card title="Optimizing multiple metrics" href="/support/models/articles/optimizing-multiple-metrics" arrow="true" horizontal>
  To optimize multiple metrics in a single run, use a weighted sum of the individual metrics. Log the new combined metric  ...
</Card>

<Card title="What happens if I edit my Python files while a sweep is running?" href="/support/models/articles/what-happens-if-i-edit-my-python-files-w" arrow="true" horizontal>
  While a sweep is running: If the train.py script which the sweep uses changes, the sweep continues to use the original t ...
</Card>

<Card title="What is the `Est. Runs` column?" href="/support/models/articles/what-is-the-est-runs-column" arrow="true" horizontal>
  W\&B provides an estimated number of Runs generated when creating a W\&B Sweep with a discrete search space. This total re ...
</Card>
