T* tryAcquireInterface(const void* pluginInterface) */
+ --api-member-header-background-color: var(--gray-2);
+ --api-member-header-border-color: var(--sidebar-headline-color);
+ --api-member-header-text-color: var(--text);
+ --api-member-header-link-color: var(--link-color);
+
+ --api-member-background-color: var(--gray-1);
+
+ /* struct carb::Framework */
+ --api-header-text-color: var(--nv-green);
+ --api-header-border-color: var(--ui-and-graphics);
+
+ /* sphinx-design color modifications */
+ --sd-color-tabs-label-active: var(--nv-green);
+ --sd-color-tabs-underline-active: var(--nv-green);
+
+ --sd-color-tabs-label-hover: var(--nv-green-illuminate);
+ --sd-color-tabs-underline-hover: var(--nv-green-illuminate);
+}
+
+/* Custom Styles */
+:root {
+ --pst-font-size-base: none;
+ --pst-color-admonition-note: var(--pst-color-primary);
+ --pst-color-admonition-default: var(--pst-color-primary);
+ --pst-color-info: 255, 193, 7;
+ --pst-color-admonition-tip: var(--pst-color-info);
+ --pst-color-admonition-hint: var(--pst-color-info);
+ --pst-color-admonition-important: var(--pst-color-info);
+ --pst-color-warning: 245, 162, 82;
+ --pst-color-danger: 230, 101, 129;
+ --pst-color-admonition-warning: var(--pst-color-danger);
+ --pst-color-link: 118, 185, 0;
+ --pst-color-inline-code: 92, 22, 130;
+ --font-family-sans-serif: NVIDIA Sans, Helvetica, Arial, var(--pst-font-family-base-system);
+ --pst-font-family-heading: NVIDIA Sans, Helvetica, Arial, var(--pst-font-family-base-system);
+ --pst-font-family-monospace: Roboto Mono, var(--pst-font-family-monospace-system);
+ font-family: NVIDIA Sans, Helvetica, Arial,Sans-serif;
+}
+
+
+html[data-theme="light"] {
+ --pst-color-primary: var(--nv-green);
+}
+html[data-theme="dark"] {
+ --pst-color-primary: var(--nv-green);
+}
+
+/**********************************************************************************************************************/
+/* Standard Text Formatting */
+/**********************************************************************************************************************/
+
+/* Headline Formatting */
+.bd-container h1
+{
+ color: var(--h1-color);
+
+ font-weight: var(--h1-font-weight);
+ font-size: var(--h1-font-size);
+ font-style: normal;
+
+ line-height: var(--h1-line-height);
+ margin-top: 0.75em;
+ margin-bottom: 0.75em !important; /* override RTD theme */
+
+ text-transform: var(--h1-text-transform);
+}
+
+.bd-container h2
+{
+ color: var(--h2-color);
+
+ font-weight: var(--h2-font-weight);
+ font-size: var(--h2-font-size);
+ font-style: normal;
+
+ line-height: var(--h2-line-height);
+ margin-top: 1.25em;
+ margin-bottom: 0.5em !important; /* override RTD theme */
+
+ text-transform: var(--h2-text-transform);
+}
+
+.bd-container h3
+{
+ color: var(--h3-color);
+
+ font-weight: var(--h3-font-weight);
+ font-size: var(--h3-font-size);
+ font-style: normal;
+
+ line-height: var(--h3-line-height);
+ margin-top: 1.25em;
+ margin-bottom: 0.5em !important; /* override RTD theme */
+
+ text-transform: var(--h3-text-transform);
+}
+
+.bd-container h4
+{
+ color: var(--h4-color);
+
+ font-weight: var(--h4-font-weight);
+ font-size: var(--h4-font-size);
+ font-style: normal;
+
+ line-height: var(--h4-line-height);
+ margin-top: 1.25em;
+ margin-bottom: 0.5em !important; /* override RTD theme */
+
+ text-transform: var(--h4-text-transform);
+}
+
+.bd-container h5
+{
+ color: var(--h5-color);
+
+ font-size: var(--h5-font-size);
+}
+
+.bd-container h6
+{
+ color: var(--h6-color);
+
+ font-weight: var(--h6-font-weight);
+}
+
+/* Math should inherit its color */
+span[id*=MathJax-Span]
+{
+ color: inherit;
+}
+
+/* text highlighted by search */
+.rst-content .highlighted
+{
+ background: #f1c40f3b;
+ box-shadow: 0 0 0 1px #f1c40f;
+ display: inline;
+ font-weight: inherit;
+}
+
+/* a local table-of-contents messes with heading colors. make sure to use the regular heading colors */
+.rst-content .toc-backref
+{
+ color: inherit;
+}
+
+/* make links to function looks like other literals */
+.rst-content code.xref,
+.rst-content tt.xref,
+a .rst-content code,
+a .rst-content tt
+{
+ color: #e74c3c;
+ font-weight: inherit;
+}
+
+/* Link Colors */
+a
+{
+ color: var(--link-color);
+}
+
+a:visited
+{
+ color: var(--link-visited-color);
+}
+
+a:hover
+{
+ color: var(--link-hover-color);
+}
+
+/* follow branding guide for small footer text */
+footer p
+{
+ color: var(--small-font-color);
+ font-weight: var(--small-font-weight);
+ font-size: var(--small-font-size);
+ line-height: var(--small-line-height);
+}
+
+/* add nvidia logo (like www.nvidia.com) */
+html[data-theme="light"] footer.bd-footer-content p.copyright::before
+{
+ content: url(../NVIDIA-LogoBlack.svg);
+ display: block;
+ width: 110px;
+ margin: 0px;
+ position: relative;
+ left: -9px;
+}
+
+/* add nvidia logo (like www.nvidia.com) */
+html[data-theme="dark"] footer.bd-footer-content p.copyright::before
+{
+ content: url(../NVIDIA-LogoWhite.svg);
+ display: block;
+ width: 110px;
+ margin: 0px;
+ position: relative;
+ left: -9px;
+}
+
+
+/**********************************************************************************************************************/
+/* Lists */
+/**********************************************************************************************************************/
+
+/* unordered list should have a nv-green > */
+.rst-content section ul:not(.treeView):not(.collapsibleList) li:not(.collapsibleListClosed):not(.collapsibleListOpen):not(.lastChild)::marker,
+.rst-content .toctree-wrapper ul li::marker,
+.wy-plain-list-disc li::marker,
+article ul li::marker
+{
+ font-family: var(--ul-marker-font-face);
+ content: var(--ul-marker-content);
+ color: var(--nv-green);
+ font-weight: 600;
+}
+
+/* top-level ordered list should have a nv-green number */
+.rst-content section ol li::marker,
+.rst-content ol.arabic li::marker,
+.wy-plain-list-decimal li::marker,
+article ol li::marker
+{
+ color: var(--nv-green);
+ font-weight: 600;
+ list-style: var(--ol-list-style-type);
+}
+
+/* second-level ordered list should have a nv-green uppercase letter */
+.rst-content section ol ol li,
+.rst-content ol.arabic ol.arabic li,
+.wy-plain-list-decimal ol ol li,
+article ol ol li
+{
+ list-style: var(--ol-ol-list-style-type);
+}
+
+/* third-level ordered lists aren't in the branding guide. let's use numbers. */
+.rst-content section ol ol ol li,
+.rst-content ol.arabic ol.arabic ol li,
+.wy-plain-list-decimal ol ol ol li,
+article ol ol ol li
+{
+ list-style: var(--ol-ol-ol-list-style-type);
+}
+
+/* start the first paragraph immediately (don't add space at the top) */
+dd p:first-child
+{
+ margin-top: 0px;
+}
diff --git a/docs/source/_static/css/versions.css b/docs/source/_static/css/versions.css
new file mode 100644
index 000000000..cafebc54b
--- /dev/null
+++ b/docs/source/_static/css/versions.css
@@ -0,0 +1,140 @@
+/* Version Switcher */
+
+.rst-versions {
+ flex-align: bottom;
+ bottom: 0;
+ left: 0;
+ z-index: 400
+}
+
+.rst-versions a {
+ color: var(--nv-green);
+ text-decoration: none
+}
+
+.rst-versions .rst-badge-small {
+ display: none
+}
+
+.rst-versions .rst-current-version {
+ padding: 12px;
+ display: block;
+ text-align: right;
+ font-size: 90%;
+ cursor: pointer;
+ border-top: 1px solid rgba(0,0,0,.1);
+ *zoom:1
+}
+
+.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after {
+ display: table;
+ content: ""
+}
+
+.rst-versions .rst-current-version:after {
+ clear: both
+}
+
+.rst-versions .rst-current-version .fa-book {
+ float: left
+}
+
+.rst-versions .rst-current-version .icon-book {
+ float: left
+}
+
+.rst-versions .rst-current-version.rst-out-of-date {
+ background-color: #E74C3C;
+ color: #fff
+}
+
+.rst-versions .rst-current-version.rst-active-old-version {
+ background-color: #F1C40F;
+ color: #000
+}
+
+.rst-versions.shift-up {
+ height: auto;
+ max-height: 100%
+}
+
+.rst-versions.shift-up .rst-other-versions {
+ display: block
+}
+
+.rst-versions .rst-other-versions {
+ font-size: 90%;
+ padding: 12px;
+ color: gray;
+ display: none
+}
+
+.rst-versions .rst-other-versions hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ margin: 20px 0;
+ padding: 0;
+ border-top: solid 1px #413d3d
+}
+
+.rst-versions .rst-other-versions dd {
+ display: inline-block;
+ margin: 0
+}
+
+.rst-versions .rst-other-versions dd a {
+ display: inline-block;
+ padding: 6px;
+ color: var(--nv-green);
+ font-weight: 500;
+}
+
+.rst-versions.rst-badge {
+ width: auto;
+ bottom: 20px;
+ right: 20px;
+ left: auto;
+ border: none;
+ max-width: 300px
+}
+
+.rst-versions.rst-badge .icon-book {
+ float: none
+}
+
+.rst-versions.rst-badge .fa-book {
+ float: none
+}
+
+.rst-versions.rst-badge.shift-up .rst-current-version {
+ text-align: right
+}
+
+.rst-versions.rst-badge.shift-up .rst-current-version .fa-book {
+ float: left
+}
+
+.rst-versions.rst-badge.shift-up .rst-current-version .icon-book {
+ float: left
+}
+
+.rst-versions.rst-badge .rst-current-version {
+ width: auto;
+ height: 30px;
+ line-height: 30px;
+ padding: 0 6px;
+ display: block;
+ text-align: center
+}
+
+@media screen and (max-width: 768px) {
+ .rst-versions {
+ width:85%;
+ display: none
+ }
+
+ .rst-versions.shift {
+ display: block
+ }
+}
diff --git a/docs/source/_static/favicon.png b/docs/source/_static/favicon.png
new file mode 100755
index 000000000..a00f862ec
Binary files /dev/null and b/docs/source/_static/favicon.png differ
diff --git a/docs/source/_static/js/rtd-version-switcher.js b/docs/source/_static/js/rtd-version-switcher.js
new file mode 100644
index 000000000..6b4ccd0f1
--- /dev/null
+++ b/docs/source/_static/js/rtd-version-switcher.js
@@ -0,0 +1,5 @@
+var jQuery = (typeof(window) != 'undefined') ? window.jQuery : require('jquery');
+var doc = $(document);
+doc.on('click', "[data-toggle='rst-current-version']", function() {
+ $("[data-toggle='rst-versions']").toggleClass("shift-up");
+});
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
new file mode 100644
index 000000000..b053113ba
--- /dev/null
+++ b/docs/source/_templates/layout.html
@@ -0,0 +1,21 @@
+{%- extends "!layout.html" %}
+
+{%- block extrahead %}
+ {%- if analytics_id %}
+
+
+
+ {% endif %}
+
+
+
+
+{%- endblock %}
diff --git a/docs/source/_templates/merlin-ecosystem.html b/docs/source/_templates/merlin-ecosystem.html
new file mode 100644
index 000000000..a5d7eaee2
--- /dev/null
+++ b/docs/source/_templates/merlin-ecosystem.html
@@ -0,0 +1,13 @@
+
diff --git a/docs/source/_templates/versions.html b/docs/source/_templates/versions.html
index 31a125789..26e2a32fc 100644
--- a/docs/source/_templates/versions.html
+++ b/docs/source/_templates/versions.html
@@ -1,7 +1,7 @@
{%- if current_version %}
- Other Versions
+
v: {{ current_version.name }}
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b84e45a9c..ec358118b 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -26,7 +26,7 @@
# -- Project information -----------------------------------------------------
project = "Merlin Systems"
-copyright = "2022, NVIDIA" # pylint: disable=W0622
+copyright = "2024, NVIDIA" # pylint: disable=W0622
author = "NVIDIA"
@@ -37,8 +37,8 @@
# ones.
extensions = [
"myst_nb",
+ "sphinx_design",
"sphinx_multiversion",
- "sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
@@ -79,22 +79,39 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-html_theme = "sphinx_rtd_theme"
+html_theme = "sphinx_book_theme"
+html_title = "Merlin Systems"
html_theme_options = {
- "navigation_depth": 2,
- "analytics_id": "G-NVJ1Y1YJHK",
+ "repository_url": "https://github.com/NVIDIA-Merlin/systems",
+ "use_repository_button": True,
+ "footer_content_items": ["copyright.html", "last-updated.html"],
+ "extra_footer": "",
+ "logo": {"text": "NVIDIA Merlin Systems", "alt_text": "NVIDIA Merlin Systems"},
}
+html_sidebars = {
+ "**": [
+ "navbar-logo.html",
+ "search-field.html",
+ "icon-links.html",
+ "sbt-sidebar-nav.html",
+ "merlin-ecosystem.html",
+ "versions.html",
+ ]
+}
+html_favicon = "_static/favicon.png"
+html_copy_source = True
+html_show_sourcelink = False
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
+html_css_files = ["css/custom.css", "css/versions.css"]
+html_js_files = ["js/rtd-version-switcher.js"]
+html_context = {"analytics_id": "G-NVJ1Y1YJHK"}
source_suffix = [".rst", ".md"]
-html_copy_source = False
-html_show_sourcelink = False
-
if os.path.exists(gitdir):
tag_refs = subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split()
tag_refs = [tag for tag in tag_refs if re.match(r"^v[0-9]+.[0-9]+.[0-9]+$", tag)]
@@ -115,7 +132,6 @@
"merlin-core": ("https://nvidia-merlin.github.io/core/stable/", None),
}
-html_sidebars = {"**": ["versions.html"]}
html_baseurl = "https://nvidia-merlin.github.io/systems/stable/"
autodoc_inherit_docstrings = False
@@ -128,5 +144,9 @@
autosummary_generate = True
-copydirs_additional_dirs = ["../../README.md", "../../examples/"]
+copydirs_additional_dirs = [
+ "../../LICENSE",
+ "../../README.md",
+ "../../examples/",
+]
copydirs_file_rename = {"README.md": "index.md"}
diff --git a/requirements/docs.txt b/requirements/docs.txt
index 9445871d9..78ebf2d39 100644
--- a/requirements/docs.txt
+++ b/requirements/docs.txt
@@ -4,17 +4,17 @@
tritonclient[all]
tensorflow<=2.9.0
-Sphinx==3.5.4
-sphinx_rtd_theme==1.0.0
+sphinx-book-theme~=1.0.1
sphinx-multiversion@git+https://github.com/mikemckiernan/sphinx-multiversion.git
sphinxcontrib-copydirs@git+https://github.com/mikemckiernan/sphinxcontrib-copydirs.git
-recommonmark==0.7.1
+recommonmark~=0.7.1
Jinja2<3.1
-natsort==8.0.1
-myst-nb==0.13.2
-linkify-it-py==1.0.3
-sphinx-external-toc==0.2.4
-attrs==21.4.0
+natsort~=8.4.0
+myst-nb~=0.17.2
+linkify-it-py~=2.0.3
+sphinx-external-toc~=0.3.1
+attrs~=23.2.0
+sphinx_design~=0.5.0
# keep support for numpy builtin type aliases for previous tags
# numpy builtin aliases like np.str were removed in 1.24
diff --git a/tox.ini b/tox.ini
index bba7db44c..0eb76e97d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,6 +47,7 @@ sitepackages=true
; need to add some back.
setenv =
TF_GPU_ALLOCATOR=cuda_malloc_async
+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
passenv =
OPAL_PREFIX
deps =
@@ -74,6 +75,7 @@ sitepackages=true
setenv =
TF_GPU_ALLOCATOR=cuda_malloc_async
LD_LIBRARY_PATH=/opt/tritonserver/backends/pytorch:{env:LD_LIBRARY_PATH}
+ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
passenv =
OPAL_PREFIX
deps =