deephyper.evaluator.callback.ProfilingCallback

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 timestamp and current number of running jobs is 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.