ipex-llm
ipex-llm copied to clipboard
Chronos: Evaluator.get_latency() is added to evaluate the time cost of a workflow
Evaluator.get_latency() is added to evaluate the time cost of a workflow, the API helps display the time cost in milliseconds of a specific function by running multiple times.
1. Why the change?
https://github.com/intel-analytics/BigDL/issues/5331
2. User API changes
Example:
# run forecaster.predict(x.numpy()) for len(tsdata_test.df) times
# to evaluate the time cost
latency = Evaluator.get_latency(len(tsdata_test.df), forecaster.predict, x.numpy())
4. How to test?
- Unit test (will be added later)