Skip to content

Commit 4fefe94

Browse files
committed
Update contributing guide
1 parent 6848edb commit 4fefe94

File tree

3 files changed

+52
-29
lines changed

3 files changed

+52
-29
lines changed

docs/CONTRIBUTING.md

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,86 @@
11
# Contributing to TransformerRanker
22

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.
44

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
66

7-
## See Exiting Work
7+
Use [issues](https://github.com/flairNLP/transformer-ranker/issues) to report bugs or suggest improvements.
88

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:
1110

12-
## Setup
11+
- See if similar issues and PRs already exist
12+
- If not, feel free to create a new one
1313

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:
1541

1642
```bash
1743
pip install -e ".[dev]"
1844
```
1945

20-
Use a clean environment (virtualenv or conda).
21-
Explore `examples/` and `tests/` to get familiar.
22-
23-
## Code Style & Linting
24-
2546
We use:
2647

2748
- [black](https://github.com/psf/black) — code formatting
2849
- [ruff](https://github.com/astral-sh/ruff) — linting & import sorting
50+
- [pytest](https://docs.pytest.org/) — testing
2951

30-
To format:
52+
To format and lint:
3153

3254
```bash
3355
black . && ruff --fix .
3456
```
3557

36-
## Run Tests
37-
38-
Tests are written using pytest. Run all tests with:
58+
To run tests:
3959

4060
```bash
4161
pytest tests
4262
```
4363

44-
## Add New Transferability Metrics
64+
---
65+
66+
## Adding New Metrics
4567

68+
New estimators go in:
4669

47-
New metrics go in `transformer_ranker/estimators/`.
48-
Include docstrings and paper references. Clear comments = appreciated.
70+
```
71+
transformer_ranker/estimators/
72+
```
4973

50-
## Explore and Expand
74+
Please include:
5175

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)
5479

5580
## Enhancements
5681

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.
5883

59-
----------------
84+
## License
6085

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.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "transformer-ranker"
77
description = "Efficiently find the best-suited language model (LM) for your NLP task"
88
version = "0.2.0"
9-
authors = [{ name = "Lukas Garbas", email = "lukas.garbaciauskas@informatik.hu-berlin.de" }]
9+
authors = [{ name = "Lukas Garbas", email = "lukas.garbaciauskas@hu-berlin.de" }]
1010
license = { file = "LICENSE" }
1111
readme = "README.md"
1212
requires-python = ">=3.9"

transformer_ranker/ranker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ def run(
118118
result.add_score(model_name, score)
119119
logger.info(f"{model_name} {result.metric}: {score:.4f}")
120120

121-
logger.info(f"Results ▲\n{result}")
122-
logger.info(f"Done!")
121+
logger.info(f"Results\n{result}")
123122

124123
return result
125124

0 commit comments

Comments
 (0)