Documentation
Search…
wandb.apis.public.Run
A single run associated with an entity and project.
1
Run(
2
client, entity, project, run_id, attrs={}
3
)
Copied!

Methods

create

1
@classmethod
2
create(
3
api, run_id=None, project=None, entity=None
4
)
Copied!
Create a run for the given project

delete

1
delete(
2
delete_artifacts=(False)
3
)
Copied!
Deletes the given run from the wandb backend.

display

1
display(
2
height=420, hidden=(False)
3
) -> bool
Copied!
Display this object in jupyter

file

1
file(
2
name
3
)
Copied!
Arguments: name (str): name of requested file.
Returns
Text
A File matching the name argument.

files

1
files(
2
names=[], per_page=50
3
)
Copied!
Arguments: names (list): names of the requested files, if empty returns all files per_page (int): number of results per page
Returns
Text
A Files object, which is an iterator over File obejcts.

history

1
history(
2
samples=500, keys=None, x_axis="_step", pandas=(True), stream="default"
3
)
Copied!
Returns sampled history metrics for a run. This is simpler and faster if you are ok with the history records being sampled.
Arguments
Text
samples (int, optional): The number of samples to return pandas (bool, optional): Return a pandas dataframe keys (list, optional): Only return metrics for specific keys x_axis (str, optional): Use this metric as the xAxis defaults to _step stream (str, optional): "default" for metrics, "system" for machine metrics
Returns
Text
If pandas=True returns a pandas.DataFrame of history metrics. If pandas=False returns a list of dicts of history metrics.

load

1
load(
2
force=(False)
3
)
Copied!

log_artifact

1
log_artifact(
2
artifact, aliases=None
3
)
Copied!
Declare an artifact as output of a run.
Arguments
Text
artifact (Artifact): An artifact returned from wandb.Api().artifact(name) aliases (list, optional): Aliases to apply to this artifact
Returns
Text
A Artifact object.

logged_artifacts

1
logged_artifacts(
2
per_page=100
3
)
Copied!

save

1
save()
Copied!

scan_history

1
scan_history(
2
keys=None, page_size=1000, min_step=None, max_step=None
3
)
Copied!
Returns an iterable collection of all history records for a run.

Example:

Export all the loss values for an example run
1
run = api.run("l2k2/examples-numpy-boston/i0wt6xua")
2
history = run.scan_history(keys=["Loss"])
3
losses = [row["Loss"] for row in history]
Copied!
Arguments
Text
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
Returns
Text
An iterable collection over history records (dict).

snake_to_camel

1
snake_to_camel(
2
string
3
)
Copied!

to_html

1
to_html(
2
height=420, hidden=(False)
3
)
Copied!
Generate HTML containing an iframe displaying this run

update

1
update()
Copied!
Persists changes to the run object to the wandb backend.

upload_file

1
upload_file(
2
path, root="."
3
)
Copied!
Arguments: path (str): name of file to upload. root (str): the root path to save the file relative to. i.e. 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 "../"
Returns
Text
A File matching the name argument.

use_artifact

1
use_artifact(
2
artifact, use_as=None
3
)
Copied!
Declare an artifact as an input to a run.
Arguments
Text
artifact (Artifact): An artifact returned from wandb.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.
Returns
Text
A Artifact object.

used_artifacts

1
used_artifacts(
2
per_page=100
3
)
Copied!

wait_until_finished

1
wait_until_finished()
Copied!