Closed horheynm closed 7 months ago
could you please make the TimerManager in time.py have a __repr__()
defined like the one in timer.py?
this will let it have a useful string representation since currently it just prints the raw object:
(Pdb) model.timer_manager
<deepsparse.utils.time.TimerManager object at 0x7fd9c6987be0>
Blocked on https://github.com/neuralmagic/deepsparse/pull/1471
Description
Add Timer to middleware, which will record the runtime of call in Pipeline and Operator
Problem
No existing way to get the run time of the callables
Solution
Add TimerMiddleware to the existing middleware
Design
General middleware implementation. Record start time, run the callable, get the end time and the overall run-time
Usage
Check tests (
/tests/deepsparse/middlewares/test_timer_middleware_pipeline.py
)Testing
Checks if timings are measured, and exists as expected