Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix responsibleai toolbox build failures due to dependency updates #2571

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/CI-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ jobs:
pip install --upgrade setuptools
pip install --upgrade "pip-tools<=7.1.0"

- if: ${{ matrix.operatingSystem == 'macos-latest' }}
name: Use Homebrew to install libomp on MacOS
run: |
brew install libomp

- name: Install package dependencies
run: |
pip install -r requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-raiwidgets-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: Install latest numpy from conda-forge for MacOS
shell: bash -l {0}
run: |
conda install --yes --quiet -c conda-forge numpy
conda install --yes --quiet -c conda-forge "numpy<2.0.0"

- if: ${{ matrix.operatingSystem == 'macos-latest' }}
name: Use Homebrew to install libomp on MacOS
Expand Down
2 changes: 1 addition & 1 deletion erroranalysis/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.17.2
numpy>=1.17.2,<2.0.0
pandas>=0.25.1,<2.0.0
scipy>=1.4.1
scikit-learn>=0.22.1
Expand Down
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
1 change: 1 addition & 0 deletions rai_test_utils/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pytest-mock==3.6.1
requirements-parser==0.2.0

pandas>=0.25.1,<2.0.0
numpy<2.0.0
ml-wrappers
requests
Pillow>=10.0.0; python_version>"3.7" # due to breaking changes in v10.0.0 (https://pillow.readthedocs.io/en/latest/releasenotes/10.0.0.html)
Expand Down
3 changes: 2 additions & 1 deletion raiutils/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pytest-mock==3.6.1

requirements-parser==0.2.0

pandas>=0.25.1,<2.0.0
pandas>=0.25.1,<2.0.0
numpy<2.0.0
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
2 changes: 1 addition & 1 deletion responsibleai_text/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.17.2
numpy>=1.17.2,<2.0.0
pandas>=0.25.1
scikit-learn>=0.22.1
scipy>=1.4.1
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
2 changes: 1 addition & 1 deletion responsibleai_vision/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.17.2
numpy>=1.17.2,<2.0.0
pandas>=0.25.1,<2.0.0 # TODO: remove ceiling on version.
Pillow>=10.0.0; python_version>"3.7" # due to breaking changes in v10.0.0 (https://pillow.readthedocs.io/en/latest/releasenotes/10.0.0.html)
Pillow<10.0.0; python_version<="3.7" # Pillow v10.0.0 is only available starting with Python 3.8
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
Loading