MLCommons Algorithmic Efficiency is a benchmark and competition measuring neural network training speedups due to algorithmic improvements in both training algorithms and models.
The arguments of prepare_for_eval are the same as update_params, except for batch. I believe that prepare_for_eval should indeed be agnostic to the last batch used during training. The return type is the same as update_params.
Description
This pull request introduces a
prepare_for_eval
function and updates the code to support it.The implementation follows the blueprint of @fsschneider in https://github.com/mlcommons/algorithmic-efficiency/issues/719#issuecomment-2328797610 and fixes the bug of giving a free evaluation to a submission that goes out of max_runtime (again https://github.com/mlcommons/algorithmic-efficiency/issues/719#issuecomment-2328797610).
Function signature
The arguments of
prepare_for_eval
are the same asupdate_params
, except forbatch
. I believe thatprepare_for_eval
should indeed be agnostic to the last batch used during training. The return type is the same asupdate_params
.List of changes
In
submission_runner.py
:prepare_for_eval
profiler
del batch
beforeprepare_for_eval
(instead than before evaluation)accumulated_submission_time
afterprepare_for_eval
is_time_remaining
afterprepare_for_eval
is_time_remaining
prep_eval_rng
Minor changes:
PrepareForEvalFn
tospec
prepare_for_eval
to submission templateprepare_for_eval
to all pytorch and jax submissionsFixes #719 and #758 .