Skip to content

Commit 0841f13

Browse files
authored
Merge branch 'master' into feat/inference-plus-training-script
2 parents 4f345db + f25beb5 commit 0841f13

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

doc/amazon_sagemaker_debugger.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Amazon SageMaker Debugger
44
#########################
55

66

7+
.. warning::
8+
9+
This page is no longer supported for maintenence. The live documentation is at `Debug and Profile Training Jobs Using Amazon SageMaker Debugger <https://docs.aws.amazon.com/sagemaker/latest/dg/train-debugger.html>`_
10+
and `Debugger API <https://sagemaker.readthedocs.io/en/stable/api/training/debugger.html>`_.
11+
12+
713
Amazon SageMaker Debugger allows you to detect anomalies while training your machine learning model by emitting relevant data during training, storing the data and then analyzing it.
814

915
.. contents::

doc/api/training/debugger.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ Configure the Debugger-specific parameters when constructing
1010
a SageMaker estimator to gain visibility and insights
1111
into your training job.
1212

13+
.. contents::
14+
1315
.. currentmodule:: sagemaker.debugger
1416

17+
Debugger Rule APIs
18+
~~~~~~~~~~~~~~~~~~
19+
1520
.. autoclass:: get_rule_container_image_uri
1621
:show-inheritance:
1722

@@ -44,6 +49,9 @@ into your training job.
4449
:show-inheritance:
4550
:inherited-members:
4651

52+
Debugger Configuration APIs
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
4755
.. autoclass:: CollectionConfig
4856
:show-inheritance:
4957

@@ -56,6 +64,21 @@ into your training job.
5664
.. autoclass:: ProfilerConfig
5765
:show-inheritance:
5866

67+
Debugger Configuration APIs for Framework Profiling (Deprecated)
68+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69+
70+
.. warning::
71+
72+
SageMaker Debugger deprecates the framework profiling feature starting from TensorFlow 2.11 and PyTorch 2.0. You can still use the feature in the previous versions of the frameworks and SDKs as follows.
73+
74+
* SageMaker Python SDK <= v2.130.0
75+
* PyTorch >= v1.6.0, < v2.0
76+
* TensorFlow >= v2.3.1, < v2.11
77+
78+
With the deprecation, SageMaker Debugger discontinues support for the APIs below this note.
79+
80+
See also `Amazon SageMaker Debugger Release Notes: March 16, 2023 <https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-release-notes.html#debugger-release-notes-20230315>`_.
81+
5982
.. autoclass:: FrameworkProfile
6083
:show-inheritance:
6184

src/sagemaker/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def create_tar_file(source_files, target=None):
429429
def _tmpdir(suffix="", prefix="tmp", directory=None):
430430
"""Create a temporary directory with a context manager.
431431
432-
The file is deleted when the context exits.
432+
The file is deleted when the context exits, even when there's an exception.
433433
The prefix, suffix, and dir arguments are the same as for mkstemp().
434434
435435
Args:
@@ -449,8 +449,10 @@ def _tmpdir(suffix="", prefix="tmp", directory=None):
449449
f"directory does not exist: '{directory}'"
450450
)
451451
tmp = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=directory)
452-
yield tmp
453-
shutil.rmtree(tmp)
452+
try:
453+
yield tmp
454+
finally:
455+
shutil.rmtree(tmp)
454456

455457

456458
def repack_model(

0 commit comments

Comments
 (0)