Skip to content

Commit

Permalink
Merge pull request #56 from AryaXAI/bugfix_test
Browse files Browse the repository at this point in the history
Handling errors
  • Loading branch information
chintanarya authored Sep 26, 2024
2 parents c7df1b5 + 4411c3c commit d7ec85b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions aryaxai/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion aryaxai/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)}"
Expand Down Expand Up @@ -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": {},
Expand Down

0 comments on commit d7ec85b

Please sign in to comment.