Skip to content

Commit 6e6820a

Browse files
authored
Add python 3.11 to test-check.yaml (#1385)
1 parent 23ae4ed commit 6e6820a

File tree

5 files changed

+16
-97
lines changed

5 files changed

+16
-97
lines changed

.github/workflows/test-check.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: [3.8, 3.9, '3.10']
29+
python-version: [3.8, 3.9, '3.11']
3030
os: [ubuntu-20.04]
3131
runs-on: ${{ matrix.os }}
3232
steps:
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
python-version: [3.8, 3.9, '3.10']
55+
python-version: [3.8, 3.9, '3.11']
5656
os: [ubuntu-20.04]
5757
runs-on: ${{ matrix.os }}
5858
steps:
@@ -97,6 +97,6 @@ jobs:
9797
- name: "Clean sparsezoo directory"
9898
run: rm -r sparsezoo/
9999
- name: ⚙️ Install dependencies
100-
run: pip install .[dev,server,image_classification,transformers,haystack]
100+
run: pip install .[dev,haystack]
101101
- name: Run integrations tests
102102
run: make test_integrations

setup.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,8 @@ def _parse_requirements_file(file_path):
130130
"onnxruntime>=1.7.0",
131131
]
132132
_torch_deps = ["torch>=1.7.0,<=2.0"]
133-
_image_classification_deps = [
134-
"torchvision>=0.3.0,<0.14",
135-
"opencv-python<=4.6.0.66",
136-
]
137-
_yolo_integration_deps = [
138-
"torchvision>=0.3.0,<=0.15.1",
133+
_computer_vision_deps = [
134+
"torchvision>=0.3.0,<0.16",
139135
"opencv-python<=4.6.0.66",
140136
]
141137
_openpifpaf_integration_deps = [
@@ -144,7 +140,7 @@ def _parse_requirements_file(file_path):
144140
"pycocotools >=2.0.6",
145141
"scipy==1.10.1",
146142
]
147-
_yolov8_integration_deps = _yolo_integration_deps + ["ultralytics==8.0.124"]
143+
_yolov8_integration_deps = _computer_vision_deps + ["ultralytics==8.0.124"]
148144
_transformers_integration_deps = [
149145
"transformers<4.35",
150146
"datasets<=2.14.6",
@@ -166,7 +162,7 @@ def _parse_requirements_file(file_path):
166162
_haystack_integration_deps = _parse_requirements_file(_haystack_requirements_file_path)
167163
_clip_deps = [
168164
"open_clip_torch==2.20.0",
169-
"scipy<1.9.2,>=1.8",
165+
"scipy<1.10,>=1.8",
170166
"transformers<4.35",
171167
]
172168

@@ -267,9 +263,9 @@ def _setup_extras() -> Dict:
267263
"dev": _dev_deps,
268264
"server": _server_deps,
269265
"onnxruntime": _onnxruntime_deps,
270-
"image_classification": _image_classification_deps,
271-
"yolo": _yolo_integration_deps,
272-
"yolov5": _yolo_integration_deps,
266+
"image_classification": _computer_vision_deps,
267+
"yolo": _computer_vision_deps,
268+
"yolov5": _computer_vision_deps,
273269
"haystack": _haystack_integration_deps,
274270
"openpifpaf": _openpifpaf_integration_deps,
275271
"yolov8": _yolov8_integration_deps,

src/deepsparse/transformers/haystack/haystack_reqs.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# deepsparse/transformers/haystack/__init__.py
1717

1818
importlib-metadata
19-
torch==1.12.1
19+
torch>=1.12.1
2020
requests
2121
pydantic
2222
nltk
@@ -60,7 +60,7 @@ pillow
6060
pdf2image==1.14.0
6161
onnxruntime
6262
onnxruntime_tools
63-
ray>=1.9.1,<2
63+
ray
6464
aiorwlock>=1.3.0,<2
6565
grpcio==1.43.0
6666
beir

tests/deepsparse/loggers/metric_functions/predefined/test_predefined.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ def test_group_name(mock_engine, group_name, pipeline_name, inputs, optional_ind
159159

160160
with open(expected_logs, "r") as f:
161161
expected_logs = f.read().splitlines()
162-
for log, expected_log in zip(data_logging_logs, expected_logs):
163-
assert log == expected_log
162+
expected_logs = set(expected_logs)
163+
164+
for data_logging_log in data_logging_logs:
165+
assert data_logging_log in expected_logs, f"Unexpected log: {data_logging_log}"
164166

165167

166168
yaml_config = """

tests/examples/test_twitter_nlp.py

-79
This file was deleted.

0 commit comments

Comments
 (0)