Skip to content

Commit

Permalink
Update dependencies (#36)
Browse files Browse the repository at this point in the history
* Update requirements.txt

* Fix incompatible code

* Bump version

* Update version of pytorch-partial-tagger
  • Loading branch information
yasufumy authored Jun 18, 2023
1 parent f17ad2c commit 3a5342e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requires-python = ">=3.8"

[tool.poetry]
name = "spacy-partial-tagger"
version = "0.15.0"
version = "0.15.1"
description = "Sequence Tagger for Partially Annotated Dataset in spaCy"
authors = ["yasufumi <[email protected]>"]
license = "MIT"
Expand All @@ -27,7 +27,7 @@ transformers = {extras = ["ja"], version = "^4.25.1"}
torch = "^2.0.1"
spacy = {extras = ["transformers"], version = "^3.3.1"}
spacy-alignments = "^0.8.5"
pytorch-partial-tagger = "^0.1.7"
pytorch-partial-tagger = "^0.1.9"

[tool.poetry.group.dev.dependencies]
mypy = "^1.3.0"
Expand Down
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ confection==0.0.4 ; python_version >= "3.8" and python_version < "4.0"
coverage[toml]==7.2.7 ; python_version >= "3.8" and python_version < "4.0"
cymem==2.0.7 ; python_version >= "3.8" and python_version < "4.0"
exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11"
filelock==3.12.1 ; python_version >= "3.8" and python_version < "4.0"
filelock==3.12.2 ; python_version >= "3.8" and python_version < "4.0"
flake8==4.0.1 ; python_version >= "3.8" and python_version < "4.0"
fsspec==2023.6.0 ; python_version >= "3.8" and python_version < "4.0"
fugashi==1.2.1 ; python_version >= "3.8" and python_version < "4.0"
Expand All @@ -32,26 +32,27 @@ packaging==23.1 ; python_version >= "3.8" and python_version < "4.0"
pathspec==0.11.1 ; python_version >= "3.8" and python_version < "4.0"
pathy==0.10.1 ; python_version >= "3.8" and python_version < "4.0"
plac==1.3.5 ; python_version >= "3.8" and python_version < "4.0"
platformdirs==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
platformdirs==3.6.0 ; python_version >= "3.8" and python_version < "4.0"
pluggy==1.0.0 ; python_version >= "3.8" and python_version < "4.0"
preshed==3.0.8 ; python_version >= "3.8" and python_version < "4.0"
pycodestyle==2.8.0 ; python_version >= "3.8" and python_version < "4.0"
pydantic==1.10.9 ; python_version >= "3.8" and python_version < "4.0"
pyflakes==2.4.0 ; python_version >= "3.8" and python_version < "4.0"
pytest-cov==3.0.0 ; python_version >= "3.8" and python_version < "4.0"
pytest==7.3.2 ; python_version >= "3.8" and python_version < "4.0"
pytorch-partial-tagger==0.1.7 ; python_version >= "3.8" and python_version < "4.0"
pytorch-partial-tagger==0.1.9 ; python_version >= "3.8" and python_version < "4.0"
pyyaml==6.0 ; python_version >= "3.8" and python_version < "4.0"
regex==2023.6.3 ; python_version >= "3.8" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.8" and python_version < "4.0"
rhoknp==1.3.1 ; python_version >= "3.8" and python_version < "4.0"
rhoknp==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
ruff==0.0.270 ; python_version >= "3.8" and python_version < "4.0"
safetensors==0.3.1 ; python_version >= "3.8" and python_version < "4.0"
setuptools==67.8.0 ; python_version >= "3.8" and python_version < "4.0"
smart-open==6.3.0 ; python_version >= "3.8" and python_version < "4.0"
spacy-alignments==0.8.6 ; python_version >= "3.8" and python_version < "4.0"
spacy-legacy==3.0.12 ; python_version >= "3.8" and python_version < "4.0"
spacy-loggers==1.0.4 ; python_version >= "3.8" and python_version < "4.0"
spacy-transformers==1.2.4 ; python_version >= "3.8" and python_version < "4.0"
spacy-transformers==1.2.5 ; python_version >= "3.8" and python_version < "4.0"
spacy==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
spacy[transformers]==3.5.3 ; python_version >= "3.8" and python_version < "4.0"
srsly==2.4.6 ; python_version >= "3.8" and python_version < "4.0"
Expand All @@ -63,8 +64,8 @@ tokenizers==0.13.3 ; python_version >= "3.8" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.8" and python_full_version < "3.11.0a7"
torch==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
tqdm==4.65.0 ; python_version >= "3.8" and python_version < "4.0"
transformers==4.29.2 ; python_version >= "3.8" and python_version < "4.0"
transformers[ja]==4.29.2 ; python_version >= "3.8" and python_version < "4.0"
transformers==4.30.2 ; python_version >= "3.8" and python_version < "4.0"
transformers[ja]==4.30.2 ; python_version >= "3.8" and python_version < "4.0"
typer==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
typing-extensions==4.6.3 ; python_version >= "3.8" and python_version < "4.0"
unidic-lite==1.0.8 ; python_version >= "3.8" and python_version < "4.0"
Expand Down
4 changes: 2 additions & 2 deletions spacy_partial_tagger/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from partial_tagger.data import CharBasedTags, LabelSet
from partial_tagger.data.batch.tag import TagsBatch
from partial_tagger.data.batch.text import create_token_based_tags
from partial_tagger.training import expected_entity_ratio_loss
from partial_tagger.training import compute_partially_supervised_loss
from partial_tagger.utils import create_tag
from spacy import util
from spacy.errors import Errors
Expand Down Expand Up @@ -139,7 +139,7 @@ def get_loss(
device=scores_pt.device,
)

loss = expected_entity_ratio_loss(
loss = compute_partially_supervised_loss(
scores_pt, tag_bitmap, mask, self.label_set.get_outside_index()
)

Expand Down
4 changes: 2 additions & 2 deletions spacy_partial_tagger/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import spacy_alignments as tokenizations
from partial_tagger.data import LabelSet
from partial_tagger.decoders.viterbi import Contrainer, ViterbiDecoder
from partial_tagger.decoders.viterbi import Constrainer, ViterbiDecoder
from partial_tagger.encoders.transformer import TransformerModelEncoderFactory
from partial_tagger.tagger import SequenceTagger
from transformers import PreTrainedTokenizer
Expand All @@ -15,7 +15,7 @@ def create_tagger(
TransformerModelEncoderFactory(model_name).create(label_set),
ViterbiDecoder(
padding_index,
Contrainer(
Constrainer(
label_set.get_start_states(),
label_set.get_end_states(),
label_set.get_transitions(),
Expand Down

0 comments on commit 3a5342e

Please sign in to comment.