Skip to content

Trial

Defined in scheduler.trial.trial

A trial class that extends Ax trial functionality. A trial can contain multiple jobs and has a state that is tracked.

Class Definition

class Trial(self, trial_id: <class 'str'>, parameters: Dict[str, Any]):
    """
    Initialize a new trial.
    **Args:**
    * **trial_id**: Unique identifier for the trial
    * **parameters**: Dictionary of parameters for this trial
    """

Methods

Method Description
add_job Add a job to this trial.
check_status Check the status of all jobs and update the trial state.
get_results Gather results from all jobs.
run Run all jobs in this trial.

Method Details

add_job

def add_job(self, job: <class 'Job'>) -> None

Add a job to this trial. Args: * job: The job to add


check_status

def check_status(self) -> <enum 'TrialState'>

Check the status of all jobs and update the trial state. Returns: The current state of the trial


get_results

def get_results(self) -> Dict[str, Any]

Gather results from all jobs. Returns: Dictionary of results


run

def run(self) -> None

Run all jobs in this trial.