diff --git a/models/ref/cli.mdx b/models/ref/cli.mdx index 7a75d9941c..d53fddc5e9 100644 --- a/models/ref/cli.mdx +++ b/models/ref/cli.mdx @@ -1,5 +1,5 @@ --- -title: "CLI Reference SDK 0.23.1" +title: "CLI Reference SDK 0.24.0" description: "Use the W&B Command Line Interface (CLI) to log in, run jobs, execute sweeps, and more using shell commands" --- diff --git a/models/ref/cli/wandb-agent.mdx b/models/ref/cli/wandb-agent.mdx index bf23599c3b..0fa439b33b 100644 --- a/models/ref/cli/wandb-agent.mdx +++ b/models/ref/cli/wandb-agent.mdx @@ -35,3 +35,4 @@ wandb agent SWEEP_ID [OPTIONS] | `--project`, `-p` | The name of the project where W&B runs created from the sweep are sent to. If the project is not specified, the run is sent to a project labeled 'Uncategorized'. | | `--entity`, `-e` | The username or team name where you want to send W&B runs created by the sweep to. Ensure that the entity you specify already exists. If you don't specify an entity, the run will be sent to your default entity, which is usually your username. | | `--count` | The max number of runs for this agent. | +| `--forward-signals`, `-f` | Forward signals delivered to the agent (e.g. SIGINT/SIGTERM) to its child runs so they can shut down cleanly. (default: False) | diff --git a/models/ref/cli/wandb-beta/wandb-beta-sync.mdx b/models/ref/cli/wandb-beta/wandb-beta-sync.mdx index 74125eb3fa..4e21be8745 100644 --- a/models/ref/cli/wandb-beta/wandb-beta-sync.mdx +++ b/models/ref/cli/wandb-beta/wandb-beta-sync.mdx @@ -48,7 +48,11 @@ wandb beta sync [PATHS] [OPTIONS] | Option | Description | | :--- | :--- | +| `--live` | Sync a run while it's still being logged. This may hang if the process generating the run crashes uncleanly. (default: False) | +| `-e`, `--entity` | An entity override to use for all runs being synced. (default: ) | +| `-p`, `--project` | A project override to use for all runs being synced. (default: ) | +| `--id` | A run ID override to use for all runs being synced. If setting this and syncing multiple files (with the same entity and project), the files will be synced in order of start time. This is intended to work with syncing multiple resumed fragments of the same run. (default: ) | | `--skip-synced` | Skip runs that have already been synced with this command. (default: True) | | `--dry-run` | Print what would happen without uploading anything. (default: False) | | `-v`, `--verbose` | Print more information. (default: False) | -| `-n` | Max number of runs to sync at a time. (default: 5) | +| `-n` | Max number of runs to sync at a time. When syncing multiple files that are part of the same run, the files are synced sequentially in order of start time regardless of this setting. This happens for resumed runs or when using the --id parameter. (default: 5) | diff --git a/release-notes/sdk-releases.mdx b/release-notes/sdk-releases.mdx index 828b97396c..cb32ce323f 100644 --- a/release-notes/sdk-releases.mdx +++ b/release-notes/sdk-releases.mdx @@ -6,6 +6,27 @@ rss: true This page includes release notes for the W&B Python SDK (`wandb` package). For W&B Server, see [W&B Server release notes](/release-notes/server-releases). + +## Notable Changes + +This version removes the legacy, deprecated `wandb.beta.workflows` module, including its `log_model()`/`use_model()`/`link_model()` functions. This is formally a breaking change. + +## Added +- `wandb agent` and `wandb.agent()` now accept a `forward_signals` flag (CLI: `--forward-signals/-f`) to relay SIGINT/SIGTERM and other catchable signals from the agent to its sweep child runs, enabling cleaner shutdowns when you interrupt an agent process. +- `wandb beta sync` now supports a `--live` option for syncing a run while it's being logged. + +## Removed +- Removed the deprecated `wandb.beta.workflows` module, including its `log_model()`, `use_model()`, and `link_model()` functions, and whose modern successors are the `Run.log_artifact`, `Run.use_artifact`, and `Run.link_artifact` methods, respectively. + +## Fixed +- Fixed `Run.__exit__` type annotations to accept `None` values, which are passed when no exception is raised. +- Fixed `Invalid Client ID digest` error when creating artifacts after calling `random.seed()`. Client IDs could collide when random state was seeded deterministically.. +- Fixed CLI error when listing empty artifacts. +- Fixed regression for calling `api.run()` on a Sweeps run. +- Fixed the "View run at" message printed at the end of a run which sometimes did not include a URL. +- Runs queried from wandb.Api() now display a string representation in VSCode notebooks instead of a broken HTML window. + + ## Added diff --git a/scripts/cli-docs-generator.py b/scripts/cli-docs-generator.py index aa2a420ada..588aefb5fd 100755 --- a/scripts/cli-docs-generator.py +++ b/scripts/cli-docs-generator.py @@ -71,6 +71,23 @@ def clean_text(text: str) -> str: text = text.replace('|', '\\|') return text +def clean_text_for_table(text: str) -> str: + """Clean text for use in markdown table cells. + + Collapses all whitespace (including newlines) into single spaces, + suitable for inline table cell content. + """ + if not text: + return "" + + # Strip and collapse all whitespace (spaces, tabs, newlines) into single spaces + text = re.sub(r'\s+', ' ', text.strip()) + + # Escape pipe characters for markdown tables + text = text.replace('|', '\\|') + + return text + def get_brief_description(text: str) -> str: """Get just the first sentence or line for table display.""" if not text: @@ -269,7 +286,7 @@ def generate_markdown(cmd_info: Dict[str, Any], file_dir_path: str = "", project lines.append("| :--- | :--- | :--- |") for arg in cmd_info['arguments']: required = "Yes" if arg['required'] else "No" - desc = arg['help'] or "No description available" + desc = clean_text_for_table(arg['help']) if arg['help'] else "No description available" lines.append(f"| `{arg['name'].upper()}` | {desc} | {required} |") lines.append("") @@ -280,7 +297,7 @@ def generate_markdown(cmd_info: Dict[str, Any], file_dir_path: str = "", project lines.append("| Option | Description |") lines.append("| :--- | :--- |") for opt in cmd_info['options']: - desc = opt['help'] or "No description available" + desc = clean_text_for_table(opt['help']) if opt['help'] else "No description available" if opt['default_str']: desc += opt['default_str'] lines.append(f"| {opt['opts_str']} | {desc} |") @@ -405,7 +422,7 @@ def generate_index_markdown(cmd_info: Dict[str, Any], subcommands_only: bool = F lines.append("| Option | Description |") lines.append("| :--- | :--- |") for opt in cmd_info['options']: - desc = opt['help'] or "No description available" + desc = clean_text_for_table(opt['help']) if opt['help'] else "No description available" if opt['default_str']: desc += opt['default_str'] lines.append(f"| {opt['opts_str']} | {desc} |")