Skip to content

Commit

Permalink
Fix redundant warning printing (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccssu authored Apr 8, 2024
1 parent 3da8ded commit 954f759
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/onediff/infer_compiler/import_tools/dyn_mock_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def proxy_func(*args, **kwargs):
raise RuntimeError(
f"Not support {module_name} with parameters Module: {module}"
)
sub_module = getattr(sub_module, attr)
sub_module = getattr(sub_module, attr, None)
return sub_module


Expand Down Expand Up @@ -108,9 +108,6 @@ def _update_module(full_names, main_pkg_enable_context):

value = getattr_from_module_name(other, module_name=str(sample_module))
if value is None:
logger.warning(
f"Skip {str(sample_module)} because is not supported"
)
continue

setattr(module, attr_name, value)
Expand Down

0 comments on commit 954f759

Please sign in to comment.