-
Notifications
You must be signed in to change notification settings - Fork 51
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
Logger update #995
Logger update #995
Conversation
Changed all "Logger.error" terms to "Logger.critical". Changed all "Logger.exception" terms to "Logger.critical".
…ed all Logger.error to Logger.critical
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.
Very good. I added some comments. 'dot' means missing '.' at the end of the sentence.
model_compression_toolkit/core/common/graph/memory_graph/bipartite_graph.py
Show resolved
Hide resolved
model_compression_toolkit/core/common/hessian/trace_hessian_calculator.py
Outdated
Show resolved
Hide resolved
|
||
self.input_images = fw_impl.to_tensor(input_images) | ||
self.num_iterations_for_approximation = num_iterations_for_approximation | ||
|
||
# Validate representative dataset has same inputs as graph | ||
if len(self.input_images)!=len(graph.get_inputs()): | ||
Logger.error(f"Graph has {len(graph.get_inputs())} inputs, but provided representative dataset returns {len(self.input_images)} inputs") | ||
Logger.critical(f"The graph requires {len(graph.get_inputs())} inputs, but the provided representative dataset contains {len(self.input_images)} inputs") |
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.
dot
model_compression_toolkit/core/common/mixed_precision/kpi_tools/kpi_methods.py
Outdated
Show resolved
Hide resolved
model_compression_toolkit/core/common/mixed_precision/search_methods/linear_programming.py
Outdated
Show resolved
Hide resolved
list), f'\'QuantizationConfigOptions\' options list must be a list, but received: {type(quantization_config_list)}.' | ||
assert len(quantization_config_list) > 0, f'Options list can not be empty.' | ||
for cfg in quantization_config_list: | ||
assert isinstance(cfg, OpQuantizationConfig), f'Options should be a list of QuantizationConfig objects, ' \ | ||
f'but found an object type: {type(cfg)}' | ||
assert isinstance(cfg, OpQuantizationConfig), f'Each option must be an instance of \'OpQuantizationConfig\', but found an object of type: {type(cfg)}.' | ||
self.quantization_config_list = quantization_config_list | ||
if len(quantization_config_list) > 1: | ||
assert base_config is not None, f'When quantization config options contains more than one configuration, ' \ | ||
f'a base_config must be passed for non-mixed-precision optimization process' | ||
assert base_config in quantization_config_list, f"base_config must be in the given quantization config " \ | ||
f"list of options" | ||
assert base_config is not None, f'For multiple configurations, a \'base_config\' is required for non-mixed-precision optimization.' | ||
assert base_config in quantization_config_list, f"\'base_config\' must be included in the quantization config options list." |
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.
missing logger?
model_compression_toolkit/target_platform_capabilities/target_platform/target_platform_model.py
Outdated
Show resolved
Hide resolved
@@ -87,7 +87,7 @@ def __or__(self, other: Any): | |||
""" | |||
|
|||
if not isinstance(other, AttributeFilter): | |||
Logger.error("Not an attribute filter. Can not run an OR operation.") # pragma: no cover | |||
Logger.critical("Not an attribute filter. Cannot perform an 'OR' operation.") # pragma: no cover |
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.
specify 'other' in the error
@@ -101,7 +101,7 @@ def __and__(self, other: Any): | |||
AndAttributeFilter that filters with AND between the current AttributeFilter and the passed AttributeFilter. | |||
""" | |||
if not isinstance(other, AttributeFilter): | |||
Logger.error("Not an attribute filter. Can not run an AND operation.") # pragma: no cover | |||
Logger.critical("Not an attribute filter. Can not perform an 'AND' operation.") # pragma: no cover |
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.
specify 'other' in the error
...toolkit/target_platform_capabilities/target_platform/targetplatform2framework/current_tpc.py
Outdated
Show resolved
Hide resolved
40a7ff6
to
4c77907
Compare
Pull Request Description:
Checklist before requesting a review: