Skip to content

๐Ÿ“š Update Documentation and Docstrings #2468

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

Merged
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
5e87a9b
update conf.py
samet-akcay Dec 15, 2024
becae28
Remove requirements.txt
samet-akcay Dec 16, 2024
fae23f1
Remove topic guide
samet-akcay Dec 16, 2024
af82bde
Update conf.py
samet-akcay Dec 16, 2024
333fa8b
Add api guide landing page
samet-akcay Dec 16, 2024
d29723a
Add data landing page
samet-akcay Dec 16, 2024
7afe57f
Add data documentation
samet-akcay Dec 16, 2024
59037a4
Deleted files
samet-akcay Dec 17, 2024
2b972ba
Deleted files
samet-akcay Dec 17, 2024
9bf2195
Deleted files
samet-akcay Dec 17, 2024
5e125c4
Modified files
samet-akcay Dec 17, 2024
6f1a1f6
Modified files
samet-akcay Dec 17, 2024
f4052c5
Update callback docstrings
samet-akcay Dec 17, 2024
c007966
Update cli docstrings
samet-akcay Dec 17, 2024
0257cbe
Update callback docstrings
samet-akcay Dec 17, 2024
98e12ba
Update dataclasses and datamodules docstrings
samet-akcay Dec 17, 2024
2efa77f
Update datasets docstrings
samet-akcay Dec 17, 2024
139421a
Update utils docstrings
samet-akcay Dec 17, 2024
61944bf
Update validators docstrings
samet-akcay Dec 17, 2024
a2f5f4c
Add the remaining docstrings
samet-akcay Dec 17, 2024
1993ac9
Add deploy docstrings
samet-akcay Dec 17, 2024
26382b8
Add engine docstrings
samet-akcay Dec 17, 2024
5959038
Add logger docstrings
samet-akcay Dec 17, 2024
1c44337
Add pimo docstrings
samet-akcay Dec 17, 2024
98713cd
Add threshold docstrings
samet-akcay Dec 17, 2024
86c845d
Add threshold docstrings
samet-akcay Dec 17, 2024
bb5f24b
Add model components docstrings
samet-akcay Dec 17, 2024
ff01f85
add cfa
samet-akcay Dec 17, 2024
cdd8f85
add cflow
samet-akcay Dec 17, 2024
3c647c5
add csflow
samet-akcay Dec 17, 2024
ac17d7b
add dfm
samet-akcay Dec 17, 2024
0916acd
add draem
samet-akcay Dec 17, 2024
28b53a3
add dsr
samet-akcay Dec 17, 2024
bc046d0
Add efficient-ad
samet-akcay Dec 18, 2024
4debf26
add fastflow
samet-akcay Dec 18, 2024
9bf9290
add fre
samet-akcay Dec 18, 2024
43dede5
add ganomaly
samet-akcay Dec 18, 2024
0a41128
add patchcore
samet-akcay Dec 18, 2024
3045da1
add reverse distillation
samet-akcay Dec 18, 2024
0ca272c
add stfpm
samet-akcay Dec 18, 2024
afb5799
add uflow
samet-akcay Dec 18, 2024
bd07708
add vlm-ad
samet-akcay Dec 18, 2024
00daacd
add winclip
samet-akcay Dec 18, 2024
a5a82ca
Add ai-vad
samet-akcay Dec 18, 2024
20fc51c
Add pipelines
samet-akcay Dec 18, 2024
86bffa9
Add pre and post processors
samet-akcay Dec 18, 2024
3a795c1
Add utils
samet-akcay Dec 18, 2024
eaf0df4
Add visualizer
samet-akcay Dec 18, 2024
334b762
Update the licenses
samet-akcay Dec 18, 2024
f8ee010
Revert validators
samet-akcay Dec 18, 2024
e84e96d
Revert item_visualizer.py
samet-akcay Dec 19, 2024
0fba1b2
Fix visualization tests due to a deprecated function in matplotlib
samet-akcay Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS = -j auto
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
Expand Down
8 changes: 0 additions & 8 deletions docs/requirements.txt

This file was deleted.

60 changes: 49 additions & 11 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@
# Copyright (C) 2022-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

import sys
from pathlib import Path

# Define the path to your module using Path
module_path = Path(__file__).parent.parent / "src"
# Define paths
project_root = Path(__file__).parent.parent.parent
module_path = project_root / "src"
examples_path = project_root / "examples"

# Insert the path to sys.path
# Insert paths to sys.path
sys.path.insert(0, str(module_path.resolve()))
sys.path.insert(0, str(project_root.resolve()))

project = "Anomalib"
copyright = "2023, Intel OpenVINO" # noqa: A001
author = "Intel OpenVINO"
release = "2022"
copyright = "Intel Corporation" # noqa: A001
author = "Intel Corporation"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration


extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
Expand All @@ -39,20 +38,49 @@
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
"sphinx.ext.intersphinx",
"sphinx.ext.autosectionlabel",
]

# MyST configuration
myst_enable_extensions = [
"colon_fence",
# other MyST extensions...
"linkify",
"substitution",
"tasklist",
"deflist",
"fieldlist",
]

# Add separate setting for eval-rst
myst_enable_eval_rst = True

# Notebook handling
nbsphinx_allow_errors = True
nbsphinx_execute = "auto" # Execute notebooks during build
nbsphinx_timeout = 300 # Timeout in seconds

# Templates and patterns
templates_path = ["_templates"]
exclude_patterns: list[str] = []
exclude_patterns: list[str] = [
"_build",
"**.ipynb_checkpoints",
"**/.pytest_cache",
"**/.git",
"**/.github",
"**/.venv",
"**/*.egg-info",
"**/build",
"**/dist",
]

# Automatic exclusion of prompts from the copies
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies
copybutton_exclude = ".linenos, .gp, .go"

# Enable section anchors for cross-referencing
autosectionlabel_prefix_document = True

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

Expand All @@ -65,3 +93,13 @@
"text": "Anomalib",
},
}

# Add references to example files
html_context = {"examples_path": str(examples_path)}

# External documentation references
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"torch": ("https://pytorch.org/docs/stable", None),
"lightning": ("https://lightning.ai/docs/pytorch/stable/", None),
}
9 changes: 0 additions & 9 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,11 @@ Learn more about anomalib API and CLI.
Learn how to use anomalib for your anomaly detection tasks.
:::

:::{grid-item-card} {octicon}`telescope` Topic Guide
:link: markdown/guides/topic/index
:link-type: doc

Learn more about the internals of anomalib.
:::

:::{grid-item-card} {octicon}`code` Developer Guide
:link: markdown/guides/developer/index
:link-type: doc

Learn how to develop and contribute to anomalib.
:::

::::

Expand All @@ -98,7 +90,6 @@ markdown/get_started/migration

markdown/guides/reference/index
markdown/guides/how_to/index
markdown/guides/topic/index
markdown/guides/developer/index
```

Expand Down
86 changes: 84 additions & 2 deletions docs/source/markdown/guides/reference/callbacks/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,90 @@
# Callbacks

```{grid} 2
:gutter: 2

:::{card} {octicon}`download` Model Checkpoint
:link: checkpoint
:link-type: ref

Save and manage model checkpoints during training.
:::

:::{card} {octicon}`graph` Graph Logger
:link: graph-logger
:link-type: ref

Log model computation graphs for visualization.
:::

:::{card} {octicon}`package` Load Model
:link: load-model
:link-type: ref

Load pre-trained models and weights.
:::

:::{card} {octicon}`table` Tile Configuration
:link: tile-configuration
:link-type: ref

Configure and manage image tiling settings.
:::

:::{card} {octicon}`clock` Timer
:link: timer
:link-type: ref

Track and measure execution times during training.
:::
```

(checkpoint)=

## {octicon}`download` Model Checkpoint

```{eval-rst}
.. automodule:: anomalib.callbacks.checkpoint
:members:
:show-inheritance:
```

(graph-logger)=

## {octicon}`graph` Graph Logger

```{eval-rst}
.. automodule:: anomalib.callbacks.graph
:members:
:show-inheritance:
```

(load-model)=

## {octicon}`package` Load Model

```{eval-rst}
.. automodule:: anomalib.callbacks.model_loader
:members:
:show-inheritance:
```

(tile-configuration)=

## {octicon}`table` Tile Configuration

```{eval-rst}
.. automodule:: anomalib.callbacks.tile_configuration
:members:
:show-inheritance:
```

(timer)=

## {octicon}`clock` Timer

```{eval-rst}
.. automodule:: anomalib.callbacks
.. automodule:: anomalib.callbacks.timer
:members:
:exclude-members: get_visualization_callbacks
:show-inheritance:
```
2 changes: 1 addition & 1 deletion docs/source/markdown/guides/reference/cli/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CLI

```{eval-rst}
.. automodule:: anomalib.cli
.. automodule:: anomalib.cli.cli
:members:
:show-inheritance:
```
7 changes: 0 additions & 7 deletions docs/source/markdown/guides/reference/data/base/datamodule.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/markdown/guides/reference/data/base/dataset.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/markdown/guides/reference/data/base/depth.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/source/markdown/guides/reference/data/base/index.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/markdown/guides/reference/data/base/video.md

This file was deleted.

Loading
Loading