Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update project metadata and README for citation and versioning #40

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,19 @@ for epoch in range(num_epochs):

For a complete example, see the [MNIST Early Stopping Example Notebook](MNIST_Early_Stopping_example.ipynb).

## Citation

If you find this package useful in your research, please consider citing it as:

```bibtex
@misc{early_stopping_pytorch,
author = {Bjarte Sunde},
title = {early-stopping-pytorch: A PyTorch utility package for Early Stopping},
year = {2024},
url = {https://github.com/Bjarten/early-stopping-pytorch},
note = {Version 1.0.7}
}
```

## References
The ```EarlyStopping``` class in ```early_stopping_pytorch/early_stopping.py``` is inspired by the [ignite EarlyStopping class](https://github.com/pytorch/ignite/blob/master/ignite/handlers/early_stopping.py).
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,18 @@ dependencies = [
"torch>=1.9.0"
]

[project.urls]
Repository = "https://github.com/Bjarten/early-stopping-pytorch"

[tool.semantic_release]
version_variables = ["early_stopping_pytorch/__init__.py:__version__"]
version_variables = [
"early_stopping_pytorch/__init__.py:__version__",
"README.md:version_note"
]
version_pattern = '''
(?P<variable>__version__\s*=\s*['"](?P<version>[^'"]+)['"]) |
(?P<variable>note\s*=\s*\{Version\s(?P<version>[^}]+)\})
'''
tag_format = "v{version}"
version_toml = ["pyproject.toml:project.version"]
branch = "main"
Expand Down