Skip to content

Commit

Permalink
Make smoke-test runnable without envvars
Browse files Browse the repository at this point in the history
  • Loading branch information
malfet committed Sep 26, 2023
1 parent 410ec8e commit ef74ced
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ def check_version(package: str) -> None:
# only makes sense to check nightly package where dates are known
if channel == "nightly":
check_nightly_binaries_date(package)
else:
elif stable_version is not None:
if not torch.__version__.startswith(stable_version):
raise RuntimeError(
f"Torch version mismatch, expected {stable_version} for channel {channel}. But its {torch.__version__}"
)
else:
print(f"Skip version check for channel {channel} as stable version is None")

def check_nightly_binaries_date(package: str) -> None:
from datetime import datetime, timedelta
Expand Down

0 comments on commit ef74ced

Please sign in to comment.