Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

Black Friday Sale - AWS SAA, CDA, SYSOPS Practice Exams at $10.49 USD, eBooks at $3.99 USD ONLY!

Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Machine Learning – Specialty Docker containers on SageMaker

  • Docker containers on SageMaker

  • goking

    Member
    April 8, 2021 at 4:31 pm

    The question is:

    A Machine Learning Specialist wishes to train a model on an Amazon SageMaker notebook instance. The Specialist will build a custom training container using a python training script that he developed on his local machine.

    Which method will enable the Specialist to use the training script?

    (view) 1 0 1 00:02:00

    Store the training script inside the /opt/ml/code directory and define it as the script entry point in the SAGEMAKER_PROGRAM environment variable.

    Place the training script in the /opt/ml/model directory and define it as the script entry point in the SAGEMAKER_PROGRAM environment variable.

    Store the training script inside the /opt/ml/code directory and define it as the script entry point in the SAGEMAKER_TRAIN environment variable.

    Place the training script in the /opt/ml/model directory and define it as the script entry point in the SAGEMAKER_TRAIN environment variable.

    now in the answers they refer to: https://docs.aws.amazon.com/sagemaker/latest/dg/adapt-training-container.html

    However if you dig a bit deeper in the documentation https://docs.aws.amazon.com/sagemaker/latest/dg/docker-containers-create.html

    ” If none of the existing SageMaker containers meet your needs and you don’t have an existing container of your own, you may need to create a new Docker container. The following sections show how to create Docker containers with your training and inference algorithms for use with SageMaker.”

    https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo-dockerfile.html

    /opt/ml and all sub-directories are reserved by SageMaker training. When building your algorithm’s Docker image, please ensure you don’t place any data required by your algorithm under them as the data may no longer be visible during training.

    Which is correct?

  • Carlo-TutorialsDojo

    Member
    April 9, 2021 at 12:51 am

    Hello goking,

    Thanks for raising this.

    SageMaker requires a specific folder structure inside the /opt/ml directory where it stores its artifacts when you’re building a custom algorithm.

    The excerpt “/opt/ml and all sub-directories are reserved by SageMaker training. When building your algorithm’s Docker image, please ensure you don’t place any data required by your algorithm under them as the data may no longer be visible during training.“ from the documentation is quite confusing because it did not specify what kind of data it is referring to.

    I’ve already sent an inquiry to AWS about this matter and I’ll update you as soon as I get a reply.

    But as far as the question goes, The /opt/ml/code/ directory is where the training code must be stored. AWS has detailed steps in creating custom SageMaker containers that you can check. The usage of the /opt/ml/code is shown here https://github.com/aws/sagemaker-containers.

    Let me know if you have other queries.

    Regards,

    Carlo @ Tutorials Dojo

Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
Skip to content