-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QOL changes for generations #166
Conversation
…luation-harness into max/save-intermediate-gen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thank you!
I am wondering whether there would be an issue with several restarts (see comment)
bigcode_eval/utils.py
Outdated
@@ -332,7 +334,8 @@ def complete_code( | |||
gen_token_dict, | |||
) | |||
with open(intermediate_save_generations_path, "w") as fp: | |||
json.dump(code_gens, fp) | |||
intermediate_generations.extend(code_gens) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there are multiple saving steps, I think we'll add the same generations several times into intermediate_generations
.
Also this list is also extended in evaluator.py
generations.extend(new_generations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, made 2 changes in the new commit
- instead of extending on
intermediate_generations
when saving which end up duplicating new generations, extend on a deepcopy instead which prevents duplications - instead of extending at evaluator, return
intermediate_generations.extend(code_gens)
incomplete_code
, which makes a bit more sense with this new logic. since we never mutateintermediate_generations
when saving, this will return the non-duplicated generations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small suggestion. Then good to merge! Thank you
…intermediate-gen QOL changes for generations
task_name
for multiple tasksn_tasks
logic from dataset index out of boundsNext 2 changes related to #58
4. save intermediate generations with
--save_every_k_samples
5. resume generation from intermediate generations with
--load_generations_intermediate_paths
Tested with HumanEval with saving every 50 samples + loading from intermediate generations:
Verified:
--limit_start 150
on HumanEval