8000 Make numpy check optional by pytorchbot · Pull Request #153421 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Make numpy check optional #153421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make numpy check optional (#149356)
We may want to skip numpy smoke tests. Hence making it optional

Pull Request resolved: #149356
Approved by: https://github.com/ZainRizvi

(cherry picked from commit 6e2b266)
  • Loading branch information
atalman authored and pytorchbot committed May 12, 2025
commit f0e7257ecbedb24df19ddafd66694874fdd12037
10 changes: 7 additions & 3 deletions .ci/pytorch/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ def read_release_matrix():


def test_numpy():
import numpy as np
try:
import numpy as np

x = np.arange(5)
torch.tensor(x)
x = np.arange(5)
torch.tensor(x)
except ImportError:
print("Numpy check skipped. Numpy is not installed.")


def check_version(package: str) -> None:
Expand Down Expand Up @@ -410,6 +413,7 @@ def main() -> None:
smoke_test_conv2d()
test_linalg()
test_numpy()

if is_cuda_system:
test_linalg("cuda")
test_cuda_gds_errors_captured()
Expand Down
Loading
0