Skip to content

Commit

Permalink
Merge pull request #3 from mtdhuynh/docs
Browse files Browse the repository at this point in the history
UNIQUE Documentation Deployment to GitHub Pages
gscebba authored Sep 20, 2024
2 parents c3f43e6 + a02571b commit 8b1999e
Showing 8 changed files with 145 additions and 14 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Simple workflow for deploying static content to GitHub Pages
name: UNIQUE Documentation

on:
# Runs on pushes targeting the default branches
push:
branches: ["main", "master", "docs"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy-documentation:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
# Sets default bash to track changes to .bashrc or .profilerc
# See: https://github.com/conda-incubator/setup-miniconda?tab=readme-ov-file#important
defaults:
run:
shell: bash -el {0}
# Steps to run to correctly deploy documentation
steps:
- name: Checkout repository contents
uses: actions/checkout@v4

# Install dependencies
- name: Install UNIQUE dependencies
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: .conda/unique
environment-file: unique-environment.yml
auto-activate-base: false

- name: Create UNIQUE Jupyter kernel
run: make jupyter-kernel

# # Cache or restore executed notebooks
# - name: Cache/Restore Jupyter notebooks
# id: jupyter-nb-cache
# uses: actions/cache@v4
# env:
# cache-name: unique-example-notebooks
# with:
# path: ./docs/.jupyter_cache/
# key: ${{ env.cache-name }}-cache-${{ hashFiles('./notebooks/**/*.ipynb') }}
# restore-keys: |
# ${{ env.cache-name }}-cache-
# ${{ env.cache-name }}-

# Install UNIQUE with dev dependencies
- name: Install UNIQUE
run: pip install -e .[dev]

# Build documentation
- name: Build UNIQUE documentation
run: make docs

# Setup GitHub pages and deploy documentation
- name: Setup GitHub Pages
uses: actions/configure-pages@v5

- name: Upload HTML artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/build/html'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -29,16 +29,16 @@ print-info:

# Install environment
env:
mamba env create -f unique-environment.yml -p ${CONDA_ENV}
conda env create -f unique-environment.yml -p ${CONDA_ENV}
conda config --append envs_dirs ${CONDA_ENV}

jupyter-kernel:
${PYTHON} -m ipykernel install --sys-prefix --name unique --display-name unique

# Delete environment
clean-env:
mamba env remove -p ${CONDA_ENV}
mamba clean --all --yes
conda env remove -p ${CONDA_ENV}
conda clean --all --yes
rm -rf ${CONDA_ENV}

# Setup pre-commit
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
![Python](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12.1-blue)
![version](https://img.shields.io/badge/Version-v0.1.1-green)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-red.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![chemRxiv](https://img.shields.io/badge/chemRxiv-10.26434%2Fchemrxiv--2024--fmbgk-yellow)](https://doi.org/10.26434/chemrxiv-2024-fmbgk)


## Introduction
@@ -83,6 +84,20 @@ Please note that we have a [Code of Conduct](./CODE_OF_CONDUCT.md) in place to e
`UNIQUE` is licensed under the BSD 3-Clause License. See the [LICENSE](./LICENSE.md) file.


## Cite Us

If you find `UNIQUE` helpful for your work and/or research, please consider citing our work:

```bibtex
@misc{lanini2024unique,
title={UNIQUE: A Framework for Uncertainty Quantification Benchmarking},
author={Lanini, Jessica and Huynh, Minh Tam Davide and Scebba, Gaetano and Schneider, Nadine and Rodr{\'\i}guez-P{\'e}rez, Raquel},
year={2024},
doi={https://doi.org/10.26434/chemrxiv-2024-fmbgk},
}
```


## Contacts & Acknowledgements

For any questions or further details about the project, please get in touch with any of the following contacts:
13 changes: 13 additions & 0 deletions docs/source/development/contacts.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,19 @@ For any questions or further details about the project, please get in touch with
* **Nadine Schneider**, *nadine-1*[dot]*schneider*[at]*novartis*[dot]*com*
* **Raquel Rodríguez-Pérez**, *raquel*[dot]*rodriguez_perez*[at]*novartis.com*

## Cite Us

If you find `UNIQUE` helpful for your work and/or research, please consider citing our work:

```bibtex
@misc{lanini2024unique,
title={UNIQUE: A Framework for Uncertainty Quantification Benchmarking},
author={Lanini, Jessica and Huynh, Minh Tam Davide and Scebba, Gaetano and Schneider, Nadine and Rodr{\'\i}guez-P{\'e}rez, Raquel},
year={2024},
doi={https://doi.org/10.26434/chemrxiv-2024-fmbgk},
}
```

:::{image} ../_static/novartis_logo.png
:alt: Novartis logo
:align: center
2 changes: 1 addition & 1 deletion docs/source/getting_started/prepare_pipeline.md
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ Currently supported error types (`error_type_list` argument) for {py:class}`~uni
where {math}`y = label` and {math}`\hat{y} = prediction`.
:::

:::{deprecated} 0.2.1
:::{deprecated} 0.1.0
For {py:class}`~unique.input_type.base.ModelInputType` inputs, it is not necessary to specify the `metrics` argument to compute anymore.

`UNIQUE` automatically detects whether to treat the model-based inputs as regression-based predictions/ensemble variance or classification-based probabilities depending on the specified `problem_type`.
6 changes: 3 additions & 3 deletions docs/source/indepth/error_models.md
Original file line number Diff line number Diff line change
@@ -27,9 +27,9 @@ where {math}`y = label` and {math}`\hat{y} = prediction`.
{{error_model_schema}}

Given the original input features, along with computed UQ values, `UNIQUE` generates three different sets of input features to train the error predictors:
1. original model’s prediction, UQ methods, and original input features provided by the user;
2. original model’s prediction and UQ methods only;
3. original model’s prediction and non-_transformed_ UQ methods only.
1. Original model’s prediction, UQ methods, and original input features provided by the user;
2. Original model’s prediction and UQ methods only;
3. Original model’s prediction and non-_transformed_ UQ methods only.

The samples are taken from the `"TRAIN"` and `"CALIBRATION"` subsets only; the `"TEST"` subset is left aside to ensure proper validation.

27 changes: 25 additions & 2 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -21,10 +21,15 @@ myst:
version_badge: "![Version badge](https://img.shields.io/badge/Version-vUNIQUE-green)"
# See: https://github.com/executablebooks/MyST-Parser/issues/279#issuecomment-752948379
license_badge: |
:::{image} https://img.shields.io/badge/License-BSD_3--Clause-red.svg
:::{image} https://img.shields.io/badge/License-BSD_3--Clause-red
:alt: License
:target: https://opensource.org/licenses/BSD-3-Clause
:::
article_badge: |
:::{image} https://img.shields.io/badge/chemRxiv-10.26434%2Fchemrxiv--2024--fmbgk-yellow
:alt: Paper's DOI
:target: https://doi.org/10.26434/chemrxiv-2024-fmbgk
:::
high_level_schema: |
:::{figure} _static/schema_high_level.png
:alt: UNIQUE High-Level Schema
@@ -37,10 +42,12 @@ myst:

# Welcome to `UNIQUE`'s documentation!

{{python_versions}} {{version_badge | replace("UNIQUE", version)}} {{license_badge}}
{{python_versions}} {{version_badge | replace("UNIQUE", version)}} {{license_badge}} {{article_badge}}

{{logo_light}} {{logo_dark}}

## Introduction

`UNIQUE` provides methods for quantifying and evaluating the uncertainty of Machine Learning (ML) models predictions. The library allows to:
* combine and benchmark multiple uncertainty quantification (UQ) methods simultaneously;
* evaluate the goodness of UQ methods against established metrics;
@@ -51,6 +58,22 @@ myst:

{{high_level_schema}}

## Cite Us

If you find `UNIQUE` helpful for your work and/or research, please consider citing our work:

```bibtex
@misc{lanini2024unique,
title={UNIQUE: A Framework for Uncertainty Quantification Benchmarking},
author={Lanini, Jessica and Huynh, Minh Tam Davide and Scebba, Gaetano and Schneider, Nadine and Rodr{\'\i}guez-P{\'e}rez, Raquel},
year={2024},
doi={https://doi.org/10.26434/chemrxiv-2024-fmbgk},
}
```

To request more information, check out [Contacts & Acknowledgements](development/contacts.md#contacts--acknowledgements).


---

# Table of Contents
6 changes: 1 addition & 5 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
@@ -41,11 +41,7 @@ git clone https://github.com/Novartis/UNIQUE.git ./unique
cd unique
```

The project uses [`mamba`](https://mamba.readthedocs.io/en/latest/index.html) for dependencies management, which is a faster drop-in replacement for [`conda`](https://conda.io/projects/conda/en/latest/user-guide/install/index.html).

:::{tip}
If you still wish to use `conda`, you can change the backend solver by adding `--solver=libmamba` to your `conda install` standard command ([check out the docs](https://conda.github.io/conda-libmamba-solver/user-guide/#try-it-once)).
:::
The project uses [`conda`](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and/or [`mamba`](https://mamba.readthedocs.io/en/latest/index.html) for dependencies management.

To set the project up, run:

0 comments on commit 8b1999e

Please sign in to comment.