afnio.tellurio.run#

Functions

init(namespace_slug, project_display_name[, ...])

Initializes a new Tellurio Run.

Classes

Run(uuid, name, description, status[, ...])

Represents a Tellurio Run.

RunOrg(slug)

Represents a Tellurio Run Organization.

RunProject(uuid, display_name, slug)

Represents a Tellurio Run Project.

RunStatus(*values)

Represents the status of a Tellurio Run.

RunUser(uuid, username, slug)

Represents a Tellurio Run User.

class afnio.tellurio.run.Run(uuid, name, description, status, date_created=None, date_updated=None, organization=None, project=None, user=None)[source]#

Bases: object

Represents a Tellurio Run.

finish(client=None, status=RunStatus.COMPLETED)[source]#

Marks the run as COMPLETED on the server by sending a PATCH request, and clears the active run UUID.

Parameters:

client (TellurioClient, optional) – The client to use for the request. If not provided, the default client will be used.

Raises:

Exception – If the PATCH request fails.

log(name, value, step=None, client=None)[source]#

Log a metric for this run.

Parameters:
  • name (str) – Name of the metric.

  • value (Any) – Value of the metric. Can be any type that is JSON serializable.

  • step (int, optional) – Step number. If not provided, the backend will auto-compute it.

  • client (TellurioClient, optional) – The client to use for the request.

class afnio.tellurio.run.RunOrg(slug)[source]#

Bases: object

Represents a Tellurio Run Organization.

class afnio.tellurio.run.RunProject(uuid, display_name, slug)[source]#

Bases: object

Represents a Tellurio Run Project.

class afnio.tellurio.run.RunStatus(*values)[source]#

Bases: Enum

Represents the status of a Tellurio Run.

COMPLETED = 'COMPLETED'#
CRASHED = 'CRASHED'#
FAILED = 'FAILED'#
RUNNING = 'RUNNING'#
class afnio.tellurio.run.RunUser(uuid, username, slug)[source]#

Bases: object

Represents a Tellurio Run User.

afnio.tellurio.run.init(namespace_slug, project_display_name, name=None, description=None, status=RunStatus.RUNNING, client=None)[source]#

Initializes a new Tellurio Run.

Parameters:
  • namespace_slug (str) – The namespace slug where the project resides. It can be either an organization slug or a user slug.

  • project_display_name (str) – The display name of the project. This will be used to retrive or create the project through its slugified version.

  • name (str, optional) – The name of the run. If not provided, a random name is generated (e.g., “brave_pasta_123”). If the name is provided but already exists, an incremental number is appended to the name (e.g., “test_run_1”, “test_run_2”).

  • description (str, optional) – A description of the run.

  • status (str) – The status of the run (default: “RUNNING”).

  • client (TellurioClient, optional) – An instance of TellurioClient. If not provided, the default client will be used.

Returns:

A Run object representing the created run.

Return type:

Run