Skip to content

Commit 3a5342e

Browse files
authored
Update dependencies (#36)
* Update requirements.txt * Fix incompatible code * Bump version * Update version of pytorch-partial-tagger
1 parent f17ad2c commit 3a5342e

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ requires-python = ">=3.8"
88

99
[tool.poetry]
1010
name = "spacy-partial-tagger"
11-
version = "0.15.0"
11+
version = "0.15.1"
1212
description = "Sequence Tagger for Partially Annotated Dataset in spaCy"
1313
authors = ["yasufumi <yasufumi.taniguchi@gmail.com>"]
1414
license = "MIT"
@@ -27,7 +27,7 @@ transformers = {extras = ["ja"], version = "^4.25.1"}
2727
torch = "^2.0.1"
2828
spacy = {extras = ["transformers"], version = "^3.3.1"}
2929
spacy-alignments = "^0.8.5"
30-
pytorch-partial-tagger = "^0.1.7"
30+
pytorch-partial-tagger = "^0.1.9"
3131

3232
[tool.poetry.group.dev.dependencies]
3333
mypy = "^1.3.0"

requirements.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ confection==0.0.4 ; python_version >= "3.8" and python_version < "4.0"
99
coverage[toml]==7.2.7 ; python_version >= "3.8" and python_version < "4.0"
1010
cymem==2.0.7 ; python_version >= "3.8" and python_version < "4.0"
1111
exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11"
12-
filelock==3.12.1 ; python_version >= "3.8" and python_version < "4.0"
12+
filelock==3.12.2 ; python_version >= "3.8" and python_version < "4.0"
1313
flake8==4.0.1 ; python_version >= "3.8" and python_version < "4.0"
1414
fsspec==2023.6.0 ; python_version >= "3.8" and python_version < "4.0"
1515
fugashi==1.2.1 ; python_version >= "3.8" and python_version < "4.0"
@@ -32,26 +32,27 @@ packaging==23.1 ; python_version >= "3.8" and python_version < "4.0"
3232
pathspec==0.11.1 ; python_version >= "3.8" and python_version < "4.0"
3333
pathy==0.10.1 ; python_version >= "3.8" and python_version < "4.0"
3434
plac==1.3.5 ; python_version >= "3.8" and python_version < "4.0"
35-
platformdirs==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
35+
platformdirs==3.6.0 ; python_version >= "3.8" and python_version < "4.0"
3636
pluggy==1.0.0 ; python_version >= "3.8" and python_version < "4.0"
3737
preshed==3.0.8 ; python_version >= "3.8" and python_version < "4.0"
3838
pycodestyle==2.8.0 ; python_version >= "3.8" and python_version < "4.0"
3939
pydantic==1.10.9 ; python_version >= "3.8" and python_version < "4.0"
4040
pyflakes==2.4.0 ; python_version >= "3.8" and python_version < "4.0"
4141
pytest-cov==3.0.0 ; python_version >= "3.8" and python_version < "4.0"
4242
pytest==7.3.2 ; python_version >= "3.8" and python_version < "4.0"
43-
pytorch-partial-tagger==0.1.7 ; python_version >= "3.8" and python_version < "4.0"
43+
pytorch-partial-tagger==0.1.9 ; python_version >= "3.8" and python_version < "4.0"
4444
pyyaml==6.0 ; python_version >= "3.8" and python_version < "4.0"
4545
regex==2023.6.3 ; python_version >= "3.8" and python_version < "4.0"
4646
requests==2.31.0 ; python_version >= "3.8" and python_version < "4.0"
47-
rhoknp==1.3.1 ; python_version >= "3.8" and python_version < "4.0"
47+
rhoknp==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
4848
ruff==0.0.270 ; python_version >= "3.8" and python_version < "4.0"
49+
safetensors==0.3.1 ; python_version >= "3.8" and python_version < "4.0"
4950
setuptools==67.8.0 ; python_version >= "3.8" and python_version < "4.0"
5051
smart-open==6.3.0 ; python_version >= "3.8" and python_version < "4.0"
5152
spacy-alignments==0.8.6 ; python_version >= "3.8" and python_version < "4.0"
5253
spacy-legacy==3.0.12 ; python_version >= "3.8" and python_version < "4.0"
5354
spacy-loggers==1.0.4 ; python_version >= "3.8" and python_version < "4.0"
54-
spacy-transformers==1.2.4 ; python_version >= "3.8" and python_version < "4.0"
55+
spacy-transformers==1.2.5 ; python_version >= "3.8" and python_version < "4.0"
5556
spacy==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
5657
spacy[transformers]==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
5758
srsly==2.4.6 ; python_version >= "3.8" and python_version < "4.0"
@@ -63,8 +64,8 @@ tokenizers==0.13.3 ; python_version >= "3.8" and python_version < "4.0"
6364
tomli==2.0.1 ; python_version >= "3.8" and python_full_version < "3.11.0a7"
6465
torch==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
6566
tqdm==4.65.0 ; python_version >= "3.8" and python_version < "4.0"
66-
transformers==4.29.2 ; python_version >= "3.8" and python_version < "4.0"
67-
transformers[ja]==4.29.2 ; python_version >= "3.8" and python_version < "4.0"
67+
transformers==4.30.2 ; python_version >= "3.8" and python_version < "4.0"
68+
transformers[ja]==4.30.2 ; python_version >= "3.8" and python_version < "4.0"
6869
typer==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
6970
typing-extensions==4.6.3 ; python_version >= "3.8" and python_version < "4.0"
7071
unidic-lite==1.0.8 ; python_version >= "3.8" and python_version < "4.0"

spacy_partial_tagger/pipeline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from partial_tagger.data import CharBasedTags, LabelSet
66
from partial_tagger.data.batch.tag import TagsBatch
77
from partial_tagger.data.batch.text import create_token_based_tags
8-
from partial_tagger.training import expected_entity_ratio_loss
8+
from partial_tagger.training import compute_partially_supervised_loss
99
from partial_tagger.utils import create_tag
1010
from spacy import util
1111
from spacy.errors import Errors
@@ -139,7 +139,7 @@ def get_loss(
139139
device=scores_pt.device,
140140
)
141141

142-
loss = expected_entity_ratio_loss(
142+
loss = compute_partially_supervised_loss(
143143
scores_pt, tag_bitmap, mask, self.label_set.get_outside_index()
144144
)
145145

spacy_partial_tagger/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import spacy_alignments as tokenizations
44
from partial_tagger.data import LabelSet
5-
from partial_tagger.decoders.viterbi import Contrainer, ViterbiDecoder
5+
from partial_tagger.decoders.viterbi import Constrainer, ViterbiDecoder
66
from partial_tagger.encoders.transformer import TransformerModelEncoderFactory
77
from partial_tagger.tagger import SequenceTagger
88
from transformers import PreTrainedTokenizer
@@ -15,7 +15,7 @@ def create_tagger(
1515
TransformerModelEncoderFactory(model_name).create(label_set),
1616
ViterbiDecoder(
1717
padding_index,
18-
Contrainer(
18+
Constrainer(
1919
label_set.get_start_states(),
2020
label_set.get_end_states(),
2121
label_set.get_transitions(),

0 commit comments

Comments
 (0)