The examples on this page omit
auth. To authenticate with your W&B API key, install cwsandbox[wandb] and pass auth=AuthStrategy.WANDB to Sandbox.run(), Sandbox(), or Sandbox.session(). See Get started.Basic usage
To make values available to processes running inside the sandbox, pass anenvironment_variables dictionary to Sandbox.run:
Session-level defaults
When you need the same variables in several sandboxes, define them once on a session instead of repeating them per sandbox. Individual sandboxes can override session defaults or add their own variables:Remote functions
Remote functions inherit environment variables from the session and can declare their own through the@session.function decorator. The SDK merges function-level variables with session defaults at call time: