Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-style-guide-models-integrations-20260527-015516.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

W&B integrates with Amazon SageMaker to automatically read hyperparameters, group distributed runs, and resume runs from checkpoints.

Authentication

W&B looks for a file named secrets.env relative to the training script and loads its contents into the environment when you call wandb.init(). To generate a secrets.env file, call wandb.sagemaker_auth(path="source_dir") in the script you use to launch your experiments. Add this file to your .gitignore.

Existing estimators

If you’re using one of SageMaker’s preconfigured estimators, add a requirements.txt file to your source directory that includes wandb:
wandb
If you’re using an estimator that runs Python 2, install psutil from this wheel before you install wandb:
https://wheels.galaxyproject.org/packages/psutil-5.4.8-cp27-cp27mu-manylinux1_x86_64.whl
wandb
For a complete example, see the SageMaker example on GitHub. For more about running sweeps with SageMaker, see the W&B blog post on SageMaker sweeps. For a tutorial on deploying a sentiment analyzer with SageMaker and W&B, see Deploy Sentiment Analyzer Using SageMaker and W&B.
The W&B sweep agent works correctly inside a SageMaker job only when the SageMaker integration is turned off. To turn off the SageMaker integration, update your call to wandb.init():
wandb.init(..., settings=wandb.Settings(sagemaker_disable=True))