Skip to content

Commit

Permalink
Fixup json load
Browse files Browse the repository at this point in the history
  • Loading branch information
eagarvey-amd committed Oct 17, 2024
1 parent 158a672 commit dd5dd78
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions models/turbine_models/custom_models/torchbench/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def run_main(model_id, args, tb_dir, tb_args):
if args.compile_to in ["torch", "mlir"]:
safe_name = utils.create_safe_name(
model_id,
f"_{static_dim}_{precision}",
f"_{static_dim}_{args.precision}",
)
with open(f"{safe_name}.mlir", "w+") as f:
f.write(mod_str)
Expand All @@ -445,11 +445,9 @@ def run_main(model_id, args, tb_dir, tb_args):
from turbine_models.custom_models.torchbench.cmd_opts import args, unknown
import json

torchbench_models_dict = json.load(args.model_list_json)
for list in args.model_lists:
torchbench_models_dict = json.load(list)
with open(args.models_json, "r") as f:
torchbench_models_dict = json.load(file)
with open(list, "r") as f:
torchbench_models_dict = json.load(f)

tb_dir = setup_torchbench_cwd()
if args.model_id.lower() == "all":
Expand Down

0 comments on commit dd5dd78

Please sign in to comment.