|
3 | 3 | # Use of this source code is governed by a BSD-3-Clause license that can |
4 | 4 | # be found in the LICENSE file or at https://opensource.org/licenses/BSD-3-Clause |
5 | 5 |
|
6 | | -.PHONY: _maybe_patch_pyproject all api-list build check clean distclean distclean-all docs docs-clean docs-open env env-all env-docs env-highest-torch env-tutorial render-api-index set-auto-venv test test-cov test-fast test-highest-pytorch test-lowest-pytorch test-slow test-smoke test-tutorials version |
| 6 | +.PHONY: _maybe_patch_pyproject all api-list build check clean distclean distclean-all docs docs-clean docs-open env env-all env-docs env-highest-torch env-lowest-torch env-tutorial render-api-index set-auto-venv test test-cov test-fast test-highest-pytorch test-lowest-pytorch test-slow test-smoke test-tutorials version |
7 | 7 |
|
8 | 8 | SHELL := /bin/bash |
9 | 9 |
|
@@ -190,6 +190,11 @@ env-highest-torch: _maybe_patch_pyproject |
190 | 190 | @TORCH_GROUP=$(HIGHEST_TORCH_GROUP) $(SETUP_ENV) --venv $(VENV_HIGHEST_TORCH) --python-version $(PYTHON_VERSION) |
191 | 191 | @$(call write_active_venv,$(VENV_HIGHEST_TORCH)) |
192 | 192 |
|
| 193 | +# Set up development environment with lowest supported PyTorch version |
| 194 | +env-lowest-torch: _maybe_patch_pyproject |
| 195 | + @TORCH_GROUP=$(LOWEST_TORCH_GROUP) $(SETUP_ENV) --venv $(VENV_LOWEST_TORCH) --python-version $(PYTHON_VERSION) |
| 196 | + @$(call write_active_venv,$(VENV_LOWEST_TORCH)) |
| 197 | + |
193 | 198 | # Set up environment for running tutorials (quantization notebook) |
194 | 199 | env-tutorial: _maybe_patch_pyproject |
195 | 200 | @$(SETUP_ENV) --venv $(VENV_TUTORIAL) --python-version $(PYTHON_VERSION) --with-tutorial |
@@ -254,18 +259,18 @@ test-smoke: |
254 | 259 | echo "All smoke tests passed!" |
255 | 260 |
|
256 | 261 | # Run tests on lowest supported PyTorch version (pass PYTEST_ARGS for custom flags) |
257 | | -test-lowest-pytorch: |
| 262 | +test-lowest-pytorch: env-lowest-torch |
258 | 263 | @echo "Running tests on lowest PyTorch version supported..." |
259 | | - @TORCH_GROUP=$(LOWEST_TORCH_GROUP) $(call use_env,VENV_LOWEST_TORCH) && \ |
| 264 | + @source $(VENV_LOWEST_TORCH)/bin/activate && \ |
260 | 265 | echo "Testing with lowest supported PyTorch versions" && \ |
261 | 266 | uv run --no-sync --active python $(SCRIPTS)/make/log_versions.py && \ |
262 | 267 | $(RUN_TESTS) $(PYTEST_ARGS) && \ |
263 | 268 | echo "All tests passed!" |
264 | 269 |
|
265 | 270 | # Run tests on highest supported PyTorch version (pass PYTEST_ARGS for custom flags) |
266 | | -test-highest-pytorch: |
| 271 | +test-highest-pytorch: env-highest-torch |
267 | 272 | @echo "Running tests on highest PyTorch version supported..." |
268 | | - @TORCH_GROUP=$(HIGHEST_TORCH_GROUP) $(call use_env,VENV_HIGHEST_TORCH) && \ |
| 273 | + @source $(VENV_HIGHEST_TORCH)/bin/activate && \ |
269 | 274 | echo "Testing with latest supported PyTorch versions" && \ |
270 | 275 | uv run --no-sync --active python $(SCRIPTS)/make/log_versions.py && \ |
271 | 276 | $(RUN_TESTS) $(PYTEST_ARGS) && \ |
|
0 commit comments