Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove pie-utils from dependencies and update pytorch-ie #143

Merged
merged 1 commit into from
Nov 14, 2023
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
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# --------- pytorch-ie --------- #
pytorch-ie>=0.28.0,<0.29.0
pytorch-ie>=0.28.0,<0.30.0
pie-datasets>=0.3.1,<0.4.0
# pie-utils provides some useful helper methods for pytorch-ie,
# e.g. document processors or span utils (convert span annotations
# to sequence encodings such as BIO, IO or BIOUL, and back).
git+https://github.com/ArneBinder/[email protected]

# --------- hydra --------- #
hydra-core>=1.3.0
Expand Down
13 changes: 6 additions & 7 deletions src/pipeline/ner_re_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from functools import partial
from typing import Callable, Dict, List, Optional, Sequence, TypeVar

from pie_utils.document.processors import CandidateRelationAdder
from pytorch_ie import AutoPipeline
from pytorch_ie.core import Document

Expand Down Expand Up @@ -170,12 +169,12 @@ def __call__(self, documents: Sequence[Document], inplace: bool = False):
layer_names=["entities"],
**self.processor_kwargs.get("use_predicted_entities", {}),
),
"create_candidate_relations": partial(
process_documents,
processor=CandidateRelationAdder(
**self.processor_kwargs.get("create_candidate_relations", {})
),
),
# "create_candidate_relations": partial(
# process_documents,
# processor=CandidateRelationAdder(
# **self.processor_kwargs.get("create_candidate_relations", {})
# ),
# ),
"re_pipeline": AutoPipeline.from_pretrained(
self.re_model_path, **self.processor_kwargs.get("re_pipeline", {})
),
Expand Down
Loading