-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: unit test different power models and get results #493
base: main
Are you sure you want to change the base?
Conversation
res_json = json.loads(res) | ||
print(res_json) | ||
# FIXME: when using LogarithmicRegressionTrainer_0, the response is None: | ||
# {"trainer_name": "LogarithmicRegressionTrainer_0", "metrics": ["bpf_cpu_time_ms", "bpf_page_cache_hit"], "system_features": ["node_info", "cpu_scaling_frequency_hertz"], "system_values": ["1", "1GHz"], "values": [[1.0, 1.0], [1.0, 1.0]], "output_type": "AbsPower", "source": "acpi"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunya-ch can you take a look at this error? I think the model server doesn't have predict
for log regressor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs
It depends on which model db is connected to the estimator. If we want to test all available models (trainers), we must first make sure that the model exists at the estimator.
For curvefit-class models, it is possible that it cannot find fitting model parameters regarding the data input.
I define SGDRegressor here since it is the simplest trainer that should always exist.
If you run estimator standalone, check the configuration file.
If you run estimator with model server, check the db that connected to the model-server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed! with a more realistic feature values, the predicator now works
tests/estimator_power_request_test.py::test_estimator_power_request {"trainer_name": "SGDRegressorTrainer_0", "metrics": ["bpf_cpu_time_ms", "bpf_page_cache_hit"], "system_features": ["node_info", "cpu_scaling_frequency_hertz"], "system_values": ["1", "1GHz"], "values": [[1000.0, 1000.0], [1000.0, 1000.0]], "output_type": "AbsPower", "source": "acpi"}
{'powers': {'platform': [79.01245846529595, 79.01245846529595]}, 'msg': '', 'core_ratio': 4.0}
{"trainer_name": "LogarithmicRegressionTrainer_0.json", "metrics": ["bpf_cpu_time_ms", "bpf_page_cache_hit"], "system_features": ["node_info", "cpu_scaling_frequency_hertz"], "system_values": ["1", "1GHz"], "values": [[1000.0, 1000.0], [1000.0, 1000.0]], "output_type": "AbsPower", "source": "acpi"}
{'powers': {'platform': [76.55652313028382, 76.55652313028382]}, 'msg': '', 'core_ratio': 1}
{"trainer_name": "SGDRegressorTrainer_0", "metrics": ["bpf_cpu_time_ms", "bpf_page_cache_hit"], "system_features": ["node_info", "cpu_scaling_frequency_hertz"], "system_values": ["1", "1GHz"], "values": [[1000.0, 1000.0], [1000.0, 1000.0]], "output_type": "AbsPower", "source": "rapl-sysfs"}
{'powers': {'package': [146.99476788632222, 146.99476788632222], 'core': [0.0, 0.0], 'uncore': [0.0, 0.0], 'dram': [18.704254540352803, 18.704254540352803]}, 'msg': '', 'core_ratio': 0.16666666666666666}
{"trainer_name": "LogarithmicRegressionTrainer_0.json", "metrics": ["bpf_cpu_time_ms", "bpf_page_cache_hit"], "system_features": ["node_info", "cpu_scaling_frequency_hertz"], "system_values": ["1", "1GHz"], "values": [[1000.0, 1000.0], [1000.0, 1000.0]], "output_type": "AbsPower", "source": "rapl-sysfs"}
{'powers': {'package': [59.31611863686947, 59.31611863686947], 'core': [0.0, 0.0], 'uncore': [0.0, 0.0], 'dram': [14.265734715496643, 14.265734715496643]}, 'msg': '', 'core_ratio': 1}
Signed-off-by: Huamin Chen <[email protected]>
f27ce55
to
32d0d89
Compare
@rootfs May I have an update of this PR? |
Checklist for PR Author
In addition to approval, the author must confirm the following check list:
Run the following command to format your code:
Create issues for unresolved comments and link them to this PR. Use one of the following labels:
must-fix
: The logic appears incorrect and must be addressed.minor
: Typos, minor issues, or potential refactoring for better readability.nit
: Trivial issues like extra spaces, commas, etc.