From b685e95c0ae626387d4c9b4a82caf3f548bd895b Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 3 Mar 2023 11:37:28 -0800 Subject: [PATCH 1/2] Fix failing smoke test --- test/smoke_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index f965c6f6aa4..e04ca7febda 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -2,7 +2,7 @@ import os from pathlib import Path -from sys import platform +import sys import torch import torch.nn as nn @@ -37,7 +37,7 @@ def smoke_test_compile() -> None: out = model(x) print(f"torch.compile model output: {out.shape}") except RuntimeError: - if platform == "win32": + if sys.platform == "win32": print("Successfully caught torch.compile RuntimeError on win") elif sys.version_info >= (3, 11, 0): print("Successfully caught torch.compile RuntimeError on Python 3.11") From ff28d5abaf7079491f8dd46e28fc7657684bc508 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 3 Mar 2023 12:23:41 -0800 Subject: [PATCH 2/2] lint --- test/smoke_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index e04ca7febda..1f1364512ee 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -1,8 +1,8 @@ """Run smoke tests""" import os -from pathlib import Path import sys +from pathlib import Path import torch import torch.nn as nn