Skip to content

Commit

Permalink
Merge pull request #58 from AryaXAI/bugfix_test
Browse files Browse the repository at this point in the history
Dtree prediction path - API split fix
  • Loading branch information
chintanarya authored Nov 4, 2024
2 parents 1d049d1 + 26d6ae0 commit b90d888
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions aryaxai/common/xai_uris.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
GET_CASES_URI = f"{API_VERSION_V2}/ai-models/get_cases"
SEARCH_CASE_URI = f"{API_VERSION_V2}/ai-models/search_case"
CASE_INFO_URI = f"{API_VERSION_V2}/ai-models/get_case_info"
CASE_DTREE_URI = f"{API_VERSION_V2}/ai-models/get_case_dtree"
DELETE_CASE_URI = f"{API_VERSION_V2}/project/delete_data_with_filter"
CASE_LOGS_URI = f"{API_VERSION_V2}/ai-models/explainability_logs"
GET_VIEWED_CASE_URI = f"{API_VERSION_V2}/ai-models/get_viewed_case"
Expand Down
13 changes: 13 additions & 0 deletions aryaxai/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
AVAILABLE_SYNTHETIC_CUSTOM_SERVERS_URI,
AVAILABLE_TAGS_URI,
CASE_INFO_URI,
CASE_DTREE_URI,
CASE_LOGS_URI,
CLEAR_NOTIFICATIONS_URI,
CREATE_OBSERVATION_URI,
Expand Down Expand Up @@ -2256,6 +2257,18 @@ def case_info(
if not res["success"]:
raise Exception(res["details"])

prediction_path_payload = {
"project_name": self.project_name,
"unique_identifier": unique_identifer,
"case_id": case_id,
"model_name": res["details"]["model_name"],
"data_id": res["details"]["data_id"],
}
dtree_res = self.api_client.post(CASE_DTREE_URI, prediction_path_payload)
if dtree_res["success"]:
res["details"]["case_prediction_svg"] = dtree_res["details"]["case_prediction_svg"]
res["details"]["case_prediction_path"] = dtree_res["details"]["case_prediction_path"]

case = Case(**res["details"])

return case
Expand Down

0 comments on commit b90d888

Please sign in to comment.