Skip to content

Calling Estimator.attach(...) does not populate debugger_hook_config so latest_job_debugger_artifacts_path() returns None #3466

@morelen17

Description

@morelen17

Describe the bug
Hey!
If you create an Estimator instance using attach(...) method and referring to an existing training job that has debugger enabled, then latest_job_debugger_artifacts_path() method call outputs None value since Estimator.debugger_hook_config property object is not populated.

To reproduce

import boto3
import sagemaker


training_job_name = '<your-training-job-name-with-debugger-enabled>'
estimator = sagemaker.estimator.Estimator.attach(training_job_name)

assert estimator.latest_job_debugger_artifacts_path() is None

# to ensure that debugger artifacts path does exist
sm_client = boto3.client('sagemaker')
assert sm_client.describe_training_job(TrainingJobName=training_job_name)['DebugHookConfig']['S3OutputPath']

Expected behavior
Calling Estimator.attach('<your-training-job-name-with-debugger-enabled>').latest_job_debugger_artifacts_path() should return a correct S3 path instead of None.

Screenshots or logs
-

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.116.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): -
  • Framework version: -
  • Python version: 3.8.13
  • CPU or GPU: CPU
  • Custom Docker image (Y/N): N

Additional context
-

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions