ipex-llm icon indicating copy to clipboard operation
ipex-llm copied to clipboard

Chronos: Evaluator.get_latency() is added to evaluate the time cost of a workflow

Open plusbang opened this issue 1 year ago • 0 comments

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)

plusbang avatar Aug 08 '22 02:08 plusbang