From 10a110152f0e196df46a65ffea69f6fbd3d1472d Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Sun, 6 Nov 2022 23:15:24 -0800 Subject: [PATCH] docs: cleanup whitespace and typo (#3195) --- docs/source/frameworks/pytorch.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/frameworks/pytorch.rst b/docs/source/frameworks/pytorch.rst index a9104e9980..57b78c10dd 100644 --- a/docs/source/frameworks/pytorch.rst +++ b/docs/source/frameworks/pytorch.rst @@ -21,7 +21,7 @@ For common PyTorch models with single input: .. code-block:: python :caption: `train.py` - + import bentoml import torch import torch.nn as nn @@ -97,7 +97,7 @@ For common PyTorch models with single input: bentoml.pytorch.save( model, "my_torch_model", - signatures={"__call__": {"batchable": True, "batchdim": 0}}, + signatures={"__call__": {"batchable": True, "batch_dim": 0}}, ) @@ -126,7 +126,7 @@ For common PyTorch models with single input: bentoml.pytorch.save( model, "my_torch_model", - signatures={"__call__": {"batchable": True, "batchdim": 0}}, + signatures={"__call__": {"batchable": True, "batch_dim": 0}}, ) .. note:: @@ -136,7 +136,7 @@ For common PyTorch models with single input: .. code-block:: python :caption: `train.py` :emphasize-lines: 1,8 - + import my_models model = my_models.MyModel() @@ -146,9 +146,9 @@ For common PyTorch models with single input: signatures={"__call__": {"batchable": True, "batch_dim": 0}}, external_modules=[my_models], ) - + This is due to a limitation from PyTorch model serialisation, where PyTorch requires the model's source code to restore it. - + A better practice is to compile your model to `TorchScript `_ format. .. note::