Skip to content

Commit fcb2848

Browse files
authored
updated contribution docs
1 parent f0d151a commit fcb2848

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

CONTRIBUTING.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,42 @@
55

66
## Choosing a task
77
* Check out our [Kanban board](https://github.com/OML-Team/open-metric-learning/projects/1).
8-
You can work on one of the existing issues or create the new one.
9-
Especially pay attention to the issues marked with the `good_first_issue` flag.
10-
* Start the conversation under the issue that you picked. We will discuss the design and content of the pull request, and
8+
You can work on one of the existing issues or create a new one.
9+
* Start the conversation under the issue you picked. We will discuss the design and content of the pull request, and
1110
then you can start working on it.
1211

13-
## Contributing
12+
## Contributing in general
1413
* Fork the repository.
1514
* Clone it locally.
1615
* Create a branch with a name that speaks for itself.
1716
* Set up the environment. You can install the library in dev mode via `pip install -e .`
1817
or build / pull [docker image](https://github.com/OML-Team/open-metric-learning#installation).
1918
* Implement the discussed functionality, **docstrings**, and **tests** for it.
20-
* Run tests locally via `make run_tests` or `make docker_tests` (preferable option).
19+
* Run tests locally using commands from `Makefile`.
2120
* Push the code to your forked repository.
2221
* Create a pull request to OpenMetricLearning.
2322

24-
## Good to know
23+
## Contributing to documentation
2524
* If you want to change `README.md` you should go to `docs/readme`, change the desired section and then build
2625
readme via `make build_readme`. *So, don't change the main readme file directly, otherwise tests will fail.*
2726
* Don't forget to update the documentation if needed. Its source is located in `docs/source`. To inspect
2827
it locally, you should run `make html` (from `docs` folder) and then open `docs/build/html/index.html` in your
2928
browser.
30-
* If you want to add some new criterion, miner, model, optimizer, sampler, lr scheduler or transforms, don't forget to
31-
add it to the corresponding registry (see `oml.registry`) and also add a config file (see `oml.configs`).
3229

33-
## How to add new functionality in Pipelines (Config-API)?
34-
* Implement your changes in `extractor_training_pipeline` and/or in `extractor_validation_pipeline`
35-
* Add a new test run or modify one of the existing tests. If adding a new test:
30+
## Contributing to models ZOO
31+
* Add the model's implementation under `oml/models`.
32+
* Implement `from_pretrained()` and add the corresponding [transforms](https://github.com/OML-Team/open-metric-learning/blob/f0d151ace24aaa527d0605d055529f31ad027f49/oml/registry/transforms.py#L53).
33+
* Add the model to `oml/registry` and `oml/configs`.
34+
* Evaluate model on 4 benchmarks and add the results into ZOO table in the main Readme.
35+
36+
## Contributing to pipelines
37+
* Implement your changes in one of the pipelines (`extractor_training_pipeline`, `extractor_validation_pipeline` or others).
38+
* Add a new test or modify an existing one under `tests/test_runs/test_pipelines`.
39+
* If adding a new test:
3640
* Add config file: `tests/test_runs/test_pipelines/configs/train_or_validate_new_feature.yaml`
3741
* Add python script: `tests/test_runs/test_pipelines/train_or_validate_new_feature.py`
38-
* Add entry point to your test to: `tests/test_runs/test_pipelines/test_pipelines.py`
42+
* Add test: `tests/test_runs/test_pipelines/test_pipelines.py`
43+
44+
## Don't forget to update Registry
45+
* If you want to add some new criterion, miner, model, optimizer, sampler, lr scheduler or transforms, don't forget to
46+
add it to the corresponding registry (see `oml.registry`) and also add a config file (see `oml.configs`).

0 commit comments

Comments
 (0)