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
Used for querying the W&B server.Examples:
Args:
- overrides: You can set
base_urlif you are - timeout: HTTP timeout in seconds for API requests. If not specified, the default timeout will be used.
- api_key: API key to use for authentication. If not provided, the API key from the current environment or configuration will be used. Prompts for an API key if none is provided or configured in the environment.
Properties:
client
Returns the client object.user_agent
Returns W&B public user agent.default_entity
Returns the default W&B entity.viewer
Returns the viewer object. Raises: ValueError: If viewer data is not able to be fetched from W&B. requests.RequestException: If an error occurs while making the graphql request.Methods:
artifact
Returns a single artifact.artifact_collection
Returns a single artifact collection by type. You can use the returnedArtifactCollection object to retrieve
information about specific artifacts in that collection, and more.
artifact_collection_exists
Whether an artifact collection exists within a specified project and entity.artifact_collections
Returns a collection of matching artifact collections.artifact_exists
Whether an artifact version exists within the specified project and entity.artifact_type
Returns the matchingArtifactType.
artifact_types
Returns a collection of matching artifact types.artifact_versions
Deprecated. UseApi.artifacts(type_name, name) method instead.
artifacts
Return anArtifacts collection.
automation
Returns the only Automation matching the parameters.automations
Returns an iterator over all Automations that match the given parameters. If no parameters are provided, the returned iterator will contain all Automations that the user has access to.create_automation
Create a new Automation.create_custom_chart
Create a custom chart preset and return its id.create_project
Create a new project.create_registry
Create a new registry.create_run
Create a new run.create_run_queue
Create a new run queue in W&B Launch.create_team
Create a new team.create_user
Create a new user.delete_automation
Delete an automation.flush
Flush the local cache. 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 withapi.flush() to get the latest values associated with the run.
from_path
Return a run, sweep, project or report from a path.integrations
Return an iterator of all integrations for an entity.job
Return aJob object.
list_jobs
Return a list of jobs, if any, for the given entity and project.project
Return theProject with the given name (and entity, if given).
projects
Get projects for a given entity.queued_run
Return a single queued run based on the path. Parses paths of the formentity/project/queue_id/run_queue_item_id.
registries
Returns a lazy iterator ofRegistry objects.
Use the iterator to search and filter registries, collections,
or artifact versions across your organization’s registry.
registry
Return a registry given a registry name.reports
Get reports for a given project path. Note:wandb.Api.reports() API is in beta and will likely change in
future releases.
run
Return a single run by parsing path in the formentity/project/run_id.
run_queue
Return the namedRunQueue for entity.
See Api.create_run_queue for more information on how to create a run queue.
runs
Returns aRuns object, which lazily iterates over Run objects.
Fields you can filter by include:
createdAt: The timestamp when the run was created. (in ISO 8601 format, e.g. “2023-01-01T12:00:00Z”)displayName: The human-readable display name of the run. (e.g. “eager-fox-1”)duration: The total runtime of the run in seconds.group: The group name used to organize related runs together.host: The hostname where the run was executed.jobType: The type of job or purpose of the run.name: The unique identifier of the run. (e.g. “a1b2cdef”)state: The current state of the run.tags: The tags associated with the run.username: The username of the user who initiated the run
config.experiment_name, summary_metrics.loss, etc.
For more complex filtering, you can use MongoDB query operators.
For details, see: https://docs.mongodb.com/manual/reference/operator/query
The following operations are supported:
$and$or$nor$eq$ne$gt$gte$lt$lte$in$nin$exists$regex
slack_integrations
Returns an iterator of Slack integrations for an entity.sweep
Return a sweep by parsing path in the formentity/project/sweep_id.
sync_tensorboard
Sync a local directory containing tfevent files to wandb.team
Return the matchingTeam with the given name.
update_automation
Update an existing automation.upsert_run_queue
Upsert a run queue in W&B Launch.user
Return a user from a username or email address. This function only works for local administrators. Useapi.viewer
to get your own user object.
users
Return all users from a partial username or email address query. This function only works for local administrators. Useapi.viewer
to get your own user object.