adaptive_scheduler.client_support module¶
Client support for Adaptive Scheduler.
- adaptive_scheduler.client_support.add_log_file_handler(log_fname)[source]¶
Add a file handler to the logger.
- Return type:
- adaptive_scheduler.client_support.args_to_env(args, prefix='ADAPTIVE_SCHEDULER_')[source]¶
Convert parsed arguments to environment variables.
- Return type:
- adaptive_scheduler.client_support.get_learner(url, log_fname, job_id, job_name)[source]¶
Get a learner from the database (running at url).
This learner’s process will be logged in log_fname and running under job_id.
- Parameters:
url (
str
) – The url of the database manager running via (adaptive_scheduler.server_support.manage_database).log_fname (
str
) – The filename of the log-file. Should be passed in the job-script.job_id (
str
) – The job_id of the process the job. Should be passed in the job-script.job_name (
str
) – The name of the job. Should be passed in the job-script.
- Return type:
tuple
[BaseLearner
,str
|list
[str
],Optional
[Callable
[[],None
]]]- Returns:
learner – Learner that is chosen.
fname – The filename of the learner that was chosen.
initializer – A function that runs before the process is forked.
- adaptive_scheduler.client_support.log_info(runner, interval=300)[source]¶
Log info in the job’s logfile, similar to runner.live_info.
- Parameters:
runner (
AsyncRunner
) – Adaptive Runner instance.interval (
float
) – Time in seconds between log entries.
- Return type:
Task
- adaptive_scheduler.client_support.log_now(runner, npoints_start)[source]¶
Create a log message now.
- Return type: