diff --git a/scripts/data/client2.py b/scripts/data/client2.py index a7d4d81d..5f47575f 100644 --- a/scripts/data/client2.py +++ b/scripts/data/client2.py @@ -64,9 +64,9 @@ def job_generator(start, blocks, step, mode, strategy): def process_batch(batch_file): print(f"Running client on blocks from {batch_file}") arguments_file = batch_file.replace(".json", "-arguments.json") - with open(batch_file, "r") as bf, open(arguments_file, "w") as af: - formatted_args = format_args(bf) - af.write(formatted_args) + + with open(arguments_file, "w") as af: + af.write(format_args(batch_file, False, False)) print(f"arguments_file: {arguments_file}") diff --git a/scripts/data/format_args.py b/scripts/data/format_args.py index 1accde48..3f4404ef 100644 --- a/scripts/data/format_args.py +++ b/scripts/data/format_args.py @@ -119,9 +119,9 @@ def format_args(input_file, execute_script, cairo1_run): res = flatten_tuples(serialize(args)) flag = 1 if execute_script else 0 if cairo1_run: - print(f"{format_cairo1_run(res)} {flag}") + return f"{format_cairo1_run(res)} {flag}" else: - print([res, flag]) + return [res, flag] if __name__ == "__main__": @@ -150,4 +150,4 @@ def format_args(input_file, execute_script, cairo1_run): args = parser.parse_args() - format_args(args.input_file, args.execute_script, args.cairo1_run) + print(format_args(args.input_file, args.execute_script, args.cairo1_run))