deephyper.evaluator.callback.CSVLoggerCallback#

class deephyper.evaluator.callback.CSVLoggerCallback(path: str = 'results.csv')[source]#

Bases: Callback

Dump jobs done to a CSV file.

Parameters:

path (str) – The path where the CSV is being dumped.

Methods

dump_jobs_done_to_csv

Dump completed jobs to a CSV file.

on_close

Called when the evaluator is being closed.

on_done

Called each time a local Job has been gathered by the Evaluator.

on_done_other

Called after local Job have been gathered for each remote Job that is done.

on_gather

Called after gathering jobs.

on_launch

Called each time a Job is created by the Evaluator.

dump_jobs_done_to_csv(path: str, flush: bool = False)[source]#

Dump completed jobs to a CSV file.

This will reset the Evaluator.jobs_done attribute to an empty list.

Parameters:
  • path (str) – The path of the file where the CSV is being dumped.

  • flush (bool) – A boolean indicating if the results should be flushed (i.e., forcing the dumping).

on_close()[source]#

Called when the evaluator is being closed.

on_done(job: Job)#

Called each time a local Job has been gathered by the Evaluator.

Parameters:

job (Job) – The completed job.

on_done_other(job: Job)#

Called after local Job have been gathered for each remote Job that is done.

Parameters:

job (Job) – The completed Job.

on_gather(local_jobs: List[Job], other_jobs: List[Job])[source]#

Called after gathering jobs.

Parameters:
  • local_jobs (List[Job]) – gathered jobs from local evaluator instance.

  • other_jobs (List[Job]) – gathered jobs from other evaluators using the same storage.

on_launch(job: Job)#

Called each time a Job is created by the Evaluator.

Parameters:

job (Job) – The created job.