How to export training logs from CloudWatch

Hi,

When I launch a model training in AWS SageMaker & HF Training DLC, there is a training job created in AWS SageMaker that has a link to CloudWatch > Logs > Logs groups > /aws/sagemaker/TrainingJobs > job name of my training > Log events where I can see the logs of my training.

Great.

Now, I would like to export all these logs to a txt file. Strange but I do not see a button for that.

Who knows how to do it? Thanks.

Hi! you can either export logs to S3 via the log export feature:

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasksConsole.html

You can also query the logs via SDK, for example CloudWatchLogs — Boto3 Docs 1.20.23 documentation

1 Like