-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement further methods, pipelines, and datasets. (#4)
* change point detection module * release automation * debug docs * debug docs * change docs workflow * debug workflow * debug workflow * debug `python-package.yml` * debug release action * update project files * change list_datasets function * restructure docs * refactor datasets * implement more ood detection methods * remove cpd methods * implement imagenet corrupted datasets * debug ood pipeline * update package structure * update package structure * major refactoring * fix minor bugs * fix small bug * implement gradnorm * implement vim * update methods * refactor pipelines * debug datasets * accelerate compute accuracy script * multi-layer scores aggregations * debug ood detection methods * implemend `wilds` datasets * debug pipelines * implement layer aggregation methods * implement more detection methods * format code * list available resources * improve api * method templates * refactoring * major methods refactoring * aggregations api * debugging * debug docs * prepare new version * debug workflow * update tests * lint code * update requirements
- Loading branch information
1 parent
682ef2f
commit 1c49512
Showing
141 changed files
with
209,413 additions
and
2,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*.py eol=lf | ||
*.py eol=lf | ||
*.rst eol=lf | ||
*.md eol=lf | ||
*.mdx eol=lf | ||
*.md eol=lf | ||
*.mdx eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,3 +159,6 @@ dmypy.json | |
/scripts/bash | ||
|
||
.pypirc | ||
/images | ||
slurm/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Check back later, we will populate this soon | ||
|
||
## Important Resources | ||
|
||
## Testing | ||
|
||
## Environment details | ||
|
||
## How to submit changes | ||
|
||
## How to report a bug | ||
|
||
## How to suggest a feature or enhancement | ||
|
||
## Coding conventions | ||
|
||
## Code of Conduct | ||
|
||
## Thanks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
MIT License | ||
Copyright 2023 Eduardo Dadalto | ||
|
||
Copyright (c) 2022 Eduardo Dadalto | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,128 @@ | ||
# Detectors | ||
|
||
<p align="center"> | ||
<br> | ||
<img src="./face-with-monocle.svg" width="150" height="150" /> | ||
<img src="_static/face-with-monocle.svg" width="150" height="150" /> | ||
<br> | ||
</p> | ||
|
||
# Detectors | ||
|
||
|
||
Package to accelerate research on out-of-distribution (OOD) detection inspired by Huggingface's transformers. | ||
|
||
Under development. | ||
|
||
## Deployment & Documentation & Stats & License | ||
## Stats | ||
|
||
[](https://github.com/edadaltocg/detectors/graphs/commit-activity) | ||
[](https://pypi.org/project/pip) | ||
[](https://github.com/edadaltocg/detectors/actions/workflows/python-package.yml) | ||
[](http://ansicolortags.readthedocs.io/?badge=latest) | ||
[](https://GitHub.com/edadaltocg/detectors/stargazers/) | ||
[](https://github.com/edadaltocg/detectors/network/) | ||
[](https://pypi.python.org/pypi/ansicolortags/) | ||
[](https://GitHub.com/Naereen/badges/graphs/contributors/) | ||
[](https://doi.org/10.1007/978-3-319-76207-4_15) | ||
[](https://doi.org/) | ||
[](https://pypi.org/project/pip/) | ||
|
||
----- | ||
|
||
<!-- | ||
## Examples | ||
```python | ||
``` --> | ||
|
||
## Features | ||
|
||
- Datasets with md5 checksums. | ||
- Models pre-trained on CIFAR and integrated in `timm`. | ||
- Pipeline for evaluating OOD detectors on CIFAR and ImageNet benchmarks. | ||
- Multiple seed simulations. | ||
- Diverse aggregation methods for OOD detection. | ||
- Efficient OOD detection metrics. | ||
- Pipelines for evaluating OOD detectors on MNIST, CIFAR, and ImageNet benchmarks. | ||
- Automatic OOD datasets download with md5 checksums. | ||
- Support models implemented at `timm`. | ||
- Models on CIFAR and integrated in `timm`. | ||
- Random seed support for reproducible simulations. | ||
- Several aggregation methods for multi-layer OOD detection. | ||
- OOD detection metrics. | ||
- More than 15 detection methods implemented. | ||
- Pipelines for open set recognition and covariate drift detection. | ||
|
||
## Installation | ||
|
||
```bash | ||
pip install detectors | ||
``` | ||
|
||
## Thanks to all our contributors | ||
To install the latest version from the source: | ||
|
||
<a href="https://github.com/edadaltocg/detectors/graphs/contributors"> | ||
<img src="https://contributors-img.web.app/image?repo=edadaltocg/detectors" /> | ||
</a> | ||
```bash | ||
git clone https://github.com/edadaltocg/detectors.git | ||
cd detectors | ||
pip install -e . | ||
``` | ||
|
||
### Contact | ||
## Examples | ||
|
||
### Running a benchmark | ||
|
||
Concerning this package, its use and bugs, use the [issue page](https://github.com/edadaltocg/detectors/issues) of the [ruptures repository](https://github.com/edadaltocg/detectors). For other inquiries, you can contact me [here](https://edadaltocg.github.io/contact/). | ||
```python | ||
``` | ||
|
||
### Optional: Acceleration | ||
|
||
### Important links | ||
This package is compatible with the `accelerate` package to allow for parallel computing. | ||
|
||
- [Documentation]() | ||
- [Pypi package index](https://pypi.python.org/pypi/detectors) | ||
In order to use it, you need to install it: | ||
|
||
### Changelog | ||
```bash | ||
pip install accelerate | ||
``` | ||
|
||
See the [changelog](https://github.com/edadaltocg/detectors/blob/master/CHANGELOG.md) for a history of notable changes to `detectors`. | ||
Then, you can configure it: | ||
|
||
<!-- ## TODO | ||
```bash | ||
accelerate config | ||
``` | ||
|
||
And finally, you can run the benchmark with the `accelerate` command: | ||
|
||
```bash | ||
accelerate launch demo/ood_benchmark.py | ||
``` | ||
|
||
- Pipeline for generating results table. | ||
#### Configuration example | ||
|
||
```text | ||
In which compute environment are you running? ([0] This machine, [1] AWS (Amazon SageMaker)): 0 | ||
Which type of machine are you using? ([0] No distributed training, [1] multi-CPU, [2] multi-GPU, [3] TPU [4] MPS): 2 | ||
How many different machines will you use (use more than 1 for multi-node training)? [1]: 1 | ||
Do you want to use DeepSpeed? [yes/NO]: NO | ||
Do you want to use FullyShardedDataParallel? [yes/NO]: NO | ||
How many GPU(s) should be used for distributed training? [1]:2 | ||
What GPU(s) (by id) should be used for training on this machine as a comma-seperated list? [all]:all | ||
Do you wish to use FP16 or BF16 (mixed precision)? [NO/fp16/bf16]: NO | ||
``` | ||
|
||
## Changelog | ||
|
||
See the [changelog](https://github.com/edadaltocg/detectors/blob/master/CHANGELOG.md) for a history of notable changes to `detectors`. | ||
|
||
## Contributing | ||
|
||
See the [contributing guidelines](https://github.com/edadaltocg/detectors/blob/master/CONTRIBUTING.md) for instructions on how to contribute to `detectors`. | ||
|
||
### Thanks to all our contributors | ||
|
||
<a href="https://github.com/edadaltocg/detectors/graphs/contributors"> | ||
<img src="https://contributors-img.web.app/image?repo=edadaltocg/detectors" /> | ||
</a> | ||
|
||
### Contact | ||
|
||
Concerning this package, its use, and bugs, use the [issue page](https://github.com/edadaltocg/detectors/issues) of the [ruptures repository](https://github.com/edadaltocg/detectors). For other inquiries, you can contact me [here](https://edadaltocg.github.io/contact/). | ||
|
||
### Important links | ||
|
||
- [Documentation](http://detectors.readthedocs.io/) | ||
- [Pypi package index](https://pypi.python.org/pypi/detectors) | ||
|
||
## Citing detectors | ||
|
||
```bibtex | ||
``` --> | ||
@software{detectors, | ||
author = {Dadalto, Eduardo and Colombo, Pierre and Darrin, Maxime and Staerman, Guillaume and Nathan, Noiry and Alberge, Florence and Duhamel, Pierre and Piantanida, Pablo}, | ||
month = {3}, | ||
title = {{detectors: .}}, | ||
url = {https://github.com/edadaltocg/detectors}, | ||
version = {0.1.0}, | ||
year = {2023} | ||
} | ||
``` |
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# About |
Oops, something went wrong.