deephyper.evaluator.callback.ProfilingCallback#

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

Bases: deephyper.evaluator.callback.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_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_launch(job)[source]#

Called each time a Job is created by the Evaluator.

Parameters

job (Job) – The created job.