Skip to content

Commit

Permalink
upgrade pie-related dependencies (#161)
Browse files Browse the repository at this point in the history
* upgrade pytorch-ie ^0.30, pie-datasets to ^0.9, pie-modules to ^0.11

* fix Attribute annotation

* minor improvement
  • Loading branch information
ArneBinder authored Apr 4, 2024
1 parent ff25bcd commit 76b0454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 3 additions & 4 deletions src/document/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ def __post_init__(self) -> None:
raise ValueError("score must be a single float.")

def __str__(self) -> str:
if self.target is not None:
result = f"label={self.label},annotation={self.annotation}"
else:
result = f"label={self.label}"
result = f"label={self.label}"
if self.is_attached:
result += f",annotation={self.annotation}"
if self.type is not None:
result += f",type={self.type}"
if self.score is not None:
Expand Down

0 comments on commit 76b0454

Please sign in to comment.