Skip to content

Commit

Permalink
change import level
Browse files Browse the repository at this point in the history
  • Loading branch information
tenacioustommy committed Nov 6, 2024
1 parent 5b27f93 commit 7595f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmengine/registry/build_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ def build_optimizer_from_cfg(
cfg: Union[dict, ConfigDict, Config],
registry: Registry,
default_args: Optional[Union[dict, ConfigDict, Config]] = None) -> Any:
from ..logging import print_log
if 'type' in cfg \
and 'Adafactor' == cfg['type'] \
and digit_version(torch.__version__) >= digit_version('2.5.0'):
from ..logging import print_log
print_log(
'the torch version of Adafactor is registered as TorchAdafactor')
return build_from_cfg(cfg, registry, default_args)
Expand Down

0 comments on commit 7595f50

Please sign in to comment.