afnio.tellurio.run#
Functions
|
Initializes a new Tellurio Run. |
Classes
|
Represents a Tellurio Run. |
|
Represents a Tellurio Run Organization. |
|
Represents a Tellurio Run Project. |
|
Represents the status of a Tellurio Run. |
|
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:
objectRepresents 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:
objectRepresents a Tellurio Run Organization.
- class afnio.tellurio.run.RunProject(uuid, display_name, slug)[source]#
Bases:
objectRepresents a Tellurio Run Project.
- class afnio.tellurio.run.RunStatus(*values)[source]#
Bases:
EnumRepresents the status of a Tellurio Run.
- COMPLETED = 'COMPLETED'#
- CRASHED = 'CRASHED'#
- FAILED = 'FAILED'#
- RUNNING = 'RUNNING'#
- class afnio.tellurio.run.RunUser(uuid, username, slug)[source]#
Bases:
objectRepresents 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: