wandb.apis.public.Api
Last updated
Was this helpful?
Last updated
Was this helpful?
Used for querying the wandb server.
Most common way to initialize
Arguments
overrides
Attributes
artifact
Returns a single artifact by parsing path in the form entity/project/run_id
.
Arguments
name
(str) An artifact name. May be prefixed with entity/project. Valid names can be in the following forms: name:version name:alias digest
type
(str, optional) The type of artifact to fetch.
Returns
A Artifact
object.
artifact_type
artifact_types
artifact_versions
create_run
Create a new run
flush
The api object keeps a local cache of runs, so if the state of the run may change while executing your script you must clear the local cache with api.flush()
to get the latest values associated with the run.
projects
Get projects for a given entity.
Arguments
entity
(str) Name of the entity requested. If None will fallback to default entity passed to Api
. If no default entity, will raise a ValueError
.
per_page
(int) Sets the page size for query pagination. None will use the default size. Usually there is no reason to change this.
Returns
A Projects
object which is an iterable collection of Project
objects.
reports
Get reports for a given project path.
WARNING: This api is in beta and will likely change in a future release
Arguments
path
(str) path to project the report resides in, should be in the form: "entity/project"
name
(str) optional name of the report requested.
per_page
(int) Sets the page size for query pagination. None will use the default size. Usually there is no reason to change this.
Returns
A Reports
object which is an iterable collection of BetaReport
objects.
run
Returns a single run by parsing path in the form entity/project/run_id.
Arguments
path
(str) path to run in the form entity/project/run_id
. If api.entity is set, this can be in the form project/run_id
and if api.project
is set this can just be the run_id.
Returns
A Run
object.
runs
Return a set of runs from a project that match the filters provided.
You can filter by config.*
, summary.*
, state
, entity
, createdAt
, etc.
Find runs in my_project where config.experiment_name has been set to "foo"
Find runs in my_project where config.experiment_name has been set to "foo" or "bar"
Find runs in my_project where config.experiment_name matches a regex (anchors are not supported)
Find runs in my_project sorted by ascending loss
Arguments
path
(str) path to project, should be in the form: "entity/project"
filters
order
(str) Order can be created_at
, heartbeat_at
, config.*.value
, or summary_metrics.*
. If you prepend order with a + order is ascending. If you prepend order with a - order is descending (default). The default order is run.created_at from newest to oldest.
Returns
A Runs
object, which is an iterable collection of Run
objects.
sweep
Returns a sweep by parsing path in the form entity/project/sweep_id
.
Arguments
path
(str, optional) path to sweep in the form entity/project/sweep_id. If api.entity is set, this can be in the form project/sweep_id and if api.project
is set this can just be the sweep_id.
Returns
A Sweep
object.
sync_tensorboard
Sync a local directory containing tfevent files to wandb
Class Variables
VIEWER_QUERY
(dict) You can set base_url
if you are using a wandb server other than . You can also set defaults for entity
, project
, and run
.
(dict) queries for specific runs using the MongoDB query language. You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc. For example: {"config.experiment_name": "foo"} would find runs with a config entry of experiment name set to "foo" You can compose operations to make more complicated queries, see Reference for the language is at