From 51e368b4fc89b76f1ae62cbb035de63719a58282 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Mon, 3 Jul 2023 12:25:54 +0000 Subject: [PATCH 1/5] add apis --- docs/Makefile | 2 +- docs/source/api_overview.rst | 4 ++++ docs/source/conf.py | 2 ++ docs/source/toc.yaml | 19 +++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 docs/source/api_overview.rst diff --git a/docs/Makefile b/docs/Makefile index 5f3828f39..1fca4c922 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -13,7 +13,7 @@ help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) clean: - rm -rf build source/examples + rm -rf build source/examples NVTabular core dataloader models systems Transformers4Rec source/api_core/ source/api_dataloader.rst source/api_models.rst source/api_nvtabular.rst source/api_systems.rst source/api_transformers4rec/ .PHONY: help clean Makefile diff --git a/docs/source/api_overview.rst b/docs/source/api_overview.rst new file mode 100644 index 000000000..3997ee475 --- /dev/null +++ b/docs/source/api_overview.rst @@ -0,0 +1,4 @@ +API Documentation +===================== + +NVIDIA Merlin is an open source framework. It consists a collection of libraries, designed to integrate well together. \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 786e47bed..8036ba64b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,7 @@ from natsort import natsorted +sys.path.insert(0, os.path.abspath("/models/")) docs_dir = os.path.dirname(__file__) repodir = os.path.abspath(os.path.join(__file__, r"../../..")) gitdir = os.path.join(repodir, r".git") @@ -26,6 +27,7 @@ "sphinx_multiversion", "sphinx_rtd_theme", "sphinx.ext.autodoc", + "sphinx.ext.autosummary", "sphinx.ext.coverage", "sphinx.ext.githubpages", "sphinx.ext.napoleon", diff --git a/docs/source/toc.yaml b/docs/source/toc.yaml index 3140d57c0..9ec1125c7 100644 --- a/docs/source/toc.yaml +++ b/docs/source/toc.yaml @@ -52,5 +52,24 @@ subtrees: title: Deploy the HugeCTR Model with Triton - file: examples/scaling-criteo/04-Triton-Inference-with-Merlin-Models-TensorFlow.ipynb title: Deploy the TensorFlow Model with Triton + - file: api_overview + title: API Documentation + entries: + - file: api_core/merlin.dag + title: merlin.dag + - file: api_dataloader + title: merlin.loader + - file: api_core/merlin.io + title: merlin.io + - file: api_models + title: merlin.models + - file: api_core/merlin.schema + title: merlin.schema + - file: api_systems + title: merlin.systems + - file: api_nvtabular + title: nvtabular + - file: ./api_transformers4rec/modules + title: transformers4rec - file: containers.rst - file: support_matrix/index.rst \ No newline at end of file From af70516042208f8ac3d715edfa18fe63966bda59 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Mon, 3 Jul 2023 12:27:17 +0000 Subject: [PATCH 2/5] add changes tox.ini --- tox.ini | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 132992517..815d0af55 100644 --- a/tox.ini +++ b/tox.ini @@ -61,14 +61,49 @@ commands = ; Generates documentation with sphinx. There are other steps in the Github Actions workflow ; to publish the documentation on release. changedir = {toxinidir} -deps = -rdocs/requirements-doc.txt +deps = + -rdocs/requirements-doc.txt + tensorflow + torch + torchmetrics + git+https://github.com/NVIDIA-Merlin/core.git + git+https://github.com/NVIDIA-Merlin/dataloader.git + git+https://github.com/NVIDIA-Merlin/models.git + git+https://github.com/NVIDIA-Merlin/NVTabular.git + git+https://github.com/NVIDIA-Merlin/systems.git + git+https://github.com/NVIDIA-Merlin/Transformers4Rec.git + +allowlist_externals = + git + cp commands = + git clone --depth 1 https://github.com/NVIDIA-Merlin/core.git ./docs/core + cp -r ./docs/core/docs/source/api ./docs/source/api_core/ + git clone --depth 1 https://github.com/NVIDIA-Merlin/dataloader.git ./docs/dataloader + cp ./docs/dataloader/docs/source/api.rst ./docs/source/api_dataloader.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/models.git ./docs/models + cp ./docs/models/docs/source/api.rst ./docs/source/api_models.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/NVTabular.git ./docs/NVTabular + cp ./docs/NVTabular/docs/source/api.rst ./docs/source/api_nvtabular.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/systems.git ./docs/systems + cp ./docs/systems/docs/source/api.rst ./docs/source/api_systems.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/Transformers4Rec.git ./docs/Transformers4Rec + cp -r ./docs/Transformers4Rec/docs/source/api ./docs/source/api_transformers4rec/ 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. changedir = {toxinidir} -deps = -rdocs/requirements-doc.txt +deps = + -rdocs/requirements-doc.txt + git+https://github.com/NVIDIA-Merlin/models.git + git+https://github.com/NVIDIA-Merlin/NVTabular.git + git+https://github.com/NVIDIA-Merlin/core.git + git+https://github.com/NVIDIA-Merlin/systems.git + git+https://github.com/NVIDIA-Merlin/dataloader.git +allowlist_externals = + git clone https://github.com/NVIDIA-Merlin/core.git commands = sphinx-multiversion --dump-metadata docs/source docs/build/html | jq "keys" - sphinx-multiversion docs/source docs/build/html + sphinx-multiversion docs/source docs/build/html \ No newline at end of file From ab6e41649109da77aeb31443e4661daa3fcb0bd3 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Mon, 3 Jul 2023 12:40:30 +0000 Subject: [PATCH 3/5] trigger --- docs/source/toc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/toc.yaml b/docs/source/toc.yaml index 9ec1125c7..d2ab903c3 100644 --- a/docs/source/toc.yaml +++ b/docs/source/toc.yaml @@ -70,6 +70,6 @@ subtrees: - file: api_nvtabular title: nvtabular - file: ./api_transformers4rec/modules - title: transformers4rec + title: transformers4re - file: containers.rst - - file: support_matrix/index.rst \ No newline at end of file + - file: support_matrix/index.rst From ab942303fd20e13f8de1c4db2e034bfd74ca58ee Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Tue, 4 Jul 2023 09:26:20 +0000 Subject: [PATCH 4/5] update docs --- docs/requirements-doc.txt | 16 +++++++++++++++ docs/source/_templates/layout.html | 10 +--------- tox.ini | 32 ++++++++++++++---------------- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index 99d56aa85..8804a64ff 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -19,3 +19,19 @@ PyGithub<1.56 semver>=2,<3 pytest<7.3 coverage<6.6 + +# Libraries +tensorflow +torch +torchmetrics +jax[cpu] +tritonclient[all] +requests>=2.10,<3 +treelite==2.4.0 +treelite_runtime==2.4.0 +git+https://github.com/NVIDIA-Merlin/core.git +git+https://github.com/NVIDIA-Merlin/dataloader.git +git+https://github.com/NVIDIA-Merlin/models.git +git+https://github.com/NVIDIA-Merlin/NVTabular.git +git+https://github.com/NVIDIA-Merlin/systems.git +git+https://github.com/NVIDIA-Merlin/Transformers4Rec.git \ No newline at end of file diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index 76917f64c..18b490120 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -1,9 +1 @@ -{% extends "!layout.html" %} -{% block extrabody %} - -{% endblock %} +{% extends "!layout.html" %} \ No newline at end of file diff --git a/tox.ini b/tox.ini index 815d0af55..e2d2ee9f6 100644 --- a/tox.ini +++ b/tox.ini @@ -62,17 +62,7 @@ commands = ; to publish the documentation on release. changedir = {toxinidir} deps = - -rdocs/requirements-doc.txt - tensorflow - torch - torchmetrics - git+https://github.com/NVIDIA-Merlin/core.git - git+https://github.com/NVIDIA-Merlin/dataloader.git - git+https://github.com/NVIDIA-Merlin/models.git - git+https://github.com/NVIDIA-Merlin/NVTabular.git - git+https://github.com/NVIDIA-Merlin/systems.git - git+https://github.com/NVIDIA-Merlin/Transformers4Rec.git - + -rdocs/requirements-doc.txt allowlist_externals = git cp @@ -97,13 +87,21 @@ commands = changedir = {toxinidir} deps = -rdocs/requirements-doc.txt - git+https://github.com/NVIDIA-Merlin/models.git - git+https://github.com/NVIDIA-Merlin/NVTabular.git - git+https://github.com/NVIDIA-Merlin/core.git - git+https://github.com/NVIDIA-Merlin/systems.git - git+https://github.com/NVIDIA-Merlin/dataloader.git allowlist_externals = - git clone https://github.com/NVIDIA-Merlin/core.git + git + cp commands = + git clone --depth 1 https://github.com/NVIDIA-Merlin/core.git ./docs/core + cp -r ./docs/core/docs/source/api ./docs/source/api_core/ + git clone --depth 1 https://github.com/NVIDIA-Merlin/dataloader.git ./docs/dataloader + cp ./docs/dataloader/docs/source/api.rst ./docs/source/api_dataloader.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/models.git ./docs/models + cp ./docs/models/docs/source/api.rst ./docs/source/api_models.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/NVTabular.git ./docs/NVTabular + cp ./docs/NVTabular/docs/source/api.rst ./docs/source/api_nvtabular.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/systems.git ./docs/systems + cp ./docs/systems/docs/source/api.rst ./docs/source/api_systems.rst + git clone --depth 1 https://github.com/NVIDIA-Merlin/Transformers4Rec.git ./docs/Transformers4Rec + cp -r ./docs/Transformers4Rec/docs/source/api ./docs/source/api_transformers4rec/ sphinx-multiversion --dump-metadata docs/source docs/build/html | jq "keys" sphinx-multiversion docs/source docs/build/html \ No newline at end of file From 216fed0e56ace57d299d1de5d9b7b891230ec156 Mon Sep 17 00:00:00 2001 From: Benedikt Schifferer Date: Thu, 6 Jul 2023 15:01:42 +0000 Subject: [PATCH 5/5] fix dep --- docs/requirements-doc.txt | 2 +- docs/source/api_overview.rst | 4 ---- docs/source/toc.yaml | 38 ++++++++++++++++++------------------ 3 files changed, 20 insertions(+), 24 deletions(-) delete mode 100644 docs/source/api_overview.rst diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index 6bbfc3bb2..4d1fbfecb 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -20,7 +20,7 @@ pytest<7.3 coverage<6.6 # Libraries -tensorflow +tensorflow>=2.9,<2.13 torch torchmetrics jax[cpu] diff --git a/docs/source/api_overview.rst b/docs/source/api_overview.rst deleted file mode 100644 index 3997ee475..000000000 --- a/docs/source/api_overview.rst +++ /dev/null @@ -1,4 +0,0 @@ -API Documentation -===================== - -NVIDIA Merlin is an open source framework. It consists a collection of libraries, designed to integrate well together. \ No newline at end of file diff --git a/docs/source/toc.yaml b/docs/source/toc.yaml index d2ab903c3..4eafd0382 100644 --- a/docs/source/toc.yaml +++ b/docs/source/toc.yaml @@ -52,24 +52,24 @@ subtrees: title: Deploy the HugeCTR Model with Triton - file: examples/scaling-criteo/04-Triton-Inference-with-Merlin-Models-TensorFlow.ipynb title: Deploy the TensorFlow Model with Triton - - file: api_overview - title: API Documentation - entries: - - file: api_core/merlin.dag - title: merlin.dag - - file: api_dataloader - title: merlin.loader - - file: api_core/merlin.io - title: merlin.io - - file: api_models - title: merlin.models - - file: api_core/merlin.schema - title: merlin.schema - - file: api_systems - title: merlin.systems - - file: api_nvtabular - title: nvtabular - - file: ./api_transformers4rec/modules - title: transformers4re - file: containers.rst - file: support_matrix/index.rst + + - caption: API documentation + entries: + - file: api_core/merlin.dag + title: merlin.dag + - file: api_dataloader + title: merlin.loader + - file: api_core/merlin.io + title: merlin.io + - file: api_models + title: merlin.models + - file: api_core/merlin.schema + title: merlin.schema + - file: api_systems + title: merlin.systems + - file: api_nvtabular + title: nvtabular + - file: api_transformers4rec/modules + title: transformers4rec