Skip to main content
Version: v1.13 print this page

Notebooks

Amorphic platform also provides a way to host Jupyter/IPython notebook.

The following picture depicts the ML Notebook page in Amorphic:

ML Notebook Homepage

Amorphic ML Notebooks contain the following information:

ML Notebooks Information

TypeDescription
Notebook NameML Notebook Name, which uniquely
DescriptionA brief explanation of the notebook
Notebook StatusStatus of ML notebook. Ex: Creating, InService, Stopping, Stopped etc.
Instance TypeML compute notebook instance type
Volume SizeThe size, in GB, of the ML storage volume attached to the notebook instance.
Notebook URLURL to connect to the Jupyter server from notebook instance
Auto TerminateStatus of the auto-termination. Ex: Enabled, Disabled
Remaining TimeAmount of time (in hr) left for auto-termination
Auto Termination TimeTime at which the system auto terminates the ML notebook.
Internet AccessSets whether SageMaker provides internet access to the notebook instance
CreatedByUser who created the ML notebook.
LastModifiedByUser who has recently updated the ML notebook.

ML Notebook Operations

Amorphic ML Notebook provides below operations for a notebook.

OperationDescription
Create NotebookCreate a ML Notebook in AWS Sagemaker.
View NotebookView an existing ML Notebook.
Delete NotebookDelete an existing ML Notebook.

Create Notebook

Notebooks component in Amorphic helps user to create a notebook.

An ML Notebook can be created using the '+' icon on the top right of page under Notebooks section in Machine Learning Dropdown list.

Amorphic Notebook

In order to create ML Notebook, User needs to specify the below fields (some of them might be optional):

AttributeDescription
Notebook NameA Unique name of Notebook that User wants to Create
DescriptionBrief description of the Notebook
Instance TypeUser needs to choose the type of ML compute instance to launch the notebook instance
Volume SizeML notebook storage volume size in GB
Datasets Write AccessUser can select datasets with the write access required for the notebook
Datasets Read AccessUser can select datasets with the read access required for the notebook
Enable Internet AccessSets whether Amazon SageMaker provides internet access to the notebook instance. If you set this to Disabled this notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.
Auto TerminateWhether to enable or disable auto termination on the ML notebook. This option enables ML notebook termination to save resource costs based on the termination time value provided by the user. Auto termination process will be triggered every hour and looks for any ML notebooks that needs to be notified/stopped and sends an email when one of the below criteria met.

User will receive a notification email when:

  • the difference between the auto-terminate process trigger run (every whole hour) and the termination time is less than 30 minutes.
  • the auto-termination process was successfully able to stop the ML notebook after the termination time
  • the auto-termination process wasn't able to stop the ML notebook due to some fatal errors.

Auto Termination Time: Denotes the time at which the user wants the ML notebook to be auto terminated. The maximum auto termination time that a user can set will be less than 168 hours (7 days). Once the current time is greater than the termination time then the termination process will be deleting this ML notebook at the next whole hour. User will also be able to modify the termination time by selecting "Edit Notebook" in the details page and the maximum time that can be set must be less than 168 hours (7 days).

Note
  • Auto-termination process is scheduled to run every hour on the hour (e.g: 6:00, 7:00, 8:00, 9:00).
  • User will receive a email notification only when the user is subscribed to alerts. Please refer to Alert Preferences to enable alerts.
  • When the termination time elapses, auto termination process will stop the ML notebook. User needs to manually delete the notebook if intended.

You can set up or create a new notebook instance and use your IPython notebook to perform model training. You can call Python Sagemaker SDK to create a training job.

Once a training job is created, you can use the S3 model location information to create a model in the Amorphic portal.

Amorphic Dataset S3 Location

For accessing the Datasets inside the IPython notebooks, you can check the Dataset details for the S3 location information.

For example, the exhibit above shows the dataset details with the respective Dataset S3 location.

For the purpose of creating a Sagemaker model in the Notebook, the user can use the ml-temp bucket. Amorphic Notebooks have write access to ml-temp bucket (For example - s3://cdap-us-west-2-484084523624-develop-ml-temp).

Please note that this S3 bucket is almost same as Dataset S3 path except for the "ml-temp" in the end. This "ml-temp" bucket can be used to create a training job and upload a model tar file. This model file location can then be used to create a model using "Artifact Location" of Amorphic model (see model creation section).

You can use the S3 location mentioned here to read the files related to training dataset and save the output sagemaker model tar file for Amorphic model object creation purposes.

View Notebook

If the user has sufficient permissions to view a notebook then all the notebook information can be viewed by clicking on the notebook name in the "Notebooks" under Machine Learning section.

All the information specified while creating the notebook will be displayed in the details page. Along with these, Notebook URL and Message field will be displayed based on the below scenarios:

  • If the notebook status is failed then user can view the failure information in the Message field.
  • If the user doesn't have all the datasets access required for the notebook, then the user cannot view the Notebook URL and missing datasets access information will be displayed in the Message field.

Following details will be displayed in the notebook details page:

View Notebook

Following details will be displayed when the user enables auto-termination on the ML notebook. Remaining Time denotes the amount of time (rounded to nearest upper hour) left for auto-termination.

In below image, the auto termination time is set to 02 Jun, 2021 7:10 PM but the ML notebook will be stopped at 02 Jun, 2021 8:00 PM because the termination process is scheduled to run at whole hour.

Note

Starting from version 1.9, Auto termination process will only stop the notebook instance and won't delete the instance.

In the details page, Estimated Cost of the ML notebook is also displayed to show approximate cost incurred since the creation/last modified time.

ML Notebook Termination

Edit Notebook

The Edit Notebook page is divided into two sections:

  • Basic Info: User can use this section to update all the basic details of the notebook.

    Edit MLNotebook details (Basic Info)

  • Datasets: User can use this section to update datasets which requires access permissions.

    Edit MLNotebook details (Datasets)

Delete Notebook

If the user has sufficient permissions to delete an ML notebook then the notebook can be deleted using the Delete (trash) button on the right side.

Note

The ML notebook must be in Stopped state in order to delete it.

Delete ML notebook is an asynchronous operation so when the delete is triggered the status will change to deleting and waits until the notebook is deleted from AWS Sagemaker. When the notebook is deleted in AWS Sagemaker then the metadata related to the notebook is also deleted.

Please follow the below animation to delete the notebook:

Delete ML Notebook

Update Extra Resource Access

To provide parameter or shared libraries or dataset access to a notebook in large number, use the documentation on How to provide large number of resources access to an ETL Entity in Amorphic