MCPcopy Create free account
hub / github.com/UCSC-VLAA/OpenVision / startstop_prof

Function startstop_prof

src/helpers/utils.py:818–824  ·  view source on GitHub ↗

Runs the profiler for `surround` steps around the next `log_steps`.

(sess, step=None, first_step=0,
                   log_steps=1, surround=20, **kw)

Source from the content-addressed store, hash-verified

816
817
818def startstop_prof(sess, step=None, first_step=0,
819 log_steps=1, surround=20, **kw):
820 """Runs the profiler for `surround` steps around the next `log_steps`."""
821 first_log = first_step + log_steps - (first_step % log_steps)
822 # don't start before first!
823 start = max(first_log - surround//2, first_step + 1)
824 return startstop_prof_at_steps(sess, step, start, start + surround, **kw)
825
826
827def startstop_prof_at_steps(

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

startstop_prof_at_stepsFunction · 0.85

Tested by

no test coverage detected