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.Define and call a remote function
Decorate a function with@session.function() to call it inside the sandbox with .remote(). The call returns a reference you resolve with .result():
Run functions in parallel with .map()
Use .map() to dispatch many invocations at once and collect their results. Independent calls run concurrently instead of one at a time:
Next steps
You can now invoke Python functions inside a sandbox as if they were local calls, and fan out work in parallel with.map().
For serialization modes, .local() testing, and more, see the Remote functions guide.