deephyper.evaluator.callback.ProfilingCallback#

class deephyper.evaluator.callback.ProfilingCallback[source]#

Bases: Callback

Collect profiling data. Each time a Job is completed by the Evaluator a the different timestamps corresponding to the submit and gather (and run function start and end if the profile decorator is used on the run function) are collected.

An example usage can be:

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

Methods

on_done

Called each time a Job is completed by the Evaluator.

on_done_other

Called each time a Job is collected from an other process.

on_launch

Called each time a Job is created by the Evaluator.

Attributes

profile

on_done(job)[source]#

Called each time a Job is completed by the Evaluator.

Parameters:

job (Job) – The completed job.

on_done_other(job)#

Called each time a Job is collected from an other process.

Parameters:

job (Job) – The completed Job.

on_launch(job)[source]#

Called each time a Job is created by the Evaluator.

Parameters:

job (Job) – The created job.