diff --git a/smdebug/core/hook.py b/smdebug/core/hook.py index 3d6c44d90..a22afd319 100644 --- a/smdebug/core/hook.py +++ b/smdebug/core/hook.py @@ -246,11 +246,6 @@ def create_from_json_file(cls, json_file_path=None): """ return create_hook_from_json_config(cls, json_config_path=json_file_path) - # For compatibility purposes only; do not use - @classmethod - def hook_from_config(cls, json_config_path=None): - return cls.create_from_json_file(json_file_path=json_config_path) - @abstractmethod def _get_worker_name(self): pass diff --git a/smdebug/xgboost/hook.py b/smdebug/xgboost/hook.py index 19e5445fd..21012563c 100644 --- a/smdebug/xgboost/hook.py +++ b/smdebug/xgboost/hook.py @@ -140,6 +140,11 @@ def create_from_json_file(cls, json_file_path=None): cls, json_config_path=json_file_path, default_values=default_values ) + # For compatibility purposes only; do not use + @classmethod + def hook_from_config(cls, json_config_path=None): + return cls.create_from_json_file(json_file_path=json_config_path) + def _is_last_step(self, env: CallbackEnv) -> bool: # env.iteration: current boosting round. # env.end_iteration: round # when training will end. this is always num_round + 1. # noqa: E501