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 f7dbd2f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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 @@ -447,9 +447,8 @@ def run_main(model_id, args, tb_dir, tb_args):

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 f7dbd2f

Please sign in to comment.