Skip to content

Commit

Permalink
remove os.path checks
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Luar <[email protected]>
  • Loading branch information
luarss committed Oct 13, 2024
1 parent 37c7d9c commit c1dc0b4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,11 @@ def parse_tunable_variables():

# Read from variables.yaml and get variables with tunable = 1
os.chdir(vars_path)
if not os.path.exists("variables.yaml"):
print("[ERROR TUN-0018] variables.yaml not found.")
sys.exit(1)
with open("variables.yaml") as file:
try:
result = yaml.safe_load(file)
except yaml.YAMLError as exc:
print("[ERROR TUN-0019] Error parsing variables.yaml.")
print("[ERROR TUN-0018] Error parsing variables.yaml.")
sys.exit(1)
variables = {key: 1 for key, value in result.items() if value.get("tunable") == 1}

Expand Down

0 comments on commit c1dc0b4

Please sign in to comment.