cyclic_schedule#
- composer.profiler.cyclic_schedule(skip_first=0, wait=0, warmup=1, active=4, repeat=1)[source]#
Profiler schedule function for a cyclic profiling window.
This function returns a schedule function that uses a cyclic profiling window. The resulting function can be passed as the
prof_scheduleargument to theTrainer.The cyclic window skips the first
skip_firstbatches in every epoch. Then, it performs a cycle of skippingwaitbatches, warming up forwarmupbatches, and recordingactivebatches. It repeats this cycle up torepeattimes per epoch (or for the entire epoch, ifrepeatis 0). This logic repeats every epoch.- Parameters
skip_first (int, optional) โ Number of batches to skip profiling at epoch start. Defaults to
0.wait (int, optional) โ For each profiling cycle, number of batches to skip at the beginning of the cycle. Defaults to
0.warmup (int, optional) โ For each profiling cycle, number of batches to be in the warmup state after skipping
waitbatches. Defaults to1.active (int, optional) โ For each profiling cycle, number of batches to record after warming up. Defaults to
4.repeat (int, optional) โ Number of profiling cycles to perform per epoch. Set to
0to record the entire epoch. Defaults to1.
- Returns
(State -> ProfilerAction) โ A
prof_schedulefor theTrainer.