amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

How to get the training job name inside train program?

Open ThisIsRick opened this issue 8 years ago • 2 comments

I followed link [1] to build a docker image for training on ECS with my own model. Is there a way to get the current training job name inside train program? I want to find out the S3 folder where the model artifact is uploaded to. Because I want to upload the training logs and some other training intermediate data to the same folder. Sounds like sagemaker.Session should have property/method to support it but I didn't find it yet.

Or is there a way to pass in job name as parameter to train script? Actually, the job name is available when create training job.

Thanks!

[1] https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/scikit_bring_your_own/scikit_bring_your_own.ipynb

ThisIsRick avatar Feb 22 '18 18:02 ThisIsRick

Work around by put the training job name in hyperparameter.

ThisIsRick avatar Feb 28 '18 20:02 ThisIsRick

Hey @ThisIsRick

Thanks for using Amazon SageMaker!

Amazon SageMaker doesn't have a built-in way of getting the training job name from within the running container. Passing this in as a hyperparameter is a good approach.

In case you aren't aware, training logs are put in CloudWatch: https://docs.aws.amazon.com/sagemaker/latest/dg/logging-cloudwatch.html

What intermediate data would you like to save along with the model?

Thanks again!

andremoeller avatar Mar 06 '18 23:03 andremoeller