Skip to content

Commit

Permalink
Add SageMaker example to docs (#754)
Browse files Browse the repository at this point in the history
- Use plain text instead of `inline-code` in headings.

- Add `flake8-noqa-cell` to cells that are not
  Python code.
  • Loading branch information
mikemckiernan authored Dec 2, 2022
1 parent 5388a1d commit f108304
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
#
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"navigation_depth": 3,
"titles_only": True,
"analytics_id": "G-NVJ1Y1YJHK",
}
html_copy_source = False
Expand Down
4 changes: 4 additions & 0 deletions docs/source/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ subtrees:
title: Building the Recommender System
- file: examples/Building-and-deploying-multi-stage-RecSys/02-Deploying-multi-stage-RecSys-with-Merlin-Systems.ipynb
title: Deploying the Recommender System with Triton
- file: examples/sagemaker-tensorflow/index.md
title: Merlin and AWS SageMaker
entries:
- file: examples/sagemaker-tensorflow/sagemaker-merlin-tensorflow.ipynb
- file: examples/scaling-criteo/index.md
entries:
- file: examples/scaling-criteo/01-Download-Convert.ipynb
Expand Down
18 changes: 13 additions & 5 deletions examples/sagemaker-tensorflow/sagemaker-merlin-tensorflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"source": [
"### Training Script\n",
"\n",
"The training script [train.py](./train.py) in this example starts with the synthethic dataset we have created in the previous cell and produces a ranking model by performing the following tasks:\n",
"The training script [train.py](./train.py) in this example starts with the synthetic dataset we have created in the previous cell and produces a ranking model by performing the following tasks:\n",
"- Perform feature engineering and preprocessing with [NVTabular](https://github.com/NVIDIA-Merlin/NVTabular). NVTabular implements common feature engineering and preprocessing operators in easy-to-use, high-level APIs.\n",
"- Use [Merlin Models](https://github.com/NVIDIA-Merlin/models/) to train [Facebook's DLRM model](https://arxiv.org/pdf/1906.00091.pdf) in Tensorflow.\n",
"- Prepares [ensemble models](https://github.com/triton-inference-server/server/blob/main/docs/user_guide/architecture.md#ensemble-models) for serving on [Triton Inference Server](https://github.com/triton-inference-server/server).\n",
Expand Down Expand Up @@ -410,7 +410,7 @@
"id": "361e6bb6-1d68-4797-a2b5-d87d164995cc",
"metadata": {},
"source": [
"### The `Dockerfile`\n",
"### Create the Dockerfile\n",
"\n",
"The `Dockerfile` describes the image that will be used on SageMaker for training and inference.\n",
"We start from the latest stable [merlin-tensorflow](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/merlin/containers/merlin-tensorflow/tags) docker image and install the [sagemaker-training-toolkit](https://github.com/aws/sagemaker-training-toolkit) library, which makes the image compatible with Sagemaker for training models."
Expand All @@ -420,7 +420,11 @@
"cell_type": "code",
"execution_count": 5,
"id": "26ba6bc5-f6ea-4d35-88f9-23683826e45b",
"metadata": {},
"metadata": {
"tags": [
"flake8-noqa-cell"
]
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -458,7 +462,11 @@
"cell_type": "code",
"execution_count": 6,
"id": "2e40ffca-b651-413f-ac64-43f44a01e7ef",
"metadata": {},
"metadata": {
"tags": [
"flake8-noqa-cell"
]
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1385,7 +1393,7 @@
"\n",
"# Parse json header size length from the response\n",
"header_length_prefix = \"application/vnd.sagemaker-triton.binary+json;json-header-size=\"\n",
"header_length_str = response[\"ContentType\"][len(header_length_prefix) :]\n",
"header_length_str = response[\"ContentType\"][len(header_length_prefix):]\n",
"\n",
"# Read response body\n",
"result = httpclient.InferenceServerClient.parse_response_body(\n",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ commands =
changedir = {toxinidir}
deps = -rrequirements/docs.txt
commands =
python -m sphinx.cmd.build -P -b html docs/source docs/build/html
python -m sphinx.cmd.build -E -P -b html docs/source docs/build/html

[testenv:docs-multi]
; Run the multi-version build that is shown on GitHub Pages.
Expand Down

0 comments on commit f108304

Please sign in to comment.