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

Improve documentation for evaluate package #543

Merged
merged 31 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bb22904
Changed documentation theme to sphinx-book-theme
rjavadi Jan 9, 2024
3c206bd
Added details about Pandoc requirment
rjavadi Jan 9, 2024
d3f2a68
Added initial document for accuracy.py
rjavadi Jan 9, 2024
4e00d61
Fix pre-commit hook errors
rjavadi Jan 11, 2024
af594e8
Added confusion matrix doc
rjavadi Jan 15, 2024
2d03ecc
Add auroc doc and fix titles
rjavadi Jan 15, 2024
c4e6e89
Add average precision docs
rjavadi Jan 15, 2024
10cfa48
Added more documents for metrics
rjavadi Jan 19, 2024
5fdcacb
Add index for user guide in side bar
rjavadi Jan 27, 2024
89fdb67
Minor patches (#542)
fcogidi Jan 9, 2024
7707f6d
Add Precision-Recall Curve to experimental metrics (#544)
fcogidi Jan 10, 2024
e5a7315
Add ROC curve (#545)
fcogidi Jan 11, 2024
18bc32d
Add AUROC (#546)
fcogidi Jan 12, 2024
ec51f2c
Add regression metrics (#547)
fcogidi Jan 16, 2024
3160750
Integrate experimental metrics with other modules (#549)
fcogidi Jan 30, 2024
5e81e13
Changed documentation theme to sphinx-book-theme
rjavadi Jan 9, 2024
be764ad
Fix pyproject.toml file, and update dependencies
amrit110 Jan 30, 2024
4c3afbf
Don't update deps
amrit110 Jan 30, 2024
5e465d7
Pre-commit fixes
amrit110 Jan 30, 2024
239a4e5
Add doc for ROC Curve
rjavadi Jan 30, 2024
35d5810
Fix footer in docs
rjavadi Feb 8, 2024
7a725ab
Bump to 0.2.3
amrit110 Feb 1, 2024
87c1fd4
Add logo and css fixes
amrit110 Feb 8, 2024
c88076c
Fix formatting of conf.py file
amrit110 Feb 9, 2024
fd25bcb
Small fix
amrit110 Feb 9, 2024
168b104
Merge branch 'main' into improve-documentation-for-evaluate-package
amrit110 Feb 9, 2024
0b1e34d
Merge branch 'main' into improve-documentation-for-evaluate-package
amrit110 Feb 9, 2024
5fa38ae
Move evaluation metrics docs under API reference
rjavadi Feb 9, 2024
4d6ab52
Fix poetry build
amrit110 Feb 10, 2024
3a131ee
Improve documentation structure
amrit110 Feb 11, 2024
12e05fe
Formatting fixes
amrit110 Feb 11, 2024
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ guidelines.

## 📚 [Documentation](https://vectorinstitute.github.io/cyclops/)

If you need to build the documentations locally, make sure to install ``Pandoc`` in addition to ``docs`` poetry group.


## 📓 Notebooks

Expand Down
50 changes: 50 additions & 0 deletions docs/source/_static/css/cyclops.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
footer span.commit code,
.rst-content pre.literal-block,
.rst-content div[class^='highlight'] pre,
.rst-content .linenodiv pre,
.rst-content tt,
.rst-content code,
.rst-content pre,
.rst-content kbd,
.rst-content samp {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.8rem;
}

footer {
color: var(--text-color);
}
footer .footer-small-text {
font-weight: 300;
font-size: 0.9rem;
}
footer .copyright {
font-weight: 300;
font-size: 0.8rem;
}
footer div.logo {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: 0px;
padding: 10px 0px 0px 0px;
}
footer a.logo {
/* Using flex here (to vertically align the child img) causes aspect-ratio issues */
flex-basis: 120px;
margin: 10px auto 10px auto;
text-align: center;
}
footer a.logo:hover {
text-decoration: none;
}
footer span.logo {
display: inline-block;
height: 100%;
vertical-align: middle;
}
footer img.logo {
display: inline-block;
vertical-align: middle;
height: auto;
}
File renamed without changes.
26 changes: 26 additions & 0 deletions docs/source/_templates/sections/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% block extrafooter %}

<div class="footer-container" style="text-align: center;">
<div class="footer-small-text">
<br> All <a href="https://github.com/VectorInstitute/cyclops">source code for cyclops</a> is freely available under the terms of an <a href="https://opensource.org/licenses/Apache-2.0">Apache-2.0</a> license.
</div>

<div class="footer-small-text">
This work is made possible due to the data obtained from the <a href="https://www.geminimedicine.ca/">GEMINI study</a>.
</div>

<hr/>

<div class="logo">
<a class="logo" href="https://vectorinstitute.ai/">
<span class="logo"></span>
<img alt="Logo of the Vector Institute" style="width:90px; max-width:90px;" src="{{ pathto('_static/logos/vector_logo.png', 1) }}" />
</a>
<a class="logo" href="https://www.geminimedicine.ca/">
<span class="logo"></span>
<img alt="Logo of GEMINI" style="width:90px; max-width:90px;" src="{{ pathto('_static/logos/gemini_logo.png', 1) }}" />
</a>
</div>
</div>

{% endblock %}
6 changes: 5 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ API Reference
=============

.. toctree::
:maxdepth: 1
:glob:

reference/api/cyclops.data.rst
reference/api/cyclops.tasks.rst
reference/api/cyclops.evaluate.rst
reference/api/evaluator.rst
reference/api/fairness_evaluator.rst
reference/api/metrics.rst
reference/api/cyclops.monitor.rst
reference/api/cyclops.report.rst
21 changes: 19 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True

html_theme_options = {
"collapse_navigation": False,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}

intersphinx_mapping = {
"python": ("https://docs.python.org/3.9/", None),
"numpy": ("http://docs.scipy.org/doc/numpy/", None),
Expand All @@ -84,10 +92,19 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "theme"
html_theme_path = ["."]
html_theme = "sphinx_book_theme"

# 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/cyclops.css"]
html_logo = "_static/cyclops_logo-dark.png"
html_favicon = "_static/favicon.ico"
html_theme_options = {
"logo": { # type: ignore
"text": "cyclops documentation",
"image_light": "_static/cyclops_logo-dark.png",
"image_dark": "_static/cyclops_logo-dark.png",
},
}
34 changes: 34 additions & 0 deletions docs/source/developing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
🧑🏿‍💻 Developing
=======================

Using poetry
------------

The development environment can be set up using `poetry <https://python-poetry.org/docs/#installation>`__. Hence, make sure it is installed and then run:

.. code:: bash
python3 -m poetry install
source $(poetry env info --path)/bin/activate
In order to install dependencies for testing (codestyle, unit tests, integration tests), run:

.. code:: bash
python3 -m poetry install --with test
API documentation is built using `Sphinx <https://www.sphinx-doc.org/en/master/>`__ and can be locally built by:

.. code:: bash
python3 -m poetry install --with docs
cd docs
make html SPHINXOPTS="-D nbsphinx_allow_errors=True"
If you need to build the documentations locally, make sure to install ``Pandoc`` in addition to ``docs`` poetry group.

Contributing
------------

Contributing to cyclops is welcomed. See `Contributing <https://vectorinstitute.github.io/cyclops/api/contributing.html>`__ for guidelines.
2 changes: 2 additions & 0 deletions docs/source/evaluation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Evaluation
==========
5 changes: 3 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Welcome to cyclops's documentation!
:maxdepth: 2
:caption: Contents:

intro
contributing
user_guide
tutorials
developing
contributing
api
29 changes: 29 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Installation
============

Using pip
---------

.. code:: bash
python3 -m pip install pycyclops
``cyclops`` has many optional dependencies that are used for specific functionality. For example, the `monai <https://github.com/Project-MONAI/MONAI>`__ library is used for loading DICOM images to create datasets. All optional dependencies can be installed with ``pycyclops[all]``, and specific sets of dependencies are listed in the sections below.

+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| Dependency | pip extra | Notes |
+=============================+==========================+===============================================================================================================+
| xgboost | xgboost | Allows use of `XGBoost <https://xgboost.readthedocs.io/en/stable/>`__ model |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| torch | torch | Allows use of `PyTorch <https://pytorch.org/>`__ models |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| torchvision | torchvision | Allows use of `Torchvision <https://pytorch.org/vision/stable/index.html>`__ library |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| torchxrayvision | torchxrayvision | Uses `TorchXRayVision <https://mlmed.org/torchxrayvision/>`__ library |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| monai | monai | Uses `MONAI <https://github.com/Project-MONAI/MONAI>`__ to load and transform images |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| alibi | alibi | Uses `Alibi <https://docs.seldon.io/projects/alibi/en/stable/>`__ for additional explainability functionality |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
| alibi-detect | alibi-detect | Uses `Alibi Detect <https://docs.seldon.io/projects/alibi-detect/en/stable/>`__ for dataset shift detection |
+-----------------------------+--------------------------+---------------------------------------------------------------------------------------------------------------+
130 changes: 0 additions & 130 deletions docs/source/intro.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/model_report.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Model Report
============
2 changes: 2 additions & 0 deletions docs/source/monitoring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Monitoring
==========
Loading
Loading