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

fix: fix pre annoation exceptions #120

Merged
merged 34 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ce66599
fix: query all pre annotations if sample name is specified
gary-Shen Jun 6, 2024
50d7445
chore(release): 1.0.6-alpha.1 [skip ci]
semantic-release-bot Jun 6, 2024
e48cd86
chore: update todo
gary-Shen Jun 6, 2024
d73207b
Merge branch 'alpha' of https://github.com/opendatalab/labelU into alpha
gary-Shen Jun 6, 2024
e1f5ba3
fix: commit migrate session
gary-Shen Jul 8, 2024
118d791
chore(release): 1.0.6-alpha.2 [skip ci]
semantic-release-bot Jul 8, 2024
f3f5df4
fix: optimize migration
gary-Shen Jul 8, 2024
75a4736
chore(release): 1.0.6-alpha.3 [skip ci]
semantic-release-bot Jul 8, 2024
6f08299
fix: use python 3.11
gary-Shen Jul 8, 2024
012481e
Merge branch 'alpha' of https://github.com/opendatalab/labelU into alpha
gary-Shen Jul 8, 2024
54c4c87
docs: Update readme
gary-Shen Jul 19, 2024
54e63c4
chore: update webhook message payload
gary-Shen Aug 12, 2024
553aca4
fix: revert docs python 3.8
gary-Shen Aug 12, 2024
4cbea77
update: revert docs python 3.8
gary-Shen Aug 12, 2024
04ce35a
fix: update test case
gary-Shen Aug 12, 2024
ef655fd
chore: update ci
gary-Shen Aug 12, 2024
dd8d9a3
fix: fix testcases
gary-Shen Aug 12, 2024
5524fb2
chore: update authors
gary-Shen Aug 12, 2024
69e212c
fix: release alpha to pypi
gary-Shen Aug 12, 2024
8548079
docs: update readme
gary-Shen Aug 12, 2024
d683130
chore(release): 1.0.6-alpha.4 [skip ci]
semantic-release-bot Aug 12, 2024
707ad3c
docs: update ci
gary-Shen Aug 12, 2024
90eceb0
Merge branch 'alpha' of https://github.com/opendatalab/labelU into alpha
gary-Shen Aug 12, 2024
ae6af7f
ci: update ci
gary-Shen Aug 12, 2024
ab2d6dd
fix: Upgrade frontend to v5.3.0-alpha.1. See the details in [release …
gary-Shen Aug 12, 2024
c053ddb
chore(release): 1.0.6-alpha.5 [skip ci]
semantic-release-bot Aug 12, 2024
7a327e0
Merge branch 'main' into alpha
gary-Shen Aug 12, 2024
1d010bf
chore(release): 1.0.6-alpha.6 [skip ci]
semantic-release-bot Aug 12, 2024
8bd755b
fix: Upgrade frontend to v5.3.0-alpha.2. See the details in [release …
gary-Shen Aug 12, 2024
b8c8771
chore(release): 1.0.6-alpha.7 [skip ci]
semantic-release-bot Aug 12, 2024
6b4d1b8
fix: fix pre annoation exceptions
gary-Shen Aug 26, 2024
4267493
Merge branch 'alpha' of https://github.com/opendatalab/labelU into alpha
gary-Shen Aug 26, 2024
d94cb03
chore: merge
gary-Shen Aug 26, 2024
d29b85a
chore(release): 1.0.7-alpha.1 [skip ci]
semantic-release-bot Aug 26, 2024
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: 5 additions & 1 deletion labelu/internal/application/service/pre_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
def read_jsonl_file(db: Session, file_id: int) -> List[dict]:
attachment = crud_attachment.get(db, file_id)
if attachment is None:
raise LabelUException(status_code=404, code=ErrorCode.CODE_51001_TASK_ATTACHMENT_NOT_FOUND)
return []

attachment_path = attachment.path
file_full_path = settings.MEDIA_ROOT.joinpath(attachment_path.lstrip("/"))

# check if the file exists
if not file_full_path.exists() or not attachment.filename.endswith('.jsonl'):
return []

try:
with open(file_full_path, "r", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "labelu"
version = '1.0.6'
version = '1.0.7-alpha.1'
description = ""
license = "Apache-2.0"
authors = ["shenguanlin <[email protected]>"]
Expand Down
Loading