From bf866a92b833d69ab67eeede7f25fbf747ee691e Mon Sep 17 00:00:00 2001 From: Traun Leyden Date: Mon, 15 Jul 2024 16:48:22 +0200 Subject: [PATCH] Alignment status (#65) * Alignment status * Linter --- arcee/__init__.py | 2 ++ arcee/api.py | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arcee/__init__.py b/arcee/__init__.py index 5d590c1..4ebb7dc 100644 --- a/arcee/__init__.py +++ b/arcee/__init__.py @@ -4,6 +4,7 @@ from arcee import config from arcee.api import ( + alignment_status, corpus_status, delete_corpus, deployment_status, @@ -57,4 +58,5 @@ "list_pretrainings", "deployment_status", "merging_status", + "alignment_status", ] diff --git a/arcee/api.py b/arcee/api.py index a9f4853..ee49530 100644 --- a/arcee/api.py +++ b/arcee/api.py @@ -313,7 +313,7 @@ def merging_status(merging: str) -> Dict[str, str]: Check the status of a merging job Args: - merging (str): The name of the deployment to check the status + merging (str): The name of the alignment to check the status """ data = {"merging_name": merging} @@ -389,6 +389,18 @@ def start_alignment( return make_request("post", Route.alignment + "/startAlignment", data) +def alignment_status(alignment: str) -> Dict[str, str]: + """ + Check the status of an alignment job + Args: + alignment (str): The name of the alignment to check the status + """ + + data = {"alignment_name": alignment} + + return make_request("get", Route.alignment + "/status", data) + + def upload_alignment(alignment_name: str, alignment_id: str, qa_set_id: str, pretraining_id: str) -> Dict[str, str]: data = { "alignment_name": alignment_name,