Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-python-sdk-testing.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Description
A single run associated with an entity and project.Args:
- client: The W&B API client.
- entity: The entity associated with the run.
- project: The project associated with the run.
- run_id: The unique identifier for the run.
- attrs: The attributes of the run.
- include_sweeps: Whether to include sweeps in the run.
- lazy: Whether to lazily load run data or fetch full data immediately.
- service_api: Optional ServiceApi instance for making additional API calls.
Properties:
state
The state of the run. Can be one of: Finished, Failed, Crashed, or Running.entity
The entity associated with the run.username
This API is deprecated. Useentity instead.
storage_id
The unique storage identifier for the run.id
The unique identifier for the run.name
The name of the run.config
Get run config. Auto-loads full data if in lazy mode.summary
Get run summary metrics. Auto-loads full data if in lazy mode.system_metrics
Get run system metrics. Auto-loads full data if in lazy mode.summary_metrics
Get run summary metrics. Auto-loads full data if in lazy mode.rawconfig
Get raw run config including internal keys. Auto-loads full data if in lazy mode.sweep_name
Get sweep name. Always available since sweepName is in lightweight fragment.path
The path of the run. The path is a list containing the entity, project, and run_id.url
The URL of the run. The run URL is generated from the entity, project, and run_id. For SaaS users, it takes the form ofhttps://wandb.ai/entity/project/run_id.
metadata
Metadata about the run from wandb-metadata.json. Metadata includes the run’s description, tags, start time, memory usage and more.lastHistoryStep
Returns the last step logged in the run’s history.Methods:
beta_scan_history
Returns an iterable collection of all history records for a run. This function is still in development and may not work as expected. It uses wandb-core to read history from a run’s exported parquet history locally.create
Create a run for the given project. For most use cases, usewandb.init(). wandb.init() provides more robust
logic for creating and updating runs. wandb.apis.public.Run.create
is intended for specific scenarios such as creating runs in
a “pending” state for jobs that may be unschedulable
(for example, in a Kubernetes cluster with insufficient GPUs or high
contention). These pending runs can later be resumed and tracked by W&B.
Runs created with this method have limited functionality. Calling
update() on a run created this way may not work as expected.
delete
Delete the given run from the wandb backend.display
Display this object in jupyter.download_history_exports
Download any parquet history files for the run to the provided directory.file
Return the path of a file with a given name in the artifact.files
Returns aFiles object for all files in the run which match the given criteria.
You can specify a list of exact file names to match, or a pattern to match against.
If both are provided, the pattern will be ignored.
history
Return sampled history metrics for a run. This is simpler and faster if you are ok with the history records being sampled.load
Load run data using appropriate fragment based on lazy mode.load_full_data
Load full run data including heavy fields like config, systemMetrics, summaryMetrics. This method is useful when you initially used lazy=True for listing runs, but need access to the full data for specific runs.log_artifact
Declare an artifact as output of a run.logged_artifacts
Fetches all artifacts logged by this run. Retrieves all output artifacts that were logged during the run. Returns a paginated result that can be iterated over or collected into a single list.save
Persist changes to the run object to the W&B backend.scan_history
Returns an iterable collection of all history records for a run.update
Persist changes to the run object to the wandb backend.update_state
Update the state of a run. Allows transitioning runs from ‘failed’ or ‘crashed’ to ‘pending’.upload_file
Upload a local file to W&B, associating it with this run.use_artifact
Declare an artifact as an input to a run.used_artifacts
Fetches artifacts explicitly used by this run. Retrieves only the input artifacts that were explicitly declared as used during the run, typically viarun.use_artifact(). Returns a paginated
result that can be iterated over or collected into a single list.