Skip to content

Commit 426b719

Browse files
authored
Release v1 (#1596)
* test * test * test
1 parent 00b194a commit 426b719

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/smoke_test/smoke_test.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44
import argparse
55
import torch
6+
import json
67
import importlib
78
import subprocess
89
import torch._dynamo
@@ -15,6 +16,7 @@
1516
stable_version = os.getenv("MATRIX_STABLE_VERSION")
1617
package_type = os.getenv("MATRIX_PACKAGE_TYPE")
1718
target_os = os.getenv("TARGET_OS")
19+
BASE_DIR = Path(__file__).parent.parent
1820

1921
is_cuda_system = gpu_arch_type == "cuda"
2022
NIGHTLY_ALLOWED_DELTA = 3
@@ -54,11 +56,8 @@ def forward(self, x):
5456

5557
def load_json_from_basedir(filename: str):
5658
try:
57-
if os.path.exists(BASE_DIR / filename):
58-
with open(BASE_DIR / filename) as fptr:
59-
return json.load(fptr)
60-
else:
61-
return None
59+
with open(BASE_DIR / filename) as fptr:
60+
return json.load(fptr)
6261
except FileNotFoundError as exc:
6362
raise ImportError(f"File {filename} not found error: {exc.strerror}") from exc
6463
except json.JSONDecodeError as exc:

0 commit comments

Comments
 (0)