class Run
A single run associated with an entity and project.
method Run.__init__
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.
tags
([str]): a list of tags associated with the runurl
(str): the url of this runid
(str): unique identifier for the run (defaults to eight characters)name
(str): the name of the runstate
(str): one of: running, finished, crashed, killed, preempting, preemptedconfig
(dict): a dict of hyperparameters associated with the runcreated_at
(str): ISO timestamp when the run was startedsystem_metrics
(dict): the latest system metrics recorded for the runsummary
(dict): A mutable dict-like property that holds the current summary. Calling update will persist any changes.project
(str): the project associated with the runentity
(str): the name of the entity associated with the runproject_internal_id
(int): the internal id of the projectuser
(str): the name of the user who created the runpath
(str): Unique identifier [entity]/[project]/[run_id]notes
(str): Notes about the runread_only
(boolean): Whether the run is editablehistory_keys
(str): Keys of the history metrics that have been logged withwandb.log({key: value})
metadata
(str): Metadata about the run from wandb-metadata.json
property Run.entity
The entity associated with the run.property Run.id
The unique identifier for the run.property Run.lastHistoryStep
Returns the last step logged in the run’s history.property Run.metadata
Metadata about the run from wandb-metadata.json. Metadata includes the run’s description, tags, start time, memory usage and more.property Run.name
The name of the run.property Run.path
The path of the run. The path is a list containing the entity, project, and run_id.property Run.state
The state of the run. Can be one of: Finished, Failed, Crashed, or Running.property Run.storage_id
The unique storage identifier for the run.property Run.summary
A mutable dict-like property that holds summary values associated with the run.property Run.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
.
property Run.username
This API is deprecated. Useentity
instead.
classmethod Run.create
method Run.delete
delete_artifacts
(bool, optional): Whether to delete the artifacts associated with the run.
method Run.file
name
(str): name of requested file.
File
matching the name argument.
method Run.files
Files
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.
Args:
names
(list): names of the requested files, if empty returns all filespattern
(str, optional): Pattern to match when returning files from W&B. This pattern uses mySQL’s LIKE syntax, so matching all files that end with .json would be “%.json”. If both names and pattern are provided, a ValueError will be raised.per_page
(int): number of results per page.
Files
object, which is an iterator over File
objects.
method Run.history
samples
: (int, optional) The number of samples to returnpandas
: (bool, optional) Return a pandas dataframekeys
: (list, optional) Only return metrics for specific keysx_axis
: (str, optional) Use this metric as the xAxis defaults to _stepstream
: (str, optional) “default” for metrics, “system” for machine metrics
pandas.DataFrame
: If pandas=True returns apandas.DataFrame
of history metrics.list of dicts
: If pandas=False returns a list of dicts of history metrics.
method Run.load
method Run.log_artifact
artifact
(Artifact
): An artifact returned fromwandb.Api().artifact(name)
.aliases
(list, optional): Aliases to apply to this artifact.tags
: (list, optional) Tags to apply to this artifact, if any.
Artifact
object.
method Run.logged_artifacts
per_page
: Number of artifacts to fetch per API request.
method Run.save
method Run.scan_history
keys
([str], optional): only fetch these keys, and only fetch rows that have all of keys defined.page_size
(int, optional): size of pages to fetch from the api.min_step
(int, optional): the minimum number of pages to scan at a time.max_step
(int, optional): the maximum number of pages to scan at a time.
method Run.to_html
method Run.update
method Run.upload_file
path
(str): Path to the file to upload. Can be absolute or relative.root
(str): The root path to save the file relative to. For example, if you want to have the file saved in the run as “my_dir/file.txt” and you’re currently in “my_dir” you would set root to ”../”. Defaults to current directory (”.”).
File
object representing the uploaded file.
method Run.use_artifact
artifact
(Artifact
): An artifact returned fromwandb.Api().artifact(name)
use_as
(string, optional): A string identifying how the artifact is used in the script. Used to easily differentiate artifacts used in a run, when using the beta wandb launch feature’s artifact swapping functionality.
Artifact
object.
method Run.used_artifacts
run.use_artifact()
. Returns a paginated result that can be iterated over or collected into a single list.
Args:
per_page
: Number of artifacts to fetch per API request.