Conversation
…, call LP from MPSearchManager with precomputed metrics
| f"following targets: {unsatisfiable_targets}") | ||
| return rel_target_ru | ||
|
|
||
| def _build_sensitivity_mapping(self, eps: float = EPS) -> Dict[int, Dict[int, float]]: |
There was a problem hiding this comment.
Moved from lp file, no change in implementation
| in self.layer_to_indicator_vars_mapping.values()] | ||
| ).flatten() | ||
|
|
||
| return config.tolist() |
There was a problem hiding this comment.
Config reconstruction was moved to MP manager
| return config.tolist() | ||
|
|
||
| @staticmethod | ||
| def _init_problem_vars(layer_to_metrics_mapping: Dict[int, Dict[int, float]]) -> Tuple[ |
There was a problem hiding this comment.
No functional changes in this method
|
|
||
| return layer_to_indicator_vars_mapping, layer_to_objective_vars_mapping | ||
|
|
||
| def _formalize_problem(self) -> LpProblem: |
There was a problem hiding this comment.
No functional changes in this method
|
|
||
| return lp_problem | ||
|
|
||
| def _add_ru_constraints(self, lp_problem: LpProblem): |
There was a problem hiding this comment.
This method was modified.
| @@ -57,144 +57,122 @@ def reconstruct_config_from_virtual_graph(self, | |||
|
|
|||
|
|
|||
| class MockMixedPrecisionSearchManager: | |||
There was a problem hiding this comment.
Fixed to pass. Will be replaced by new tests.
elad-c
left a comment
There was a problem hiding this comment.
In general for tests: write a comment on each stating what that test tests.
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py
Show resolved
Hide resolved
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_manager.py
Outdated
Show resolved
Hide resolved
In general I agree, but no new tests were added, so I'm not sure what exactly you refer to. |
Pull Request Description:
Checklist before requesting a review: