Skip to content

Commit b890196

Browse files
committed
fix base64 encoding
1 parent 3db3950 commit b890196

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

launch/make_batch_file.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ def make_batch_input_dict_file(inputs: List[Dict[str, Any]], file: IO[str]):
1515
writer = csv.DictWriter(file, fieldnames=["id", "args"])
1616
writer.writeheader()
1717
for i, args in enumerate(inputs):
18+
args_encoded = base64.b64encode(
19+
json.dumps(args).encode("utf-8")
20+
).decode("utf-8")
1821
writer.writerow(
1922
{
2023
"id": i,
21-
"args": base64.b64encode(json.dumps(args).encode("utf-8")),
24+
"args": args_encoded,
2225
}
2326
)

0 commit comments

Comments
 (0)