Skip to content
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

Fix documentation builds #1039

Merged
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
890bbbb
Resolve unbalanced group warning
dagardner-nv Jul 11, 2023
71e9950
Don't throw an error when we're in a sphinx build
dagardner-nv Jul 11, 2023
4dd86b3
Revert "Don't throw an error when we're in a sphinx build"
dagardner-nv Jul 11, 2023
faeaee7
wip
dagardner-nv Jul 11, 2023
c29f834
Update to the latest vers avail
dagardner-nv Jul 11, 2023
71b5f2e
Move read_idx_from_tensor to an anon namespace to hide it from doxygen
dagardner-nv Jul 11, 2023
ffc4353
Fix unintentional \n in docstring
dagardner-nv Jul 11, 2023
5b801a4
Revert "Update to the latest vers avail"
dagardner-nv Jul 11, 2023
ddbbe66
Set an MORPHEUS_IN_SPHINX_BUILD env variable allowing cudf_util.cpp t…
dagardner-nv Jul 11, 2023
7f1a713
Don't attempt to call import_morpheus___lib__cudf_helpers if we're pe…
dagardner-nv Jul 11, 2023
287024b
Ignore doca code, ignore torch
dagardner-nv Jul 11, 2023
e6a148f
revert
dagardner-nv Jul 11, 2023
b550805
Devin informed me this doc was out of date and shouldn't be included …
dagardner-nv Jul 12, 2023
f93f89b
Remove --keep-going
dagardner-nv Jul 12, 2023
12380b7
wip
dagardner-nv Jul 12, 2023
4d21698
Move private impl structs to an anon namespace to hide them from doxygen
dagardner-nv Jul 12, 2023
5d3d8b6
Misc sphinx fixes
dagardner-nv Jul 12, 2023
7c5d87c
Link to orphaned docs [no ci]
dagardner-nv Jul 12, 2023
4d72f5d
wip [no ci]
dagardner-nv Jul 12, 2023
55b9d1e
Cleaning up the docs a bit
mdemoret-nv Jul 12, 2023
261e932
Add comment explaining the env variable check
dagardner-nv Jul 12, 2023
d3472b4
Fix long line
dagardner-nv Jul 12, 2023
545cbb3
Add dfp to the python path allowing linking to dfp code from docs
dagardner-nv Jul 12, 2023
99f9840
Exclude the CHECK_KAFKA macro from doxygen, this macro should be priv…
dagardner-nv Jul 12, 2023
3ec24ae
WIP [no ci]
dagardner-nv Jul 12, 2023
cde15a8
Merge branch 'branch-23.07' into david-doc-build-warnings-1028
dagardner-nv Jul 12, 2023
89422d3
Silence deprecation warnings coming from docutils, we don't have cont…
dagardner-nv Jul 12, 2023
0c6a6c8
Fix broken links
dagardner-nv Jul 12, 2023
2da79bd
Merge branch 'david-doc-build-warnings-1028-p2' into david-doc-build-…
dagardner-nv Jul 12, 2023
cf3dcd3
Remove links to non-existent documents that we haven't had time to cr…
dagardner-nv Jul 12, 2023
ed0e7fa
WIP: For now remove links to file outside of docs/source TODO: determ…
dagardner-nv Jul 12, 2023
104fc7a
Remove json from code blocks that cannot parse as valid json
dagardner-nv Jul 12, 2023
d72f9b0
Merge branch 'david-doc-build-warnings-1028-p2' into david-doc-build-…
dagardner-nv Jul 12, 2023
a46518a
Avoid calling patch_numpy_dtype_registry and register_morpheus_extens…
dagardner-nv Jul 12, 2023
a5818fb
Sphinx builds fail when the annotate decorator is used, instead defin…
dagardner-nv Jul 12, 2023
22bff4d
sys.path improvements from MDD, mock merlin, nvtabular, and exclude o…
dagardner-nv Jul 12, 2023
4fe882b
Ignore sphinx's conf.py and github_link.py from pylint, also ignore c…
dagardner-nv Jul 12, 2023
2410f8c
Pylint fixes and ignores
dagardner-nv Jul 12, 2023
c7eb676
Update doc on building docs
dagardner-nv Jul 12, 2023
0568e5a
Replace empty __all__'s
dagardner-nv Jul 12, 2023
1da989f
Adding the modules section to the toctree using markdown to remove fi…
mdemoret-nv Jul 12, 2023
c70cff6
IWYU fixes
dagardner-nv Jul 12, 2023
d6a8c08
Delete orphaned indexes
dagardner-nv Jul 13, 2023
103a6a0
Disable python stubs
dagardner-nv Jul 13, 2023
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
3 changes: 0 additions & 3 deletions docker/conda/environments/cuda11.8_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ dependencies:
- librdkafka=1.9.2
- mlflow>=2.2.1,<3
- mrc=23.07
- myst-parser==1.0.0
- networkx=3.1
- ninja=1.10
- nodejs=18.15.0
Expand All @@ -89,8 +88,6 @@ dependencies:
- rapidjson=1.1.0
- scikit-build=0.17.1
- scikit-learn=1.2.2
- sphinx
- sphinx_rtd_theme
- sysroot_linux-64=2.17
- tritonclient=2.26 # Required by NvTabular, force the version, so we get protobufs compatible with 4.21
- tqdm=4
Expand Down
15 changes: 8 additions & 7 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ find_package(Sphinx REQUIRED)

set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/source)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/html)
set(SPHINX_ARGS -b html -j auto -T -W)

add_custom_target(${PROJECT_NAME}_docs ALL
COMMAND
BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
${SPHINX_EXECUTABLE} -b html -j auto -T
${SPHINX_SOURCE} ${SPHINX_BUILD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with Sphinx")
add_custom_target(${PROJECT_NAME}_docs
COMMAND
BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} ${SPHINX_EXECUTABLE} ${SPHINX_ARGS} ${SPHINX_SOURCE} ${SPHINX_BUILD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with Sphinx"
DEPENDS morpheus-package-outputs
)

list(POP_BACK CMAKE_MESSAGE_CONTEXT)
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ mamba env update -f docs/conda_docs.yml

## Build Morpheus and Documentation
```
CMAKE_CONFIGURE_EXTRA_ARGS="-DMORPHEUS_BUILD_DOCS=ON" ./scripts/compile.sh
CMAKE_CONFIGURE_EXTRA_ARGS="-DMORPHEUS_BUILD_DOCS=ON" ./scripts/compile.sh --target morpheus_docs
```
Outputs to `build/docs/html`
21 changes: 9 additions & 12 deletions docs/conda_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@

name: morpheus
channels:
- conda-forge
- conda-forge
dependencies:
- doxygen=1.9.2
- pip
####### Morpheus Pip Dependencies (keep sorted!) #######
- pip:
- breathe==4.34.0
- exhale==0.3.6
- ipython
- myst-parser==0.17.2
- nbsphinx
- sphinx
- sphinx_rtd_theme
- breathe=4.34.0
- doxygen=1.9.2
- exhale=0.3.6
- ipython
- myst-parser=0.17.2
- nbsphinx
- sphinx
- sphinx_rtd_theme
29 changes: 27 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,28 @@
import os
import sys
import textwrap
import warnings

import packaging

# Ignore FutureWarnings coming from docutils remove this once we can upgrade to Sphinx 5.0
# https://github.com/sphinx-doc/sphinx/issues/9777
warnings.simplefilter(action='ignore', category=FutureWarning)

# Get the morpheus root from the environment variable or default to finding it relative to this file
morpheus_root = os.environ.get('MORPHEUS_ROOT', os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))

# Make sure we can access the digital fingerprinting example
sys.path.append(os.path.join(morpheus_root, 'examples/digital_fingerprinting/production/morpheus'))

# Add the Sphinx extensions directory to sys.path to allow for the github_link extension to be found
sys.path.insert(0, os.path.abspath('sphinxext'))

from github_link import make_linkcode_resolve # noqa

# Set an environment variable we can use to determine ifuncf we are building docs
os.environ["MORPHEUS_IN_SPHINX_BUILD"] = "1"

# -- Project information -----------------------------------------------------

project = 'morpheus'
Expand Down Expand Up @@ -113,7 +128,7 @@
BRIEF_MEMBER_DESC = YES
BUILTIN_STL_SUPPORT = YES
DOT_IMAGE_FORMAT = svg
EXCLUDE_PATTERNS = */tests/* */include/nvtext/* */__pycache__/*
EXCLUDE_PATTERNS = */tests/* */include/nvtext/* */__pycache__/* */doca/*
EXCLUDE_SYMBOLS = "@*" "cudf*" "py::literals" "RdKafka" "mrc*" "std*"
EXTENSION_MAPPING = cu=C++ cuh=C++
EXTRACT_ALL = YES
Expand Down Expand Up @@ -148,11 +163,21 @@
myst_heading_anchors = 4 # Generate links for markdown headers
autodoc_mock_imports = [
"cudf", # Avoid loading GPU libraries during the documentation build
"cupy", # Avoid loading GPU libraries during the documentation build
"merlin",
"morpheus.cli.commands", # Dont document the CLI in Sphinx
"morpheus.utils.nvt.mutate.annotate",
"nvtabular",
"pandas", # Avoid documenting pandas for the purposes of the dfencoder.dataframe
"tensorrt",
"torch",
"tqdm",
]

suppress_warnings = [
"myst.header" # Allow header increases from h2 to h4 (skipping h3)
]

# Config numpydoc
numpydoc_show_inherited_class_members = True
numpydoc_class_members_toctree = False
Expand All @@ -174,7 +199,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
124 changes: 0 additions & 124 deletions docs/source/control_message_guide.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/source/developer_guide/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ More information can be found at: [Contributor Code of Conduct](https://github.c

1. Find an issue to work on. The best way is to search for issues with the [good first issue](https://github.com/nv-morpheus/Morpheus/issues) label.
2. Comment on the issue stating that you are going to work on it.
3. Code! Make sure to update unit tests! Ensure the [license headers are set properly](#Licensing).
3. Code! Make sure to update unit tests! Ensure the [license headers are set properly](#licensing).
4. When done, [create your pull request](https://github.com/nv-morpheus/Morpheus/compare).
5. Wait for other developers to review your code and update code as needed.
6. Once reviewed and approved, a Morpheus developer will merge your pull request.
Expand Down Expand Up @@ -91,15 +91,15 @@ git submodule update --init --recursive

The large model and data files in this repo are stored using [Git Large File Storage (LFS)](https://git-lfs.github.com/). These files will be required for running the training/validation scripts and example pipelines for the Morpheus pre-trained models.

By default only those files stored in LFS strictly needed for running Morpheus are included when the Morpheus repository is cloned. Additional datasets can be downloaded using the `scripts/fetch_data.py` script. Refer to the section [Git LFS](README.md#git-lfs) of the [README.md](README.md) file for details on this.
By default only those files stored in LFS strictly needed for running Morpheus are included when the Morpheus repository is cloned. Additional datasets can be downloaded using the `scripts/fetch_data.py` script. Refer to the section [Git LFS](../getting_started.md#git-lfs) of the [getting_started.md](../getting_started.md) guide for details on this.

### Build in Docker Container

This workflow utilizes a Docker container to set up most dependencies ensuring a consistent environment.

#### Prerequisites

1. Ensure all [requirements](README.md#requirements) from [README.md](README.md) are met.
1. Ensure all [requirements](../getting_started.md#requirements) from [getting_started.md](../getting_started.md) are met.
1. Build the development container
```bash
./docker/build_container_dev.sh
Expand Down Expand Up @@ -159,7 +159,7 @@ This workflow utilizes a Docker container to set up most dependencies ensuring a
pip install -e /workspace
```
Once Morpheus has been built, it can be installed into the current virtual environment.
5. [Run Morpheus](./README.md#running-morpheus)
5. [Run Morpheus](../getting_started.md#running-morpheus)
```bash
morpheus run pipeline-nlp ...
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developer_guide/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Morpheus includes, as of version 23.03, a number of pre-defined module implement
custom pipeline. Modules can be thought of as units of work, which exist at a lower level than stages. Modules can
be defined, registered, chained, nested, and loaded at runtime. Modules can be written in Python or C++.

- [List of available Morpheus modules](../modules/morpheus_modules.md)
- [List of available Morpheus modules](../modules/index.md)

There are likely going to be situations that require writing a custom module, either for creating your own
reusable work units, or for creating a new compound module from a set of existing primitives. The following guides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ For each MultiAEMessage received, containing a trained model, the function uploa
associated metadata such as experiment name, run name, parameters, metrics, and the model signature. If the MLflow
server is running on Databricks, the function also applies the required permissions to the registered model.

For a complete reference, refer to: [MLflow Model Writer](./docs/source/modules/examples/digital_fingerprinting/mlflow_model_writer.md)
For a complete reference, refer to: [MLflow Model Writer](../../modules/core/mlflow_model_writer.md)

```python
@register_module(MLFLOW_MODEL_WRITER, MORPHEUS_MODULE_NAMESPACE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -932,4 +932,4 @@ class WriteToRabbitMQStage(SinglePortStage):
```

## Note
For information about testing the `RabbitMQSourceStage` and `WriteToRabbitMQStage` stages refer to [`examples/developer_guide/2_2_rabbitmq/README.md`](../../../../examples/developer_guide/2_2_rabbitmq/README.md) in the root of the Morpheus repo.
For information about testing the `RabbitMQSourceStage` and `WriteToRabbitMQStage` stages refer to `examples/developer_guide/2_2_rabbitmq/README.md` in the root of the Morpheus repo.
Loading