-
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 OOD validation pipeline (#5)
* 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 * implement logit_norm * clean code * implement Makefile * lint code * update docs * improve documentation * update docs template * add docs theme * setup readthedocs 1 * init leaderboard notebook * ood validation pipeline * debug detector template * test pipelines * lint code
- Loading branch information
1 parent
1c49512
commit afbb154
Showing
39 changed files
with
1,057 additions
and
258 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
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 @@ | ||
[flake8] | ||
exclude = | ||
venv, | ||
.venv, | ||
__pycache__, | ||
notebooks, | ||
.git, | ||
docs/source/conf.py, | ||
old, | ||
build, | ||
dist, | ||
deprecated | ||
max-line-length = 120 | ||
max-complexity = 10 | ||
extend-ignore = | ||
E203, | ||
per-file-ignores = | ||
# imported but unused | ||
__init__.py: F401,F403,E402 |
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,5 +1,3 @@ | ||
#!/usr/bin/env python3 | ||
import json | ||
import subprocess | ||
|
||
|
||
|
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
8 changes: 0 additions & 8 deletions
8
.github/workflows/python-publish.yml → .github/workflows/publish.yml
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
formats: | ||
- htmlzip | ||
- epub | ||
python: | ||
version: 3.8 | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
This file was deleted.
Oops, something went wrong.
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,19 +1,110 @@ | ||
Check back later, we will populate this soon | ||
# Contributing to Detectors 🧐 | ||
|
||
## Important Resources | ||
Hi there, Thank you for even being interested in contributing to Detectors | ||
|
||
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow. | ||
|
||
## Contributing guidelines | ||
|
||
Our issues page is kept up to date with bugs, improvements, and feature requests. There is a taxonomy of labels to help with sorting and discovery of issues of interest. These include: | ||
|
||
- `method` | ||
- `pipeline` | ||
- `dataset` | ||
- `model` | ||
- `example` | ||
- `documentation` | ||
- `test` | ||
- `bug` | ||
|
||
If you start working on an issue, please assign it to yourself. | ||
|
||
If you are adding an issue, please try to keep it focused on a single modular bug/improvement/feature. If the two issues are related, or blocking, please link them rather than keep them as one single one. | ||
|
||
We will try to keep these issues as up to date as possible. | ||
|
||
### How to submit changes | ||
|
||
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow. | ||
|
||
### How to report a bug | ||
|
||
Create an issue with the `bug` label. | ||
|
||
### How to suggest a feature or enhancement | ||
|
||
Create an issue with the appropriate label or labels related to the desired feature or enhancement. | ||
|
||
### Getting help | ||
|
||
Although we try to have a developer setup to make it as easy as possible for others to contribute (see below) it is possible that some pain point may arise around environment setup, linting, documentation, or other. Should that occur, please contact a maintainer! Not only do we want to help get you unblocked, but we also want to make sure that the process is smooth for future contributors. | ||
|
||
### Release process | ||
|
||
The entire release process, including running tests, building documentation, and publishing to PyPI are automated with Github flows and will be triggered upon a successful push on the `master` branch. | ||
|
||
--- | ||
|
||
## Installing dependencies | ||
|
||
To install development requirements: | ||
|
||
```bash | ||
pip install -e ".[dev]" | ||
``` | ||
|
||
This will install all requirements for running the package, examples, linting, formatting, tests, and coverage. | ||
|
||
## Testing | ||
|
||
## Environment details | ||
Unit tests are written using [pytest](https://docs.pytest.org/en/stable/). | ||
|
||
Code coverage (i.e. the amount of code that is covered by unit tests) helps identify areas of the code that are potentially more or less brittle. | ||
|
||
To run the tests, run: | ||
|
||
```bash | ||
make test | ||
``` | ||
|
||
--- | ||
|
||
## Documentation | ||
|
||
### Contribute Documentation | ||
|
||
## How to submit changes | ||
Docs are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the code. | ||
|
||
## How to report a bug | ||
### Build Documentation Locally | ||
|
||
## How to suggest a feature or enhancement | ||
To build the documentation locally, run: | ||
|
||
```bash | ||
make docs_build | ||
``` | ||
|
||
--- | ||
|
||
## Coding conventions | ||
|
||
## Code of Conduct | ||
### Code Formatting | ||
|
||
Formatting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/). | ||
|
||
To format the code, run: | ||
|
||
```bash | ||
make format | ||
``` | ||
|
||
### Linting | ||
|
||
Linting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/), and [flake8](https://flake8.pycqa.org/en/latest/). | ||
|
||
To lint the code, run: | ||
|
||
```bash | ||
make lint | ||
``` | ||
|
||
## Thanks | ||
## 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package: | ||
python -m pip install --upgrade pip | ||
pip install build | ||
python -m build | ||
|
||
test: | ||
pytest -vv tests/models.py tests/methods.py -s --cov \ | ||
--cov-config=.coveragerc \ | ||
--cov-report xml \ | ||
--cov-report term-missing:skip-covered | ||
|
||
docs_build: | ||
pip install -r docs/requirements.txt | ||
cd docs | ||
sphinx-apidoc -o ./source -f ../src/detectors -d 4 | ||
make clean | ||
make html | ||
|
||
format: | ||
black --config pyproject.toml . | ||
isort --settings pyproject.toml . | ||
|
||
lint: | ||
black . --check | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
flake8 . --count --exit-zero --statistics | ||
|
||
help: | ||
@echo 'package - build the package' | ||
@echo 'docs_build - build the documentation' | ||
@echo 'test - run unit tests and generate coverage report' | ||
@echo 'format - run code formatters' | ||
@echo 'lint - run linters' |
Oops, something went wrong.