-
Notifications
You must be signed in to change notification settings - Fork 76
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
Change normalisation default, fix bug in normalise_by_negative, adapt citations, absolute imports #166
Change normalisation default, fix bug in normalise_by_negative, adapt citations, absolute imports #166
Changes from 10 commits
d1ebebe
d190c86
306976d
d12b912
2e4c3a6
14eb6b6
a5f8e69
a5f5faa
7752c63
c507136
8f82724
faef1fe
df80b16
a918b41
82ef36e
dcca7c2
9b7e71c
83ec610
4d8d6a6
665e81b
6281492
9a821d9
a14bddf
8f4f3b0
2972a63
5477108
de02a23
508854d
81e4385
e85a726
9b1c1bb
a0cef7b
5319b84
6bca39c
fbfb472
fb12786
8aeca45
63e2214
465e465
be6c72b
184bd98
77e9ba0
ce8bcec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
quantus.helpers.warn\_func module | ||
================================= | ||
|
||
.. automodule:: quantus.helpers.warn_func | ||
.. automodule:: quantus.helpers.warn | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,66 @@ | ||
## Quick Installation | ||
|
||
Quantus can be installed from [PyPI](https://pypi.org/project/quantus/) | ||
(this way assumes that you have either `torch` or `tensorflow` already installed on your machine). | ||
### Installing from PyPI | ||
|
||
If you already have [PyTorch](https://pytorch.org/) or [Tensorflow](https://www.tensorflow.org) installed on your machine, | ||
Quantus can be obtained from [PyPI](https://pypi.org/project/quantus/) as follows: | ||
|
||
```setup | ||
pip install quantus | ||
``` | ||
|
||
If you don't have `torch` or `tensorflow` installed, you can simply add the package you want and install it simultaneously. | ||
Otherwise, you can simply add the desired framework in brackets, and it will be installed in addition to Quantus: | ||
|
||
```setup | ||
pip install "quantus[torch]" | ||
pip install quantus[torch] | ||
``` | ||
Or, alternatively for `tensorflow` you run: | ||
|
||
OR | ||
|
||
```setup | ||
pip install "quantus[tensorflow]" | ||
pip install quantus[tensorflow] | ||
``` | ||
|
||
Additionally, if you want to use the basic explainability functionality such as `quantus.explain` in your evaluations, you can run `pip install "quantus[extras]"` (this step requires that either `torch` or `tensorflow` is installed). | ||
To use Quantus with `zennit` support, install in the following way: `pip install "quantus[zennit]"`. | ||
### Installing from requirements.txt | ||
|
||
Alternatively, simply install requirements.txt (again, this requires that either `torch` or `tensorflow` is installed and won't include the explainability functionality to the installation): | ||
Alternatively, you can simply install from the requirements.txt found [here](https://github.com/understandable-machine-intelligence-lab/Quantus/blob/main/requirements.txt), | ||
however, this only installs with the default setup, requiring either PyTorch or Tensorflow: | ||
|
||
```setup | ||
pip install -r requirements.txt | ||
``` | ||
|
||
**Package requirements** | ||
### Installing XAI Library Support (PyPI only) | ||
|
||
Most evaluation metrics in Quantus allow for a choice of either providing pre-computed explanations directly as an input, | ||
or to instead make use of several wrappers implemented in `quantus.explain` around common explainability libraries. | ||
The following XAI Libraries are currently supported: | ||
|
||
**Captum** | ||
|
||
To enable the use of wrappers around [Captum](https://captum.ai/), you need to have PyTorch already installed and can then run | ||
|
||
```setup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should be captum, tensorflow? please also add quotation! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, captum is based on pytorch, so i think it is correct as-is. however, with the new installation options, neither torch nor tensorflow will be required to be installed already, so I will just remove that part. |
||
pip install quantus[extras] | ||
``` | ||
|
||
**tf-explain** | ||
|
||
To enable the use of wrappers around [tf.explain](https://github.com/sicara/tf-explain), you need to have [Tensorflow already installed and can then run | ||
|
||
```setup | ||
pip install quantus[extras] | ||
``` | ||
|
||
**Zennit** | ||
|
||
To use Quantus with support for the [Zennit](https://github.com/chr5tphr/zennit) library you need to have PyTorch already installed and can then run | ||
|
||
```setup | ||
pip install quantus[zennit] | ||
``` | ||
|
||
### Package Requirements | ||
|
||
``` | ||
python>=3.7.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,21 +16,32 @@ e.g. pixel replacement strategy of a faithfulness test influences the ranking of | |
[📑 Shortcut to paper!](https://arxiv.org/abs/2202.06861) | ||
|
||
|
||
This documentation is complementary to Quantus repository's [README.md](https://github.com/understandable-machine-intelligence-lab/Quantus) and provides documentation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once everything related to the Installation, Getting started etc is finished then we also need to update the README.md so that they match There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated README |
||
for how to install Quantus (**Installation**), how to contribute to the project (**Developer Documentation**) and on the interface (**API Documentation**). | ||
For further guidance on what to think about when applying Quantus, please read the user guidelines (**Guidelines**). | ||
This documentation is complementary to the [README.md](https://github.com/understandable-machine-intelligence-lab/Quantus) in the Quantus repository and provides documentation | ||
for how to {doc}`install </getting_started/installation>` Quantus, how to {doc}`contribute </docs_dev/CONTRIBUTING>` to the project, and on the {doc}`interface </docs_api/modules>`. | ||
For further guidance on what to think about when applying Quantus, please read the {doc}`user guidelines </guidelines/guidelines_and_disclaimers>`. | ||
|
||
Do you want to get started? Please have a look at our simple MNIST/torch/Saliency/IntGrad toy example (**Getting started**). | ||
Do you want to get started? Please have a look at our simple {doc}`toy example </getting_started/getting_started_example>` with PyTorch using MNIST data. | ||
For more examples, check the [tutorials](https://github.com/understandable-machine-intelligence-lab/Quantus/tree/main/tutorials) folder. | ||
|
||
Quantus can be installed from [PyPI](https://pypi.org/project/quantus/) | ||
(this way assumes that you have either `torch` or `tensorflow` already installed on your machine). | ||
If you already have [PyTorch](https://pytorch.org/) or [Tensorflow](https://www.tensorflow.org) installed on your machine, Quantus can be obtained from [PyPI](https://pypi.org/project/quantus/) as follows: | ||
|
||
```setup | ||
pip install quantus | ||
``` | ||
|
||
For alternative ways to install Quantus, read more under **Installation**. | ||
Otherwise, you can simply add the desired framework in brackets, and it will be installed in addition to Quantus: | ||
|
||
```setup | ||
pip install quantus[torch] | ||
``` | ||
|
||
OR | ||
|
||
```setup | ||
pip install quantus[tensorflow] | ||
``` | ||
|
||
For a more in-depth guide on how to install Quantus, read more {doc}`here </getting_started/installation>`. | ||
|
||
```{toctree} | ||
:caption: Installation | ||
|
@@ -72,7 +83,7 @@ guidelines/guidelines_and_disclaimers | |
|
||
If you find this toolkit or its companion paper | ||
[**Quantus: An Explainable AI Toolkit for Responsible Evaluation of Neural Network Explanations**](https://arxiv.org/abs/2202.06861) | ||
interesting or useful in your research, use following Bibtex annotation to cite us: | ||
interesting or useful in your research, please use the following Bibtex annotation to cite us: | ||
|
||
```bibtex | ||
@article{hedstrom2022quantus, | ||
|
@@ -92,3 +103,4 @@ interesting or useful in your research, use following Bibtex annotation to cite | |
``` | ||
|
||
When applying the individual metrics of Quantus, please make sure to also properly cite the work of the original authors. | ||
You can find the relevant citations in the documentation of each respective metric {doc}`here </docs_api/modules>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
"
must be kept, else the pip command won't work! please add it to the others as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done