Skip to content

Commit

Permalink
[BUGFIX] Provide Documentation for Importing Visualization Modules. (#…
Browse files Browse the repository at this point in the history
…347)

* Provide documentation for importing visualization modules.

* linting
  • Loading branch information
alexsherstinsky authored Feb 17, 2024
1 parent 3883ef6 commit 21933c1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code_doc_autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
https://github.com/keras-team/keras-autodoc/blob/master/keras_autodoc/autogen.py
"""

from __future__ import annotations

import inspect
import os
import re
Expand Down Expand Up @@ -106,6 +108,14 @@
},
{
"page": "user_guide/api/visualization.md",
"module_docstring": """
In order to use functions in this module, import `visualize` as follows:
```python
import ludwig
from ludwig import visualize
```
""",
"functions": [
learning_curves,
compare_performance,
Expand Down Expand Up @@ -574,6 +584,9 @@ def generate_render_functions(_methods):

if functions:
blocks.append("# Module functions\n")
module_docstring: str | None = page_data.get("module_docstring")
if module_docstring:
blocks.append(process_docstring(module_docstring))

for function in functions:
blocks.append(render_function(function, _method=False))
Expand Down
10 changes: 10 additions & 0 deletions docs/user_guide/api/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

---


In order to use functions in this module, import `visualize` as follows:

```python
import ludwig
from ludwig import visualize
```

---

## learning_curves


Expand Down

0 comments on commit 21933c1

Please sign in to comment.