From 85d9d441f022df02bf83a9161648b7f518e0bc51 Mon Sep 17 00:00:00 2001 From: Rahul Huilgol Date: Tue, 26 Nov 2019 12:10:42 -0800 Subject: [PATCH] Remove compat method --- smdebug/core/hook.py | 5 ----- smdebug/xgboost/hook.py | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) 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