-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- hauptzweig | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
# Use "eager" update strategy in case cached dependencies are outdated | ||
# Using regular install NOT editable install: see GH #3020 | ||
pip install --upgrade --upgrade-strategy eager torch scikit-learn pytest | ||
- name: Test with pytest | ||
# Ensure we avoid adding current working directory to sys.path: | ||
# - Use "pytest" over "python -m pytest" | ||
# - Use "append" import mode rather than default "prepend" | ||
run: > | ||
pytest bug-121101.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import time | ||
|
||
import torch | ||
from sklearn.datasets import fetch_california_housing | ||
|
||
|
||
def test_something(): | ||
X, y = fetch_california_housing(return_X_y=True) | ||
torch.tensor(X) | ||
time.sleep(3) |