diff --git a/.github/workflows/CI-python.yml b/.github/workflows/CI-python.yml index fcaae683e0..f2a4ad1b17 100644 --- a/.github/workflows/CI-python.yml +++ b/.github/workflows/CI-python.yml @@ -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 diff --git a/.github/workflows/CI-raiwidgets-pytest.yml b/.github/workflows/CI-raiwidgets-pytest.yml index 62bc796bf3..f463b8a2e2 100644 --- a/.github/workflows/CI-raiwidgets-pytest.yml +++ b/.github/workflows/CI-raiwidgets-pytest.yml @@ -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 diff --git a/erroranalysis/requirements.txt b/erroranalysis/requirements.txt index e27f58372c..336d0e67d0 100644 --- a/erroranalysis/requirements.txt +++ b/erroranalysis/requirements.txt @@ -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 diff --git a/notebooks/responsibleaidashboard/text/responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.ipynb b/notebooks/responsibleaidashboard/text/responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.ipynb index 1696ca2b0c..bb46d0591e 100644 --- a/notebooks/responsibleaidashboard/text/responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.ipynb +++ b/notebooks/responsibleaidashboard/text/responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.ipynb @@ -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", diff --git a/notebooks/responsibleaidashboard/vision/responsibleaidashboard-fridge-object-detection-model-debugging.ipynb b/notebooks/responsibleaidashboard/vision/responsibleaidashboard-fridge-object-detection-model-debugging.ipynb index 3b682544bf..6817ae269c 100644 --- a/notebooks/responsibleaidashboard/vision/responsibleaidashboard-fridge-object-detection-model-debugging.ipynb +++ b/notebooks/responsibleaidashboard/vision/responsibleaidashboard-fridge-object-detection-model-debugging.ipynb @@ -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", diff --git a/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py b/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py index aab731f743..b296e8c1e7 100644 --- a/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py +++ b/rai_test_utils/rai_test_utils/datasets/vision/object_detection_data_utils.py @@ -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) diff --git a/rai_test_utils/requirements-dev.txt b/rai_test_utils/requirements-dev.txt index 99a6b50def..7abf875ff0 100644 --- a/rai_test_utils/requirements-dev.txt +++ b/rai_test_utils/requirements-dev.txt @@ -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) diff --git a/raiutils/requirements-dev.txt b/raiutils/requirements-dev.txt index c35f2d8556..a26f47150e 100644 --- a/raiutils/requirements-dev.txt +++ b/raiutils/requirements-dev.txt @@ -4,4 +4,5 @@ pytest-mock==3.6.1 requirements-parser==0.2.0 -pandas>=0.25.1,<2.0.0 \ No newline at end of file +pandas>=0.25.1,<2.0.0 +numpy<2.0.0 \ No newline at end of file diff --git a/raiwidgets/raiwidgets/fairness_dashboard.py b/raiwidgets/raiwidgets/fairness_dashboard.py index d6272f3630..bc32edaf4c 100644 --- a/raiwidgets/raiwidgets/fairness_dashboard.py +++ b/raiwidgets/raiwidgets/fairness_dashboard.py @@ -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": @@ -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: diff --git a/responsibleai_text/requirements.txt b/responsibleai_text/requirements.txt index 3ca6348519..6a8d7090fc 100644 --- a/responsibleai_text/requirements.txt +++ b/responsibleai_text/requirements.txt @@ -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 diff --git a/responsibleai_text/tests/common_text_utils.py b/responsibleai_text/tests/common_text_utils.py index 6b29c60a50..90d46b09da 100644 --- a/responsibleai_text/tests/common_text_utils.py +++ b/responsibleai_text/tests/common_text_utils.py @@ -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"], diff --git a/responsibleai_vision/requirements.txt b/responsibleai_vision/requirements.txt index b1d8618088..195230dab0 100644 --- a/responsibleai_vision/requirements.txt +++ b/responsibleai_vision/requirements.txt @@ -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 diff --git a/responsibleai_vision/tests/common_vision_utils.py b/responsibleai_vision/tests/common_vision_utils.py index 63239c5b7a..b3f63c6bd0 100644 --- a/responsibleai_vision/tests/common_vision_utils.py +++ b/responsibleai_vision/tests/common_vision_utils.py @@ -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)