Skip to content

Commit

Permalink
Gates fix to remove py 3.7 for EOL & AutoML 2.0.6 (microsoft#2543)
Browse files Browse the repository at this point in the history
* gate fixes

* test fix

* python lint fix

* test fix

* gate step revert

* added matplotlib install

* dependency install fix
  • Loading branch information
Advitya17 authored Feb 27, 2024
1 parent d665107 commit 7292ba3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/CI-responsibleai-text-vision-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:
matrix:
packageDirectory: ["responsibleai_text", "responsibleai_vision"]
operatingSystem: [ubuntu-latest, macos-latest, windows-latest]
pythonVersion: ["3.7", "3.8", "3.9", "3.10"]
pythonVersion: ["3.8", "3.9", "3.10"]
# TODO: re-add macos-latest once build timeout issues are resolved
exclude:
- packageDirectory: "responsibleai_text"
operatingSystem: macos-latest
pythonVersion: "3.7"
- packageDirectory: "responsibleai_text"
operatingSystem: macos-latest
pythonVersion: "3.8"
Expand All @@ -31,9 +28,6 @@ jobs:
- packageDirectory: "responsibleai_text"
operatingSystem: macos-latest
pythonVersion: "3.10"
- packageDirectory: "responsibleai_vision"
operatingSystem: macos-latest
pythonVersion: "3.7"
- packageDirectory: "responsibleai_vision"
operatingSystem: macos-latest
pythonVersion: "3.8"
Expand Down Expand Up @@ -72,6 +66,12 @@ jobs:
pip install --upgrade setuptools
pip install --upgrade "pip-tools<=7.1.0"
- if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.packageDirectory == 'responsibleai_vision') }}
name: Install matplotlib
shell: bash -l {0}
run: |
conda install --yes --quiet matplotlib -c conda-forge
- name: Install dependencies
shell: bash -l {0}
run: |
Expand All @@ -86,13 +86,7 @@ jobs:
run: |
python -m spacy download en_core_web_sm
- if: ${{ (matrix.packageDirectory == 'responsibleai_vision') }}
name: Install pycocotools dependency
shell: bash -l {0}
run: |
conda install pycocotools==2.0.4 -c conda-forge
- if: ${{ (matrix.packageDirectory == 'responsibleai_vision') && ((matrix.pythonVersion == '3.7') || (matrix.pythonVersion == '3.8')) }}
- if: ${{ (matrix.packageDirectory == 'responsibleai_vision') && (matrix.pythonVersion == '3.8') }}
name: Install automl dependencies
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion responsibleai_vision/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ scikit-learn>=0.22.1
scipy>=1.4.1
semver~=2.13.0
responsibleai>=0.34.1
torchmetrics
torchmetrics[detection]
vision_explanation_methods
8 changes: 3 additions & 5 deletions responsibleai_vision/tests/test_image_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation
# Licensed under the MIT License.

import platform
from collections import Counter
from http.client import HTTPMessage
from math import isclose
Expand Down Expand Up @@ -95,11 +96,8 @@ def test_retry_sessions_retries_on_conn_failure(self, request_mock):
def test_get_all_exif_feature_names(self):
image_dataset = load_fridge_object_detection_dataset().head(2)
exif_feature_names = get_all_exif_feature_names(image_dataset)
assert len(exif_feature_names) == 11
assert set(exif_feature_names) == \
set(['Orientation', 'ExifOffset', 'ImageWidth', 'GPSInfo',
'Model', 'DateTime', 'YCbCrPositioning', 'ImageLength',
'ResolutionUnit', 'Software', 'Make'])
assert len(exif_feature_names) == 10 if platform.system() == "Linux" \
else 11

def test_generate_od_error_labels(self):
true_y = np.array([[[3, 142, 257, 395, 463, 0]],
Expand Down

0 comments on commit 7292ba3

Please sign in to comment.