From 1f8c2ca688a77f7e726d144578f2cf076203b97b Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Thu, 4 Apr 2024 18:51:16 +0200 Subject: [PATCH 1/3] upgrade pytorch-ie ^0.30, pie-datasets to ^0.9, pie-modules to ^0.11 --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 289e569..d8f8ae8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # --------- pytorch-ie --------- # -pytorch-ie>=0.28.0,<0.30.0 -pie-datasets>=0.8.1,<0.9.0 -pie-modules>=0.10.9,<0.11.0 +pytorch-ie>=0.28.0,<0.31.0 +pie-datasets>=0.8.1,<0.10.0 +pie-modules>=0.10.9,<0.12.0 # --------- hydra --------- # hydra-core>=1.3.0 From fa25f28b9bc3e86ae4be69446322abfa4b517b04 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Thu, 4 Apr 2024 19:02:23 +0200 Subject: [PATCH 2/3] fix Attribute annotation --- src/document/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document/types.py b/src/document/types.py index 62c4592..611ebce 100644 --- a/src/document/types.py +++ b/src/document/types.py @@ -22,7 +22,7 @@ def __post_init__(self) -> None: raise ValueError("score must be a single float.") def __str__(self) -> str: - if self.target is not None: + if self.is_attached: result = f"label={self.label},annotation={self.annotation}" else: result = f"label={self.label}" From 3e7b6505415bf98d9d021e2cc8997c641c2e839f Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Thu, 4 Apr 2024 19:03:55 +0200 Subject: [PATCH 3/3] minor improvement --- src/document/types.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/document/types.py b/src/document/types.py index 611ebce..1ccf46c 100644 --- a/src/document/types.py +++ b/src/document/types.py @@ -22,10 +22,9 @@ def __post_init__(self) -> None: raise ValueError("score must be a single float.") def __str__(self) -> str: + result = f"label={self.label}" if self.is_attached: - result = f"label={self.label},annotation={self.annotation}" - else: - result = f"label={self.label}" + result += f",annotation={self.annotation}" if self.type is not None: result += f",type={self.type}" if self.score is not None: