scikit-learn_bench icon indicating copy to clipboard operation
scikit-learn_bench copied to clipboard

Fix issue #75: Benchmarks silently execute stock version if scikit-learn-intelex is not installed

Open lulin789 opened this issue 1 year ago • 1 comments

Fix log not displayed in bench.py Before this fix the log isn't displayed in bench.py, because bench.py is running via subprocess, so the log config set in runner.py has no effect in bench.py, and the log config in bench.py follows the default strategy (log_level=WARNING, stream=stderr), so when scikit-learn-intelex is not installed, the info log can't be displayed, furthermore, all other info logs in bench.py can't be displayed either.

This fix does the following change:

  1. Set a log config in bench.py (log_level=INFO, stream=stderr).
  2. Add return_code in the return value of utils.read_output_from_command() to identify if there is any error in subprocess.
  3. In runner.py, if no error occured, the log from subprocess in stderr will be printed, otherwise is_success will be set to False and the error message will be displayed through a warning log.

Fixes https://github.com/IntelPython/scikit-learn_bench/issues/75

Co-authored-by: Wu, Zihan [email protected] Signed-off-by: Deng, Lulin [email protected] Signed-off-by: Zhou, Shuangpeng [email protected] Signed-off-by: Xu, Yanyue [email protected]

lulin789 avatar Apr 28 '23 11:04 lulin789

@Alexsandruss are we going to integrate this into main branch or we have a fix on your branch?

samir-nasibli avatar Jan 10 '24 14:01 samir-nasibli