Weights & Biases plugin for Flyte
Project description
Weights & Biases Plugin
-
Tasks decorated with
@wandb_initor@wandb_sweepautomatically get W&B links in the Flyte UI that point directly to the corresponding W&B runs or sweeps. Links retrieve project/entity from decorator parameters or context configuration (fromwith_runcontext). -
@wandb_initand@wandb_sweepmust be the outermost decorators (applied after@env.task). For example:@wandb_init @env.task def my_task(): ...
-
By default (
run_mode="auto"), child tasks automatically reuse their parent's W&B run if one exists, or create a new run if they're top-level tasks. You can override this withrun_mode="new"(always create new) orrun_mode="shared"(always reuse parent). -
@wandb_initshould be applied to tasks (not traces). Traces can access the parent task's W&B run viaget_wandb_run().@wandb_initcan also be applied to regular Python functions for use inwandb.agent()sweep callbacks. -
The wandb run can be accessed via
get_wandb_run(), which returns the run object orNoneif not within a@wandb_initdecorated task. -
When using
run_mode="shared"orrun_mode="auto"(with a parent run), child tasks reuse the parent's run ID. Configuration fromwandb_config()is merged with decorator parameters. -
wandb_configcan be used to pass configuration to tasks enclosed within the context manager and can also be provided viawith_runcontext. -
When the context manager exits, the configuration falls back to the parent task's config.
-
Arguments passed to
wandb_initdecorator are available only within the current task and traces and are not propagated to child tasks (usewandb_configfor child tasks). -
At most 20 sweep agents can be launched at a time: https://docs.wandb.ai/models/sweeps/existing-project#3-launch-agents.
-
@wandb_sweepcreates a W&B sweep and adds a sweep link to the decorated task. The sweep ID is available viaget_wandb_sweep_id(). For the parent task that creates the sweep, the link points to the project's sweeps list page. For child tasks, the link points to the specific sweep (they inherit thesweep_idfrom the parent's context). -
The objective function passed to
wandb.agent()should be a vanilla Python function decorated with@wandb_initto initialize the run. You can access the run withwandb.runsince the Flyte context won't be available during the objective function call. -
Set
download_logs=Trueinwandb_configor@wandb_initto download W&B run logs after task completion. The I/O of this download functionality is traced by Flyte's@flyte.trace. -
Set
download_logs=Trueinwandb_sweep_configor@wandb_sweepto download W&B sweep logs after task completion. The I/O of this download functionality is traced by Flyte's@flyte.trace.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flyteplugins_wandb-2.0.0b52-py3-none-any.whl.
File metadata
- Download URL: flyteplugins_wandb-2.0.0b52-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020e519519f0ef17ce486f04143e9ea879c7fdb0c630f35629ce70a57a689beb
|
|
| MD5 |
b83a769a101c6697c5ae2e270c3d8241
|
|
| BLAKE2b-256 |
d9f47096aeb435ca830087edc28a31566045964cf4adac6e459d3ac0df994281
|