aws-samples / amazon-sagemaker-immersion-day

MIT No Attribution
271 stars 222 forks source link

xgboost_debugger_demo.ipynb - TypeError: Descriptors cannot not be created directly / protobuf version #76

Open mikwin2 opened 1 year ago

mikwin2 commented 1 year ago

The existing protobuf package version resulted in runtime error: TypeError: Descriptors cannot not be created directly. I fixed this error by installing protobuf version 3.20.x or lower per https://protobuf.dev/news/2022-05-06/#python-updates.

!pip install protobuf==3.20.1

# cell 18
from smdebug.trials import create_trial

description = client.describe_training_job(TrainingJobName=job_name)
s3_output_path = xgboost_estimator.latest_job_debugger_artifacts_path()

# This is where we create a Trial object that allows access to saved tensors.
trial = create_trial(s3_output_path)