[Flax] Fix eval and data_args usage in streaming example #14129
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes the evaluation loop in
run_mlm_flax_stream.py. Current behavior didn't update the correct variable, which leads to data leakage during evaluation.It also takes the opportunity to improve some
DataTrainingArgumentsusages.It's a draft PR because there is an open improvement that could be made: the script splits train-eval based solely in
data_args.{dataset_name,num_eval_samples}, but also accepts unused argstrain_file, validation_file, train_ref_file, validation_ref_file, validation_split_percentage. Other data args that are unused:pad_to_max_length,line_by_line.My suggestion would be to remove all these unused args. May I proceed with that?
Before submitting
The script is mentioned in
jax-projects/dataset-streaming/README, but no changes are required.Who can review?
@patrickvonplaten