wandb.init()
or wandb.login()
. Unlike methods that belong to specific classes, these functions provide direct access to W&B’s core functionality without needing to instantiate objects first.
Available Functions
Function | Description |
---|---|
init() | Start a new run to track and log to W&B. This is typically the first function you’ll call in your ML training pipeline. |
login() | Set up W&B login credentials to authenticate your machine with the platform. |
setup() | Prepare W&B for use in the current process and its children. Useful for multi-process applications. |
teardown() | Clean up W&B resources and shut down the backend process. |
sweep() | Initialize a hyperparameter sweep to search for optimal model configurations. |
agent() | Create a sweep agent to run hyperparameter optimization experiments. |
controller() | Manage and control sweep agents and their execution. |
restore() | Restore a previous run or experiment state for resuming work. |
finish() | Finish a run and clean up resources. |
Example
The most common workflow begins with authenticating with W&B, initializing a run, and logging values (such as accuracy and loss) from your training loop. The first steps are to importwandb
and use the global functions login()
and init()
: