Fix responsibleai toolbox build failures due to dependency updates (#2571)
This commit is contained in:
Родитель
1570b17bb8
Коммит
d5f820bd65
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
|
@ -149,6 +149,8 @@ class FairnessDashboard(Dashboard):
|
|||
][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":
|
||||
|
@ -161,9 +163,7 @@ class FairnessDashboard(Dashboard):
|
|||
"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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче