Skip to content

Commit

Permalink
add no cover for logger.critical instances in gptq_training
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenp committed Apr 25, 2024
1 parent 73c28e2 commit e5cd085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions model_compression_toolkit/gptq/common/gptq_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self,
if self.gptq_config.use_hessian_based_weights:
if not isinstance(hessian_info_service, HessianInfoService):
Logger.critical(f"When using Hessian-based approximations for sensitivity evaluation, "
f"an 'HessianInfoService' object must be provided, but received: {hessian_info_service}.")
f"an 'HessianInfoService' object must be provided, but received: {hessian_info_service}.") # pragma: no cover
self.hessian_service = hessian_info_service

def get_optimizer_with_param(self,
Expand Down Expand Up @@ -238,12 +238,12 @@ def _validate_trace_approximation(trace_approx: List):
trace_approx: Trace approximation to validate.
"""
if not isinstance(trace_approx, list):
Logger.critical(f"Trace approximation was expected to be a list but is of type: {type(trace_approx)}.")
Logger.critical(f"Trace approximation was expected to be a list but is of type: {type(trace_approx)}.") # pragma: no cover
if len(trace_approx) != 1:
Logger.critical(f"Trace approximation was expected to have a length of 1 "
f"(for computations with granularity set to 'HessianInfoGranularity.PER_TENSOR') "
f"but has a length of {len(trace_approx)}."
)
) # pragma: no cover


@abstractmethod
Expand Down

0 comments on commit e5cd085

Please sign in to comment.