From 3a313ab1ebb5ce2633e30945e90ca0b0342f4b93 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Wed, 17 Apr 2024 18:38:56 +0200 Subject: [PATCH] use annotation types from pytorch-ie --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- src/pie_datasets/builders/brat.py | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 793076c5..49b46faf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1213,13 +1213,13 @@ files = [ [[package]] name = "pytorch-ie" -version = "0.30.2" +version = "0.30.3" description = "State-of-the-art Information Extraction in PyTorch" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "pytorch_ie-0.30.2-py3-none-any.whl", hash = "sha256:3ba70c27e999824ae0e568ab3cf31b89f8cf253c9b08653a380422c93a9fea0f"}, - {file = "pytorch_ie-0.30.2.tar.gz", hash = "sha256:b4e45c72e9d461d0c8ba1deb83341bffa51265b89be087ff54924c7f700cfb21"}, + {file = "pytorch_ie-0.30.3-py3-none-any.whl", hash = "sha256:45b0d32817ee5803e785cd75c88eb4fc84cc5764eb05f199a820d22db3f434e3"}, + {file = "pytorch_ie-0.30.3.tar.gz", hash = "sha256:9743d27e430ba4f21a62362a8873cf9d71549477231b6216a19827ec6f3aa963"}, ] [package.dependencies] @@ -2165,4 +2165,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f9af09e2df802bc9f18ec18345e2d611dbc8f689e44723dce66ff51cd1dc5560" +content-hash = "b08950259b0c8dc04a2a975f39c4a835b4fb3f327afced1e3bc6a152a4966a18" diff --git a/pyproject.toml b/pyproject.toml index 2263c5b5..b7876334 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.9" -pytorch-ie = ">=0.29.4,<0.31.0" +pytorch-ie = ">=0.30.3,<0.31.0" # <2.16.0 because of https://github.com/ArneBinder/pie-datasets/issues/93 datasets = ">=2.14.0,<2.16.0" # this was manually added because we get a conflict with pyarrow otherwise diff --git a/src/pie_datasets/builders/brat.py b/src/pie_datasets/builders/brat.py index 69a16339..f22211c7 100644 --- a/src/pie_datasets/builders/brat.py +++ b/src/pie_datasets/builders/brat.py @@ -4,9 +4,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union import datasets -from pie_modules.annotations import BinaryRelation, LabeledMultiSpan, LabeledSpan -from pytorch_ie import Document -from pytorch_ie.core import Annotation, AnnotationList, annotation_field +from pytorch_ie.annotations import BinaryRelation, LabeledMultiSpan, LabeledSpan +from pytorch_ie.core import Annotation, AnnotationList, Document, annotation_field from pytorch_ie.documents import TextBasedDocument from pie_datasets import GeneratorBasedBuilder