mlos_bench.environments.status

Enum for the status of the benchmark/environment Trial or Experiment.

Attributes

COMPLETED_STATUSES

The set of completed statuses.

Classes

Status

Enum for the status of the benchmark/environment Trial or Experiment.

Module Contents

class mlos_bench.environments.status.Status(*args, **kwds)[source]

Bases: enum.Enum

Enum for the status of the benchmark/environment Trial or Experiment.

static completed_statuses() frozenset[Status][source]

Get the set of COMPLETED_STATUSES.

Return type:

frozenset[Status]

is_canceled() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is CANCELED.

Return type:

bool

is_completed() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is one of COMPLETED_STATUSES.

Return type:

bool

is_failed() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is FAILED.

Return type:

bool

is_good() bool[source]

Check if the status of the benchmark/environment is good.

Return type:

bool

is_pending() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is PENDING.

Return type:

bool

is_ready() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is READY.

Return type:

bool

is_running() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is RUNNING.

Return type:

bool

is_succeeded() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is SUCCEEDED.

Return type:

bool

is_timed_out() bool[source]

Check if the status of the benchmark/environment Trial or Experiment is TIMED_OUT.

Return type:

bool

static parse(status: Any) Status[source]

Convert the input to a Status enum.

Parameters:

status (Any) – The status to parse. This can be a string (or string convertible), int, or Status enum.

Returns:

The corresponding Status enum value or else UNKNOWN if the input is not recognized.

Return type:

Status

CANCELED = 5[source]
FAILED = 6[source]
PENDING = 1[source]
READY = 2[source]
RUNNING = 3[source]
SUCCEEDED = 4[source]
TIMED_OUT = 7[source]
UNKNOWN = 0[source]
mlos_bench.environments.status.COMPLETED_STATUSES[source]

The set of completed statuses.

Includes all statuses that indicate the trial or experiment has finished, either successfully or not. This set is used to determine if a trial or experiment has reached a final state. This includes: - Status.SUCCEEDED: The trial or experiment completed successfully. - Status.CANCELED: The trial or experiment was canceled. - Status.FAILED: The trial or experiment failed. - Status.TIMED_OUT: The trial or experiment timed out.