Sign inGet started

Deploying machine learning models

Deepnote provides an environment for training machine learning models similar to a standard Jupyter notebook or any local Python setup. It offers secure integration with third-party services like Comet.ml or Weights and Biases, enabling you to adhere to best practices throughout the model development lifecycle. For more details, refer to the section on Training machine learning models in Deepnote.

Model deployment options

Once your model is trained and optimized, Deepnote offers various deployment options, allowing you to seamlessly move from data preprocessing to production deployment within the same platform. Here are some deployment methods supported by Deepnote:

  • Directly from Deepnote: The simplest way to host your model is to create a dedicated notebook that loads your trained model and runs inference against desired input values. Read more on this below.
  • Cloud storage: Save your model to cloud storage services like Amazon S3, Google Cloud Storage (GCS), or Google Drive using Deepnote's native integrations.
  • Docker Containers: Package your model and its dependencies into a Docker container. You can then deploy this container to repositories such as DockerHub, Google Container Registry (GCR), or Amazon Elastic Container Registry (ECR).
  • Hugging Face: Push your models to the Hugging Face model repository and use Hugging Face Inference Endpoints for hosting deployments.
  • Modelbit: Create a hosted deployment environment and push models directly from Deepnote to Modelbit. You can also point Modelbit deployment to run on Snowflake. Read more about deploying ML models to Snowflake with Deepnote & Modelbit on our blog.
  • Beam: Use Beam to set up a hosted environment and deploy models directly from Deepnote. Learn more about packaging models into Bean endpoints.
  • AWS SageMaker: If your infrastructure is based on AWS, deploy models directly to AWS SageMaker environments, leveraging Deepnote's integration for a streamlined deployment process. Check our our template project for Creating training jobs on AWS SageMaker from Deepnote and our example data app serving inference from a model deployed on Sagemaker.
  • FastAPI: Use the FastAPI framework to build a backend service around your model. You can then deploy this service using hosting platforms like Porter, Coherence, or Platform.sh.

These options provide flexibility and ease of use, enabling you to choose the deployment method that best fits your project's needs.

Serve directly from a notebook

The simplest way to host your model is to create a dedicated notebook that loads your trained model and runs inference against desired input values. You can even create a beautiful data app, that sits on top of the inference notebook and executes the model with any provided input inside this app. Think of it as a simple dashboard connected to your trained model inside Deepnote which also uses Deepnote hardware to run. These runs are also cached, can be launched on page load and can also be used to host generated files or even whole models.

Check our our example project on 💳 Customer churn modeling. Notice we have 3 notebooks inside the project

  1. Exploratory data analysis - where we explore our dataset and possibly perform any necessary data cleaning or augmentation.
  2. Building a TensorFlow model - where we conduct all our training
  3. Application - where we load the trained model, and using Deepnote’s input blocks we allow other users (colleagues or other stakeholders) to run churn prediction according to their needs.

On top of our Application notebook we have built this data app, that simplifies the user experience for all stakeholders, especially the non-technical ones. This app can also be embedded into 3rd party tools like Notion or Confluence.