Model and Taskmodule implementations for PyTorch-IE
Project description
pie-modules
Model-, taskmodule-, and metric-implementations for PyTorch-IE.
Available models:
- SimpleSequenceClassificationModel
- SequenceClassificationModelWithPooler
- SimpleTokenClassificationModel
- TokenClassificationModelWithSeq2SeqEncoderAndCrf
- SimpleExtractiveQuestionAnsweringModel
- SimpleGenerativeModel
Available taskmodules:
- RETextClassificationWithIndicesTaskModule
- LabeledSpanExtractionByTokenClassificationTaskModule
- ExtractiveQuestionAnsweringTaskModule
- TextToTextTaskModule
- PointerNetworkTaskModuleForEnd2EndRE
Available metrics:
Setup
pip install pie-modules
To install the latest version from GitHub:
pip install git+https://git@github.com/ArneBinder/pie-modules.git
Development
Setup
- This project is build with Poetry. See here for installation instructions.
- Get the code and switch into the project directory:
git clone https://github.com/ArneBinder/pie-modules cd pie-modules
- Create a virtual environment and install the dependencies:
poetry install
Finally, to run any of the below commands, you need to activate the virtual environment:
poetry shell
Note: You can also run commands in the virtual environment without activating it first: poetry run <command>
.
Code Formatting, Linting and Static Type Checking
pre-commit run -a
Testing
run all tests with coverage:
pytest --cov --cov-report term-missing
Releasing
- Create the release branch:
git switch --create release main
- Increase the version:
poetry version <PATCH|MINOR|MAJOR>
, e.g.poetry version patch
for a patch release. If the release contains new features, or breaking changes, bump the minor version (this project has no main release yet). If the release contains only bugfixes, bump the patch version. See Semantic Versioning for more information. - Commit the changes:
git commit --message="release <NEW VERSION>" pyproject.toml
, e.g.git commit --message="release 0.13.0" pyproject.toml
- Push the changes to GitHub:
git push origin release
- Create a PR for that
release
branch on GitHub. - Wait until checks passed successfully.
- Merge the PR into the main branch. This triggers the GitHub Action that creates all relevant release artefacts and also uploads them to PyPI.
- Cleanup: Delete the
release
branch. This is important, because otherwise the next release will fail.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pie_modules-0.10.3.tar.gz
(79.8 kB
view details)
Built Distribution
pie_modules-0.10.3-py3-none-any.whl
(104.0 kB
view details)
File details
Details for the file pie_modules-0.10.3.tar.gz
.
File metadata
- Download URL: pie_modules-0.10.3.tar.gz
- Upload date:
- Size: 79.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 633c0d6ad3070585efdac598ef27cd0f4352a1364b97c9b264c494946311d2b7 |
|
MD5 | b9675537fa44bec7adb5bd057c172ce1 |
|
BLAKE2b-256 | 6c769c15ab158938d72127f0b4e62903dbf4127bfd31a47b4b9de2d5431d4ca8 |
File details
Details for the file pie_modules-0.10.3-py3-none-any.whl
.
File metadata
- Download URL: pie_modules-0.10.3-py3-none-any.whl
- Upload date:
- Size: 104.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7adc255ca1d12d82e2c3dcc1d7d4dc9d97f2195c5b5fcfbe200e0c6c4558ab3f |
|
MD5 | ed2ba4c6dcdaa651714c8eccc89a8f3a |
|
BLAKE2b-256 | be655132900b96d3dc3747a7396ee4664506331d5b9243a4e135e6546118c91d |