Skip to content

How to use TorchServe: Walk through an example #2658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions beginner_source/torchserve_turorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-

"""
Introduction to TorchServe
==========================

**Author:** `Krishna Kalyan <https://github.com/krishnakalyan3>`_
"""

#########################################################################
# Introduction
# ------------
# Torchserve is an open source framework for model inference, it’s a project
# that’s co-developed by the Applied AI team at Meta and AWS.
# Torchserve is today the default way to serve PyTorch models in Sagemaker, Kubeflow, MLflow, Kserve and Vertex AI.
# TorchServe supports multiple backends and runtimes such as TensorRT,
# ONNX and its flexible design allows users to add more.
#
# Installation
# ------------
#
# pip install torchserve or conda install torchserve
#
8 changes: 8 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ What's new in PyTorch tutorials?
:link: beginner/Intro_to_TorchScript_tutorial.html
:tags: Production,TorchScript


.. customcarditem::
:header: Introduction to TorchServe
:card_description: Introduction to TorchScript, an intermediate representation of a PyTorch model (subclass of nn.Module) that can then be run in a high-performance environment such as C++.
:image: _static/img/thumbnails/cropped/Introduction-to-TorchScript.png
:link: beginner_source/torchserve_turorial.py
:tags: Production,TorchServe

.. customcarditem::
:header: Loading a TorchScript Model in C++
:card_description: Learn how PyTorch provides to go from an existing Python model to a serialized representation that can be loaded and executed purely from C++, with no dependency on Python.
Expand Down