- Newest
- Most votes
- Most comments
Hi Dennis, I tried a code above in AWS SageMaker notebook and didn't get any ProfilerReport as well.
The possible issue is that there is no data to train hence nothing to report. To prove this hypothesis I decided to take a sample XGBoost notebook and to add report functionality in it. This link tells how to access sample notebooks. I used "xgboost_customer_churn.ipynb".
Here some changes that I made:
- In order to be able to run it smoothly, instead of "1.6-1" XGBoost image I set the "1.2-1":
container = sagemaker.image_uris.retrieve("xgboost", sess.boto_region_name, "1.2-1")
- I added reporting to the training cell:
from sagemaker.debugger import Rule, rule_configs
rules=[
Rule.sagemaker(rule_configs.create_xgboost_report())
]
sess = sagemaker.Session()
xgb = sagemaker.estimator.Estimator(
container,
role,
instance_count=1,
instance_type="ml.m4.xlarge",
output_path="s3://{}/{}/output".format(bucket, prefix),
sagemaker_session=sess,
base_job_name="debugger-xgboost-report-demo",
rules=rules
)
xgb.set_hyperparameters(
max_depth=5,
eta=0.2,
gamma=4,
min_child_weight=6,
subsample=0.8,
verbosity=0,
objective="binary:logistic",
num_round=100,
)
xgb.fit({"train": s3_input_train, "validation": s3_input_validation})
All the rest I run without changes.
However, it was a little confusing to fing a ProfilerReport. In this particular example it had the path: sagemaker-region-11122233/sagemaker/DEMO-xgboost-churn/output/debugger-xgboost-report-demo-2022-00-000/rule-output/CreateXgboostReport/
In order to get this path you can use (run this code in the SageMaker notebook):
xgb.output_path
- gives the first part of the path (including the bucket name)
xgb.latest_training_job.job_name
- gives the second part of the path (training job name)
If you combine these two, you will get the full path towards the rule-output
directory.
I hope this helps.
Relevant content
- asked 3 years ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 months ago