From ef74cedc67d27d73df4b3586c804b0591bfdf7b8 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Tue, 26 Sep 2023 10:31:09 -0700 Subject: [PATCH] Make smoke-test runnable without envvars --- test/smoke_test/smoke_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/smoke_test/smoke_test.py b/test/smoke_test/smoke_test.py index 539f1ba1b..375ff45be 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -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