Skip to content

Commit ab438a6

Browse files
malav-shastriMalav Shastri
andauthored
Bump smdebug version to 1.0.29 (#378)
* Bump smdebug version to 1.0.28 * Bump smdebug version to 1.0.28 ARM container * Bump smdebug version to 1.0.28 * Bump smdebug version to 1.0.28 * Correct version check test condition * Bump smdebug version to 1.0.29 --------- Co-authored-by: Malav Shastri <[email protected]>
1 parent c396faf commit ab438a6

File tree

5 files changed

+15
-26
lines changed

5 files changed

+15
-26
lines changed

docker/1.5-1/final/Dockerfile.cpu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ ARG SAGEMAKER_XGBOOST_VERSION
1111
COPY requirements.txt /requirements.txt
1212
RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
1313

14+
# Install smdebug from source
15+
RUN python3 -m pip install git+https://github.com/awslabs/[email protected]
16+
17+
1418
###########################
1519
# Copy wheel to container #
1620
###########################

docker/1.5-1/final/Dockerfile_arm64.cpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ ARG SAGEMAKER_XGBOOST_VERSION
1111
COPY requirements.txt /requirements.txt
1212
RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
1313

14+
# Install smdebug from source
15+
RUN python3 -m pip install git+https://github.com/awslabs/[email protected]
16+
1417
###########################
1518
# Copy wheel to container #
1619
###########################

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ sagemaker-containers==2.8.6.post2
2222
sagemaker-inference==1.5.5
2323
scikit-learn==0.24.1
2424
scipy==1.6.2
25-
smdebug==1.0.10
2625
urllib3==1.26.5
2726
wheel==0.36.2
2827
jinja2==2.11.3

src/sagemaker_xgboost_container/callback.py

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,6 @@
1111
logger = logging.getLogger(__name__)
1212

1313

14-
class SmeDebugHook(xgb.callback.TrainingCallback, Hook):
15-
"""Mix-in callback class. smedebug.xgboost.Hook uses legacy callback style
16-
and since XGB-3.0.0 mixing legacy callback instances with new TrainingCallback
17-
instances is not allowed.
18-
19-
See: https://github.com/dmlc/xgboost/blob/v1.3.0/python-package/xgboost/training.py#L92-L93
20-
21-
:param hyperparameters: Dict of hyperparamters.
22-
Same as `params` in xgb.train(params, dtrain).
23-
:param train_dmatrix: Training data set.
24-
:param val_dmatrix: Validation data set.
25-
"""
26-
27-
def __init__(self, json_config_path, hyperparameters, train_dmatrix, val_dmatrix):
28-
self = self.hook_from_config(json_config_path)
29-
self.hyperparameters = hyperparameters
30-
self.train_data = train_dmatrix
31-
if val_dmatrix is not None:
32-
self.validation_data = val_dmatrix
33-
34-
3514
def add_debugging(callbacks, hyperparameters, train_dmatrix, val_dmatrix=None, json_config_path=None):
3615
"""Add a sagemaker debug hook to a list of callbacks.
3716
@@ -44,12 +23,16 @@ def add_debugging(callbacks, hyperparameters, train_dmatrix, val_dmatrix=None, j
4423
instead of default config file.
4524
"""
4625
try:
47-
hook = SmeDebugHook(json_config_path, hyperparameters, train_dmatrix, val_dmatrix)
26+
hook = Hook.hook_from_config(json_config_path)
27+
hook.hyperparameters = hyperparameters
28+
hook.train_data = train_dmatrix
29+
if val_dmatrix is not None:
30+
hook.validation_data = val_dmatrix
31+
callbacks.append(hook)
4832
logging.info("Debug hook created from config")
4933
except Exception as e:
5034
logging.debug("Failed to create debug hook", e)
51-
else:
52-
callbacks.append(hook)
35+
return
5336

5437

5538
def add_sigterm_handler(model_dir, is_master):

test/resources/versions/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
sagemaker-inference==1.5.5
2727
scikit-learn==0.24.1
2828
scipy==1.6.2
29-
smdebug==1.0.10
29+
smdebug==1.0.29
3030
urllib3==1.26.5
3131
wheel==0.36.2
3232
jinja2==2.11.3

0 commit comments

Comments
 (0)