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

Add structure for mkdocs instead of Sphinx #225

Merged
merged 15 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The framework consists of four main parts, as demonstrated in the flowchart belo
- ActiveLearningLoop

<p align="center">
<img src="./docs/literature/images/Baalscheme.svg">
<img src="docs/research/literature/images/Baalscheme.svg">
</p>

To get started, wrap your dataset in our _[**ActiveLearningDataset**](baal/active/dataset.py)_ class. This will ensure
Expand Down
21 changes: 4 additions & 17 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Minimal makefile for Sphinx documentation
# Minimal makefile for Mkdocs documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build


# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
build:
mkdocs build

server:
open _build/html/index.html
mkdocs watch
6 changes: 0 additions & 6 deletions docs/_templates/layout.html

This file was deleted.

11 changes: 5 additions & 6 deletions docs/api/bayesian.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ model = MCDropoutConnectModule(model, layers=["Linear"], weight_dropout=0.5)

## API

```eval_rst
.. autoclass:: baal.bayesian.dropout.MCDropoutModule
:members: __init__
### baal.bayesian.dropout.MCDropoutModule

..autoclass:: baal.bayesian.weight_drop.MCDropoutConnectModule
:members: __init__
::: baal.bayesian.dropout.MCDropoutModule

```
### baal.bayesian.weight_drop.MCDropoutConnectModule

::: baal.bayesian.weight_drop.MCDropoutConnectModule
7 changes: 3 additions & 4 deletions docs/api/calibration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Calibration Wrapper

```eval_rst
.. autoclass:: baal.calibration.DirichletCalibrator
:members:
```
### baal.calibration.DirichletCalibrator

::: baal.calibration.DirichletCalibrator
11 changes: 4 additions & 7 deletions docs/api/compatibility/huggingface.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
## HuggingFace Compatibility

```eval_rst
.. autoclass:: baal.transformers_trainer_wrapper.BaalTransformersTrainer
:members: predict_on_dataset, predict_on_dataset_generator
**baal.transformers_trainer_wrapper.BaalTransformersTrainer**
::: baal.transformers_trainer_wrapper.BaalTransformersTrainer

.. autoclass:: baal.active.nlp_datasets.HuggingFaceDatasets
:members:

```
**baal.active.dataset.nlp_datasets.HuggingFaceDatasets**
::: baal.active.dataset.nlp_datasets.HuggingFaceDatasets
14 changes: 6 additions & 8 deletions docs/api/compatibility/pytorch-lightning.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
## Pytorch Lightning Compatibility

```eval_rst
.. autoclass:: baal.utils.pytorch_lightning.ResetCallback
:members: on_train_start
**baal.utils.pytorch_lightning.ResetCallback**
::: baal.utils.pytorch_lightning.ResetCallback

.. autoclass:: baal.utils.pytorch_lightning.BaalTrainer
:members: predict_on_dataset, predict_on_dataset_generator
**baal.utils.pytorch_lightning.BaalTrainer**
::: baal.utils.pytorch_lightning.BaalTrainer

.. autoclass:: baal.utils.pytorch_lightning.BaaLDataModule
:members: pool_dataloader
```
**baal.utils.pytorch_lightning.BaaLDataModule**
::: baal.utils.pytorch_lightning.BaaLDataModule
14 changes: 6 additions & 8 deletions docs/api/dataset_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ assert al_dataset.pool.transform is None

### API

```eval_rst
.. autoclass:: baal.active.ActiveLearningDataset
:members:
### baal.active.ActiveLearningDataset
::: baal.active.ActiveLearningDataset

.. autoclass:: baal.active.ActiveLearningLoop
:members:
### baal.active.ActiveLearningLoop
::: baal.active.ActiveLearningLoop

.. autoclass:: baal.active.FileDataset
:members:
```
### baal.active.FileDataset
::: baal.active.FileDataset
15 changes: 8 additions & 7 deletions docs/api/heuristics.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ BALD(reduction="mean")

### API

```eval_rst
.. autoclass:: baal.active.heuristics.AbstractHeuristic
:members:
### baal.active.heuristics.AbstractHeuristic
::: baal.active.heuristics.AbstractHeuristic

.. autoclass:: baal.active.heuristics.BALD
### baal.active.heuristics.BALD
::: baal.active.heuristics.BALD

.. autoclass:: baal.active.heuristics.Random
### baal.active.heuristics.Random
::: baal.active.heuristics.Random

.. autoclass:: baal.active.heuristics.Entropy
```
### baal.active.heuristics.Entropy
::: baal.active.heuristics.Entropy
33 changes: 13 additions & 20 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# API Reference

```eval_rst
.. toctree::
:caption: API Definition
:maxdepth: 1

baal.modelwrapper.ModelWrapper <./modelwrapper>
baal.bayesian <./bayesian>
baal.active <./dataset_management>
baal.active.heuristics <./heuristics>
baal.calibration <./calibration>
baal.utils <./utils>

.. toctree::
:caption: Compatibility
:maxdepth: 1

baal.utils.pytorch_lightning <./compatibility/pytorch-lightning>
baal.transformers_trainer_wrapper <./compatibility/huggingface>

```
### :material-file-tree: API Definition

* [baal.modelwrapper.ModelWrapper](./modelwrapper.md)
* [baal.bayesian](./bayesian.md)
* [baal.active](./dataset_management.md)
* [baal.active.heuristics](./heuristics.md)
* [baal.calibration](./calibration.md)
* [baal.utils](./utils.md)

### :material-file-tree: Compatibility

* [baal.utils.pytorch_lightning] (./compatibility/pytorch-lightning)
* [baal.transformers_trainer_wrapper](./compatibility/huggingface)



Expand Down
7 changes: 3 additions & 4 deletions docs/api/modelwrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ predictions.shape

### API

```eval_rst
.. autoclass:: baal.ModelWrapper
:members:
```
### baal.ModelWrapper

::: baal.ModelWrapper
8 changes: 3 additions & 5 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

To work with `baal.modelwrapper.ModelWrapper`, we provide `Metrics`.


### Examples

```python
Expand Down Expand Up @@ -41,7 +40,6 @@ print(wrapper.active_learning_metrics)
"""
```

```eval_rst
.. automodule:: baal.utils.metrics
:members:
```
### baal.utils.metrics

::: baal.utils.metrics
Loading