Skip to content

Commit d5768e0

Browse files
committed
指定プロジェクトの自動アノテーション実行履歴取得メソッドを追加
1 parent 32166b8 commit d5768e0

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

fastlabel/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4727,6 +4727,37 @@ def execute_evaluation_job(
47274727
payload={key: value for key, value in payload.items() if value is not None},
47284728
)
47294729

4730+
def get_auto_annotation_jobs(
4731+
self,
4732+
project: str,
4733+
offset: int = None,
4734+
limit: int = 1000,
4735+
) -> list:
4736+
"""
4737+
Returns a list of auto-annotation jobs.
4738+
Returns up to 1000 at a time, to get more, set offset as the starting position
4739+
to fetch.
4740+
project is slug of your project (Required).
4741+
offset is the starting position number to fetch (Optional).
4742+
limit is the max number to fetch (Optional).
4743+
"""
4744+
if project is None:
4745+
raise FastLabelInvalidException(
4746+
"Project is required.", 422
4747+
)
4748+
if limit > 1000:
4749+
raise FastLabelInvalidException(
4750+
"Limit must be less than or equal to 1000.", 422
4751+
)
4752+
endpoint = "auto-annotations"
4753+
params = {"project": project}
4754+
if offset:
4755+
params["offset"] = offset
4756+
if limit:
4757+
params["limit"] = limit
4758+
4759+
return self.api.get_request(endpoint, params=params)
4760+
47304761
def execute_auto_annotation_job(
47314762
self,
47324763
project: str,

0 commit comments

Comments
 (0)