Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Train Linear Learner model using MNIST dataset and Amazon EFS file system.

Summary

This section will train Linear Learner model using Amazon EFS file system.

Duration

Note
It will take approximately 10 minutes to complete this section.

Step-by-step Guide

Important
Read through all steps below and watch the quick video before continuing.
04 run ml training
  1. Open the Amazon SageMaker console.

    Tip
    Context-click (right-click) the link above and open the link in a new tab or window to make it easy to navigate between this github tutorial and the Amazon SageMaker console.
  2. Go to Notebook Select Notebook instances.

  3. Click Open Jupyter.

  4. In Jupyter notebook window Click SageMaker Examples.

  5. Scroll down through the sample notebooks and Select linear_learner_mnist_with_file_system_data_source.ipynb then Click Use then Click Create copy

  6. Note: Before proceeding with next step make sure you have the EFS file system ID, SageMaker ML instance security group and subnet ID. This can be found in the Cloudformation Stack Outputs and Parameters

  7. Go to Prepare File System Input cell and update the values for following parameters

    file_system_id

    Enter <your_efs_file_system_id>

    file_system_directory_path

    Enter - /notebooks/training

    file_system_access_mode

    Enter - ro

    file_system_type

    Enter - EFS

    security_groups_ids

    Enter - <your_security_groups_ids>

    subnets

    Enter - <your_subnets>

  8. See an example of the input below:

    # Specify file system id.
    file_system_id = 'fs-ba453210'
    
    # Specify directory path associated with the file system. You need to provide normalized and absolute path here.
    file_system_directory_path = '/notebooks/training'
    
    # Specify the access mode of the mount of the directory associated with the file system.
    # Directory can be mounted either in 'ro'(read-only) or 'rw' (read-write).
    file_system_access_mode = 'ro'
    
    # Specify your file system type, "EFS" or "FSxLustre".
    file_system_type = 'EFS'
    
    # Give Amazon SageMaker Training Jobs Access to FileSystem Resources in Your Amazon VPC.
    security_groups_ids = ["sg-88533ec8"]
    subnets = ["subnet-b41df0e9"]
  9. Go to File Save as…​ and enter path to save notebook dir as ./efs/linear_learner_mnist_2020-03-29.ipynb. This will save your notebook in notebooks folder which you mounted on ./efs mount path and is now available to be shared with other users.

  10. Go to beginning of the notebook and Click Run to execute all the notebook cells.

Next section

Click the button below to go to the next section.

05 cleanup and resources