deephyper.evaluator.callback.TqdmCallback#

class deephyper.evaluator.callback.TqdmCallback(description: str = None)[source]#

Bases: Callback

Print information when jobs are completed by the Evaluator.

Parameters:

description (str, optional) – an optional description to add to the progressbar.

An example usage can be:

>>> evaluator.create(method="ray", method_kwargs={..., "callbacks": [TqdmCallback()]})

Methods

on_close

Called when the evaluator is being closed.

on_done

Called when a local job has been gathered.

on_done_other

Called after gathering local jobs on available remote jobs that are done.

on_gather

Called after gathering jobs.

on_launch

Called each time a Job is created by the Evaluator.

set_max_evals

Setter for the maximum number of evaluations.

on_close()#

Called when the evaluator is being closed.

on_done(job)[source]#

Called when a local job has been gathered.

on_done_other(job)[source]#

Called after gathering local jobs on available remote jobs that are done.

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

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.

set_max_evals(max_evals)[source]#

Setter for the maximum number of evaluations.

It is used to initialize the tqdm progressbar.