Skip to content
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
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ coverage:
status:
project:
default:
target: 68% # TODO: switch back to auto
target: 80% # TODO: switch back to auto
threshold: 1% # the leniency in hitting the target
patch:
default:
target: 75% # TODO: switch back to 100%
target: 85% # TODO: switch back to 100%
554 changes: 396 additions & 158 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ dependencies = [
"pie-documents >=0.1.0, <0.2.0",
"torch >=1.10",
"pytorch-lightning >=2, <3",
"torchmetrics >1, <2",
"transformers >=4.18, <5",
"torchmetrics[text] >=1.5, <2",
# >=4.35 because of BartModelWithDecoderPositionIds,
# <4.37 because of generation config created from model config in BartAsPointerNetwork
# TODO: check the upper bound, since this should be already fixed (https://github.com/ArneBinder/pie-modules/pull/205)
"transformers >=4.35.0,<4.37.0",
]

[project.urls]
Expand Down Expand Up @@ -51,14 +54,22 @@ classifiers = [
optional = true

[tool.poetry.group.dev.dependencies]
# testing (with coverage and run-time type checking)

# lazily imported packges
# for taskmodule tests with collect statistics
tabulate = "^0.9"
# for TokenClassificationModelWithSeq2SeqEncoderAndCrf
pytorch-crf = ">=0.7.2"

# testing utilities (with coverage and run-time type checking)
pytest = ">=6.2.5"
pytest-xdist = "^3.8.0"
pytest-cov = "^6.2.1"
typeguard = ">=2.13.3"
sh = "^2"
types-requests = "^2.27.7"
python-dotenv = "^0.20.0"

# code quality and static type checking (via pre-commit)
pre-commit = ">=2.16.0"
pre-commit-hooks = ">=4.1.0"
Expand Down
16 changes: 16 additions & 0 deletions src/pytorch_ie/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
from pytorch_ie.models.sequence_classification_with_pooler import (
SequenceClassificationModelWithPooler,
SequencePairSimilarityModelWithPooler,
)
from pytorch_ie.models.simple_generative import SimpleGenerativeModel
from pytorch_ie.models.simple_sequence_classification import SimpleSequenceClassificationModel
from pytorch_ie.models.simple_token_classification import SimpleTokenClassificationModel
from pytorch_ie.models.token_classification_with_seq2seq_encoder_and_crf import (
TokenClassificationModelWithSeq2SeqEncoderAndCrf,
)
from pytorch_ie.models.transformer_seq2seq import TransformerSeq2SeqModel
from pytorch_ie.models.transformer_span_classification import TransformerSpanClassificationModel
from pytorch_ie.models.transformer_text_classification import TransformerTextClassificationModel
Expand All @@ -8,4 +18,10 @@
"TransformerSpanClassificationModel",
"TransformerTextClassificationModel",
"TransformerTokenClassificationModel",
"SequenceClassificationModelWithPooler",
"SequencePairSimilarityModelWithPooler",
"SimpleTokenClassificationModel",
"SimpleGenerativeModel",
"SimpleSequenceClassificationModel",
"TokenClassificationModelWithSeq2SeqEncoderAndCrf",
]
2 changes: 2 additions & 0 deletions src/pytorch_ie/models/base_models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .bart_as_pointer_network import BartAsPointerNetwork
from .bart_with_decoder_position_ids import BartModelWithDecoderPositionIds
Loading