Skip to content

Commit ded6a97

Browse files
committed
update docstrings
Signed-off-by: Samhita Alla <[email protected]>
1 parent 22abe30 commit ded6a97

File tree

4 files changed

+29
-34
lines changed

4 files changed

+29
-34
lines changed

plugins/wandb/src/flyteplugins/wandb/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ def download_wandb_run_dir(
237237
238238
Downloaded contents:
239239
240-
- `summary.json` - final summary metrics (always exported)
241-
- `metrics_history.json` - step-by-step metrics (if `include_history=True`)
242-
- Plus any files synced by wandb (`requirements.txt`, `wandb_metadata.json`, etc.)
240+
- summary.json - final summary metrics (always exported)
241+
- metrics_history.json - step-by-step metrics (if include_history=True)
242+
- Plus any files synced by wandb (requirements.txt, wandb_metadata.json, etc.)
243243
244244
Args:
245245
run_id: The wandb run ID to download. If `None`, uses the current run's ID

plugins/wandb/src/flyteplugins/wandb/_context.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,19 @@ def wandb_config(
204204
2. As a context manager - overrides config for specific tasks
205205
206206
Args:
207-
project: wandb project name
208-
entity: wandb entity (team or username)
209-
id: unique run id (auto-generated if not provided)
210-
name: human-readable run name
211-
tags: list of tags for organizing runs
212-
config: dictionary of hyperparameters
207+
project: W&B project name
208+
entity: W&B entity (team or username)
209+
id: Unique run id (auto-generated if not provided)
210+
name: Human-readable run name
211+
tags: List of tags for organizing runs
212+
config: Dictionary of hyperparameters
213213
mode: "online", "offline" or "disabled"
214-
group: group name for related runs
215-
run_mode: flyte-specific run mode - "auto", "new" or "shared".
214+
group: Group name for related runs
215+
run_mode: Flyte-specific run mode - "auto", "new" or "shared".
216216
Controls whether tasks create new W&B runs or share existing ones
217-
download_logs: if `True`, downloads wandb run files after task completes
217+
download_logs: If `True`, downloads wandb run files after task completes
218218
and shows them as a trace output in the Flyte UI
219-
**kwargs: additional `wandb.init()` parameters
219+
**kwargs: Additional `wandb.init()` parameters
220220
"""
221221
return _WandBConfig(
222222
project=project,
@@ -363,15 +363,10 @@ def wandb_sweep_config(
363363
project: W&B project for the sweep
364364
entity: W&B entity for the sweep
365365
prior_runs: List of prior run IDs to include in the sweep analysis
366-
name: Sweep name (auto-generated as `"{run_name}-{action_name}"` if not provided)
367-
download_logs: if `True`, downloads all sweep run files after task completes
366+
name: Sweep name (auto-generated as `{run_name}-{action_name}` if not provided)
367+
download_logs: If `True`, downloads all sweep run files after task completes
368368
and shows them as a trace output in the Flyte UI
369-
370-
**kwargs: additional sweep config parameters like:
371-
- early_terminate: Early termination config
372-
- description: Sweep description
373-
- command: CLI command to run
374-
- controller: Sweep controller config
369+
**kwargs: additional sweep config parameters like `early_terminate`, `description`, `command`, etc.
375370
376371
See: https://docs.wandb.ai/models/sweeps/sweep-config-keys
377372
"""

plugins/wandb/src/flyteplugins/wandb/_decorator.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,15 @@ def wandb_init(
196196
197197
Args:
198198
run_mode: Controls whether to create a new W&B run or share an existing one:
199-
200-
- "auto" (default): Creates new run if no parent run exists, otherwise shares parent's run
201-
- "new": Always creates a new wandb run with a unique ID
202-
- "shared": Always shares the parent's run ID (useful for child tasks)
203-
download_logs: if `True`, downloads wandb run files after task completes
199+
- "auto" (default): Creates new run if no parent run exists, otherwise shares parent's run
200+
- "new": Always creates a new wandb run with a unique ID
201+
- "shared": Always shares the parent's run ID (useful for child tasks)
202+
download_logs: If `True`, downloads wandb run files after task completes
204203
and shows them as a trace output in the Flyte UI. If None, uses
205204
the value from wandb_config() context if set.
206205
project: W&B project name (overrides context config if provided)
207206
entity: W&B entity/team name (overrides context config if provided)
208-
**kwargs: additional `wandb.init()` parameters (tags, config, mode, etc.)
207+
**kwargs: Additional `wandb.init()` parameters (tags, config, mode, etc.)
209208
210209
Decorator Order:
211210
For tasks, @wandb_init must be the outermost decorator:

plugins/wandb/src/flyteplugins/wandb/_link.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ class Wandb(Link):
1212
Generates a Weights & Biases run link.
1313
1414
Args:
15-
host: base W&B host URL
15+
host: Base W&B host URL
1616
project: W&B project name (overrides context config if provided)
1717
entity: W&B entity/team name (overrides context config if provided)
18-
run_mode: controls whether to create a new W&B run or share an existing one:
18+
run_mode: Controls whether to create a new W&B run or share an existing one:
1919
2020
- "auto" (default): Creates new run if no parent run exists, otherwise shares parent's run
2121
- "new": Always creates a new wandb run with a unique ID
2222
- "shared": Always shares the parent's run ID (useful for child tasks)
23-
id: optional W&B run ID (overrides context config if provided)
24-
name: link name in the Flyte UI
23+
24+
id: Optional W&B run ID (overrides context config if provided)
25+
name: Link name in the Flyte UI
2526
"""
2627

2728
host: str = "https://wandb.ai"
@@ -96,11 +97,11 @@ class WandbSweep(Link):
9697
Generates a Weights & Biases Sweep link.
9798
9899
Args:
99-
host: base W&B host URL
100+
host: Base W&B host URL
100101
project: W&B project name (overrides context config if provided)
101102
entity: W&B entity/team name (overrides context config if provided)
102-
id: optional W&B sweep ID (overrides context config if provided)
103-
name: link name in the Flyte UI
103+
id: Optional W&B sweep ID (overrides context config if provided)
104+
name: Link name in the Flyte UI
104105
"""
105106

106107
host: str = "https://wandb.ai"

0 commit comments

Comments
 (0)