|
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. |
4 | | -Finding bugs, proposing enhancements, or opening pull requests, your involvement shapes the project. |
| 3 | +__Thanks__ for your interest in contributing to `transformer-ranker`! We're building a lightweight tool for ranking language models via transferability. |
5 | 4 |
|
6 | | -## Before Coding |
| 5 | +Spotted a bug, got an idea, or want to open a PR? any kind of involvement helps shape where it goes. |
7 | 6 |
|
8 | | -Please check existing [issues](https://github.com/flairNLP/transformer-ranker/issues) and [pull requests](https://github.com/flairNLP/transformer-ranker/pulls) to avoid duplicate work. |
| 7 | +## See Exiting Work |
9 | 8 |
|
10 | | -If you're working on something new, consider opening an issue first to discuss it. |
| 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. |
11 | 11 |
|
12 | 12 | ## Setup |
13 | 13 |
|
14 | | -TransformerRanker requires Python 3.9 or higher. |
15 | | -We recommend using Python 3.9.x during development. |
16 | | - |
17 | | -Install dev dependencies with: |
| 14 | +We recommend Python 3.9.x during development. To install dev dependencies: |
18 | 15 |
|
19 | 16 | ```bash |
20 | 17 | pip install -e ".[dev]" |
21 | 18 | ``` |
22 | 19 |
|
23 | | -Make sure you’re using a clean environment (conda or virtualenv). |
24 | | -Check out the examples and tests to understand the interface better. |
| 20 | +Use a clean environment (virtualenv or conda). |
| 21 | +Explore `examples/` and `tests/` to get familiar. |
| 22 | + |
| 23 | +## Code Style & Linting |
25 | 24 |
|
26 | | -## Formatting |
| 25 | +We use: |
27 | 26 |
|
28 | | -We use [`black`](https://github.com/psf/black) for formatting [`ruff`](https://github.com/charliermarsh/ruff) for linting and imports. |
| 27 | +- [black](https://github.com/psf/black) — code formatting |
| 28 | +- [ruff](https://github.com/astral-sh/ruff) — linting & import sorting |
29 | 29 |
|
30 | | -To auto-format your code: |
| 30 | +To format: |
31 | 31 |
|
32 | 32 | ```bash |
33 | 33 | black . && ruff --fix . |
34 | 34 | ``` |
35 | 35 |
|
36 | | -## Testing |
| 36 | +## Run Tests |
37 | 37 |
|
38 | | -We use pytest for running unit tests. Run all tests using: |
| 38 | +Tests are written using pytest. Run all tests with: |
39 | 39 |
|
40 | 40 | ```bash |
41 | 41 | pytest tests |
42 | 42 | ``` |
43 | 43 |
|
44 | | -## Adding Transferability Metrics |
| 44 | +## Add New Transferability Metrics |
45 | 45 |
|
46 | | -New metrics should be added to `transformer-ranker/estimators/`. When contributing, include docstrings with links to relevant papers to help others understand the approach. Use comments to make your code easy to follow. |
47 | 46 |
|
48 | | -## Enhancements |
| 47 | +New metrics go in `transformer_ranker/estimators/`. |
| 48 | +Include docstrings and paper references. Clear comments = appreciated. |
49 | 49 |
|
50 | | -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. |
| 50 | +## Explore and Expand |
51 | 51 |
|
52 | | -## Get Involved |
| 52 | +Try weird models or datasets. If something fails — open an issue. |
| 53 | +Ideas for model ranking for tasks like summarization are also welcome. |
53 | 54 |
|
54 | | -Ways to contribute: |
| 55 | +## Enhancements |
| 56 | + |
| 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. |
55 | 58 |
|
56 | | -- Open issues to report bugs, suggest improvements, or ask questions. |
57 | | -- Add new transferability metrics. |
58 | | -- Test the tool with unusual models and datasets. |
| 59 | +---------------- |
59 | 60 |
|
60 | | -Hope this helps, we actively welcome your contributions! |
| 61 | +Contributions big or small are appreciated! 🚀 |
| 62 | +Want to suggest something now? → Open an [issues](https://github.com/flairNLP/transformer-ranker/issues) |
0 commit comments