We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e86dd5 commit 6b18f1eCopy full SHA for 6b18f1e
1 file changed
bigcode_eval/utils.py
@@ -3,7 +3,6 @@
3
import re
4
import warnings
5
from collections import defaultdict
6
-from copy import deepcopy
7
from typing import List, Optional
8
9
import torch
@@ -335,9 +334,7 @@ def complete_code(
335
334
gen_token_dict,
336
)
337
with open(intermediate_save_generations_path, "w") as fp:
338
- intermediate_save_generations = deepcopy(generations)
339
- intermediate_save_generations.extend(code_gens)
340
- json.dump(intermediate_save_generations, fp)
+ json.dump(generations + code_gens, fp)
341
print(
342
f"intermediate generations were saved at {intermediate_save_generations_path}"
343
0 commit comments