|
1 | 1 | # Contributing to TransformerRanker |
2 | 2 |
|
3 | | -__Thanks__ for your interest in contributing to `transformer-ranker`! We're building a lightweight tool for ranking language models via transferability. |
| 3 | +__Thanks__ for your interest in contributing to `transformer-ranker`. Whether it’s a bug report, new feature, or doc fix, it’s appreciated. Please read this before opening an issue or PR. |
4 | 4 |
|
5 | | -Spotted a bug, got an idea, or want to open a PR? any kind of involvement helps shape where it goes. |
| 5 | +## Reporting Bugs / Requesting Features |
6 | 6 |
|
7 | | -## See Exiting Work |
| 7 | +Use [issues](https://github.com/flairNLP/transformer-ranker/issues) to report bugs or suggest improvements. |
8 | 8 |
|
9 | | -Before starting, check open [issues](https://github.com/flairNLP/transformer-ranker/issues) and [pull requests](https://github.com/flairNLP/transformer-ranker/pulls) to avoid duplicates. |
10 | | -Planning something new? Consider opening an issue first. Discussion is welcome. |
| 9 | +Before opening a new issue: |
11 | 10 |
|
12 | | -## Setup |
| 11 | +- See if similar issues and PRs already exist |
| 12 | +- If not, feel free to create a new one |
13 | 13 |
|
14 | | -We recommend Python 3.9.x during development. To install dev dependencies: |
| 14 | +Helpful info to include: |
| 15 | + |
| 16 | +- What you did and what went wrong |
| 17 | +- Reproducible steps or a minimal example (if possible) |
| 18 | + |
| 19 | +## Contributing with Pull Requests |
| 20 | + |
| 21 | +Pull requests are welcome. |
| 22 | + |
| 23 | +Before submitting: |
| 24 | + |
| 25 | +- Make sure you're on top of `main` |
| 26 | +- For larger changes, open an issue first to discuss |
| 27 | + |
| 28 | +Steps: |
| 29 | + |
| 30 | +1. Fork the repo and create a new branch |
| 31 | +2. Make your changes (keep it focused) |
| 32 | +3. Format and test |
| 33 | +4. Commit with a clear message |
| 34 | +5. Open a PR and respond to feedback if needed |
| 35 | + |
| 36 | +## Dev Setup |
| 37 | + |
| 38 | +Use Python 3.9.x in a clean environment (e.g., virtualenv or conda). |
| 39 | + |
| 40 | +Install dev dependencies: |
15 | 41 |
|
16 | 42 | ```bash |
17 | 43 | pip install -e ".[dev]" |
18 | 44 | ``` |
19 | 45 |
|
20 | | -Use a clean environment (virtualenv or conda). |
21 | | -Explore `examples/` and `tests/` to get familiar. |
22 | | - |
23 | | -## Code Style & Linting |
24 | | - |
25 | 46 | We use: |
26 | 47 |
|
27 | 48 | - [black](https://github.com/psf/black) — code formatting |
28 | 49 | - [ruff](https://github.com/astral-sh/ruff) — linting & import sorting |
| 50 | +- [pytest](https://docs.pytest.org/) — testing |
29 | 51 |
|
30 | | -To format: |
| 52 | +To format and lint: |
31 | 53 |
|
32 | 54 | ```bash |
33 | 55 | black . && ruff --fix . |
34 | 56 | ``` |
35 | 57 |
|
36 | | -## Run Tests |
37 | | - |
38 | | -Tests are written using pytest. Run all tests with: |
| 58 | +To run tests: |
39 | 59 |
|
40 | 60 | ```bash |
41 | 61 | pytest tests |
42 | 62 | ``` |
43 | 63 |
|
44 | | -## Add New Transferability Metrics |
| 64 | +--- |
| 65 | + |
| 66 | +## Adding New Metrics |
45 | 67 |
|
| 68 | +New estimators go in: |
46 | 69 |
|
47 | | -New metrics go in `transformer_ranker/estimators/`. |
48 | | -Include docstrings and paper references. Clear comments = appreciated. |
| 70 | +``` |
| 71 | +transformer_ranker/estimators/ |
| 72 | +``` |
49 | 73 |
|
50 | | -## Explore and Expand |
| 74 | +Please include: |
51 | 75 |
|
52 | | -Try weird models or datasets. If something fails — open an issue. |
53 | | -Ideas for model ranking for tasks like summarization are also welcome. |
| 76 | +- Docstrings and helpful comments |
| 77 | +- Paper references (if relevant) |
| 78 | +- Associated tests in `tests/` (if possible) |
54 | 79 |
|
55 | 80 | ## Enhancements |
56 | 81 |
|
57 | | -Test the tool with unusual models and datasets. Open issues or PRs if you encounter unsupported models. Consider exploring ways to apply transferability to other tasks, such as summarization. |
| 82 | +Test the tool with new models and datasets. Open issues or PRs if you encounter anything unsupported. Consider exploring ways to apply transferability to other tasks, such as summarization. |
58 | 83 |
|
59 | | ----------------- |
| 84 | +## License |
60 | 85 |
|
61 | | -Contributions big or small are appreciated! 🚀 |
62 | | -Want to suggest something now? → Open an [issues](https://github.com/flairNLP/transformer-ranker/issues) |
| 86 | +MIT. See [LICENSE](./LICENSE). By contributing, you agree your code is shared under the same license. |
0 commit comments