Job¶
Job definition module.
- class lorien.tune.job.Job(workload: lorien.workload.Workload)¶
The base class of a tuning job including a workload as well as various configurations. If the commit options are provided, then this function also in charge of committing the tuning results, or the job manager will commit the result, otherwise.
- static create_job_configs(configs: argparse.Namespace) lorien.tune.job.JobConfigs ¶
Create a JobConfigs. See JobConfigs.
- Parameters
configs (argparse.Namespace) -- The system configuration of tuner.
- Returns
job_configs -- The job configurations.
- Return type
- get_metadata(key: str) Any ¶
Get the value of a metadata entry.
- Parameters
key (str) -- The metadata key.
- Returns
entry -- The entry value.
- Return type
Any
- is_target_compatible(target: str) bool ¶
Check if the taret is compatible to this job.
- Parameters
target (str) -- The target string
- Returns
compatible -- Whether the target is compatible to this job.
- Return type
bool
- set_metadata(key: str, val: Any)¶
Set a metadata entry.
- Parameters
key (str) -- The metadata key.
val (Any) -- The metadata value.
- property stateless_hash¶
Return the stateless hash of this job.
- Parameters
stateless_hash (int) -- The stateless hash.
- trace(event_logger: lorien.tune.job.JobEventLogger)¶
Start tracing the state/metadata changes of this job.
- Parameters
event_logger (JobEventLogger) -- The job event logger.
- tune(tune_options: Dict[str, Any], measure_options: Dict[str, Any], commit_options: Optional[Dict[str, Any]] = None)¶
Tune the job with the given configurations. See JobConfigs.
- class lorien.tune.job.JobConfigs(configs: argparse.Namespace)¶
Maintain all configurations related to job tuning, including tuning options, meausre options, and commit options. The configuration is shared by all jobs in the same dialect.
- localize(target: str, **kwargs)¶
Localize job configs on worker for the specific target. This is intended for each dialect to customize.
- Parameters
target (str) -- The target string.
- class lorien.tune.job.JobEventLogger(file_name: str)¶
Log job change events to a file.
- class lorien.tune.job.JobState(value)¶
The state of a tuning job.