Model and Taskmodule implementations for PyTorch-IE
Project description
pie-modules
Model-, taskmodule-, and metric-implementations as well as document processing utilities for PyTorch-IE.
Available models:
- SimpleSequenceClassificationModel
- SequenceClassificationModelWithPooler
- SequencePairSimilarityModelWithPooler
- SimpleTokenClassificationModel
- TokenClassificationModelWithSeq2SeqEncoderAndCrf
- SimpleExtractiveQuestionAnsweringModel
- SimpleGenerativeModel
- SpanTupleClassificationModel
Available taskmodules:
- RETextClassificationWithIndicesTaskModule
- CrossTextBinaryCorefTaskModule
- LabeledSpanExtractionByTokenClassificationTaskModule
- ExtractiveQuestionAnsweringTaskModule
- TextToTextTaskModule
- PointerNetworkTaskModuleForEnd2EndRE
- RESpanPairClassificationTaskModule
Available metrics:
Document processing utilities:
- MultiSpanMerger
- SpansViaRelationMerger
- RegexPartitioner
- RelationArgumentSorter
- SentenceSplitter
- TextSpanTrimmer
- tokenize_document
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.14.1.tar.gz
(109.6 kB
view details)
Built Distribution
pie_modules-0.14.1-py3-none-any.whl
(143.4 kB
view details)
File details
Details for the file pie_modules-0.14.1.tar.gz
.
File metadata
- Download URL: pie_modules-0.14.1.tar.gz
- Upload date:
- Size: 109.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68cd4c2a0396e70c40beb370eb73ca92a68b7c5578bf74e44fb8e6a1f474302d |
|
MD5 | b87b46a1810b41db04d1603878ee7a9d |
|
BLAKE2b-256 | f42e0a33386cdf754f57f1b0114e6ed3a0e927c93edf22e320dcfeb6be55d9d9 |
File details
Details for the file pie_modules-0.14.1-py3-none-any.whl
.
File metadata
- Download URL: pie_modules-0.14.1-py3-none-any.whl
- Upload date:
- Size: 143.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 039a6de262a7fd3a9392e33a479866a073152e62247bc47d5da83e0ddf9dfeee |
|
MD5 | a9363133aa520e5bf07f96720ba55386 |
|
BLAKE2b-256 | dd1ba9fe88c1f6fe3a72bcb2977dfd7e87affbb81158f57c3e49eac795c10df7 |