Skip to content

Commit

Permalink
Fix responsibleai toolbox build failures due to dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft committed Jun 28, 2024
1 parent 1570b17 commit 1f63c41
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"\n",
"def load_dataset(split):\n",
" config_kwargs = {\"name\": \"title_genre_classifiction\"}\n",
" dataset = datasets.load_dataset(\"blbooksgenre\", split=split, **config_kwargs)\n",
" dataset = datasets.load_dataset(\"blbooksgenre\", split=split, trust_remote_code=True, **config_kwargs)\n",
" return pd.DataFrame({\"text\": dataset[\"title\"], \"label\": dataset[\"label\"]})\n",
"\n",
"pd_data = load_dataset(\"train\")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
" os.makedirs(\"data\", exist_ok=True)\n",
"\n",
" # download data\n",
" download_url = (\"https://cvbp-secondary.z19.web.core.windows.net/\" +\n",
" \"datasets/object_detection/odFridgeObjects.zip\")\n",
" download_url = (\"https://publictestdatasets.blob.core.windows.net/\" +\n",
" \"computervision/odFridgeObjects.zip\")\n",
" data_file = \"./odFridgeObjects.zip\"\n",
" urlretrieve(download_url, filename=data_file)\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def load_fridge_object_detection_dataset():
os.makedirs("data", exist_ok=True)

# download data
download_url = ("https://cvbp-secondary.z19.web.core.windows.net/" +
"datasets/object_detection/odFridgeObjects.zip")
download_url = ("https://publictestdatasets.blob.core.windows.net/" +
"computervision/odFridgeObjects.zip")
data_file = "./odFridgeObjects.zip"
request_file.urlretrieve(download_url, filename=data_file)

Expand Down
6 changes: 3 additions & 3 deletions raiwidgets/raiwidgets/fairness_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def metrics():
][0].values()),
}}
if error_function_name in metric_method:
group_by_error = metric_frame.by_group[error_function_name]
bounds_list = list(group_by_error.to_dict().values())
result["data"].update({
"bounds": {
"lower":
Expand All @@ -161,9 +163,7 @@ def metrics():
"lower": bounds[0],
"upper": bounds[1]
}
for bounds in list(
metric_frame.by_group[error_function_name]\
.to_dict().values())]
for bounds in bounds_list]
})
return jsonify(result)
except Exception as ex:
Expand Down
1 change: 1 addition & 0 deletions responsibleai_text/tests/common_text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def load_covid19_emergency_event_dataset(with_metadata=False):
def load_blbooks_genre_dataset():
config_kwargs = {"name": "annotated_raw"}
dataset = datasets.load_dataset("blbooksgenre", split="train",
trust_remote_code=True,
**config_kwargs)
grouping_col = 'BL record ID'
columns = {"text": dataset["Title"],
Expand Down
4 changes: 2 additions & 2 deletions responsibleai_vision/tests/common_vision_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ def load_fridge_object_detection_dataset(automl_format=False):
os.makedirs("data", exist_ok=True)

# download data
download_url = ("https://cvbp-secondary.z19.web.core.windows.net/" +
"datasets/object_detection/odFridgeObjects.zip")
download_url = ("https://publictestdatasets.blob.core.windows.net/" +
"computervision/odFridgeObjects.zip")
data_file = "./odFridgeObjects.zip"
retrieve_unzip_file(download_url, data_file)

Expand Down

0 comments on commit 1f63c41

Please sign in to comment.