Skip to main content

class Sweep

(service_api: 'ServiceApi',
entity: 'str',
project: 'str',
sweep_id: 'str',
attrs: 'Mapping[str, Any] | None' = None)

Description

The set of runs associated with the sweep. Attributes: runs (Runs): List of runs id (str): Sweep ID project (str): The name of the project the sweep belongs to config (dict): Dictionary containing the sweep configuration state (str): The state of the sweep. Can be “Finished”, “Failed”, “Crashed”, or “Running”. expected_run_count (int): The number of expected runs for the sweep

Args

  • service_api:
  • entity:
  • project:
  • sweep_id:
  • attrs:

Properties

property entity

The entity associated with the sweep.

property username

Deprecated. Use Sweep.entity instead.

property config

The sweep configuration used for the sweep.

property order

Return the order key for the sweep.

property expected_run_count

Return the number of expected runs in the sweep or None for infinite runs.

property path

Returns the path of the project. The path is a list containing the entity, project name, and sweep ID.

property url

The URL of the sweep. The sweep URL is generated from the entity, project, the term “sweeps”, and the sweep ID.run_id. For SaaS users, it takes the form of https://wandb.ai/entity/project/sweeps/sweeps_ID.

property name

The name of the sweep. Returns the first name that exists in the following priority order:
  1. User-edited display name
  2. Name configured at creation time
  3. Sweep ID

Methods

method agent

self,
agent_id: 'str'
Query an agent by ID for this sweep.
Arguments
  • agent_id: The ID of the agent to look up.

method agents

self
Query the list of all agents for this sweep.

method best_run

(self, order=None)
Return the best run sorted by the metric defined in config or the order passed in.
Arguments
  • order:

method get

(api: 'Api',
entity: 'str | None' = None,
project: 'str | None' = None,
sid: 'str | None' = None,
order: 'str | None' = None,
query: 'str | None' = None, **kwargs)
Execute a query against the cloud backend.
Arguments
  • api: The W&B API instance.
  • entity: The entity (username or team) that owns the project.
  • project: The name of the project to fetch sweep from.
  • sid: The sweep ID to query.
  • order: The order in which the sweep’s runs are returned.
  • query: The query to use to execute the query.
  • kwargs:

method to_html

self,
height: 'int' = 420,
hidden: 'bool' = False
Generate HTML containing an iframe displaying this sweep.
Arguments
  • height:
  • hidden: