From b93b22393f50a6a7adf65ed192917ae556932af0 Mon Sep 17 00:00:00 2001 From: Siddhant Mishra Date: Wed, 25 Sep 2024 18:32:22 +0530 Subject: [PATCH] Handling errors --- aryaxai/common/types.py | 1 + aryaxai/core/project.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/aryaxai/common/types.py b/aryaxai/common/types.py index 66d42eb..0db178c 100644 --- a/aryaxai/common/types.py +++ b/aryaxai/common/types.py @@ -9,6 +9,7 @@ class ProjectConfig(TypedDict): pred_label: Optional[str] feature_exclude: Optional[List[str]] drop_duplicate_uid: Optional[bool] + handle_errors: Optional[bool] class DataConfig(TypedDict): diff --git a/aryaxai/core/project.py b/aryaxai/core/project.py index 84532f3..0d5471c 100755 --- a/aryaxai/core/project.py +++ b/aryaxai/core/project.py @@ -532,7 +532,8 @@ def upload_data( "true_label": "", "pred_label": "", "feature_exclude": [], - "drop_duplicate_uid: "" + "drop_duplicate_uid: "", + "handle_errors": False }, defaults to None :return: response @@ -576,6 +577,7 @@ def upload_file_and_return_path() -> str: "pred_label": "", "feature_exclude": [], "drop_duplicate_uid": False, + "handle_errors": False } raise Exception( f"Project Config is required, since no config is set for project \n {json.dumps(config,indent=1)}" @@ -633,6 +635,7 @@ def upload_file_and_return_path() -> str: "tag": tag, "tags": [tag], "drop_duplicate_uid": config.get("drop_duplicate_uid"), + "handle_errors": config.get("handle_errors", False), "feature_exclude": feature_exclude, "feature_include": feature_include, "feature_encodings": {},