syne_tune.optimizer.schedulers.utils.simple_profiler module
- class syne_tune.optimizer.schedulers.utils.simple_profiler.ProfilingBlock(meta, time_stamp, durations)[source]
Bases:
object-
meta:
Dict[str,Any]
-
time_stamp:
float
-
durations:
Dict[str,List[float]]
-
meta:
- class syne_tune.optimizer.schedulers.utils.simple_profiler.SimpleProfiler[source]
Bases:
objectUseful to profile time of recurring computations, for example
get_configcalls in searchers.Measurements are divided into blocks. A block is started by
begin_block. Each block stores meta data, a time stamp whenbegin_blockwas called (relative to the time stamp for the first block, which is 0), and a dict of lists of durations, whose keys are tags. A tag corresponds to a range of code to be profiled. It may be executed many times within a block, therefore lists of durations.Tags can have multiple levels of prefixes, corresponding to brackets.