Skip to content
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

Pass train_state to update_params #790

Merged
merged 10 commits into from
Oct 29, 2024

Conversation

Niccolo-Ajroldi
Copy link
Contributor

@Niccolo-Ajroldi Niccolo-Ajroldi commented Oct 3, 2024

This pull-request adds train_state to the arguments of update_params.

This allows for example to implement a time-based LR scheduler (see #785).

Since train_state is a dictionary, we have to avoid that a submission modifies its content.
The solution adopted here passes train_state by copy. We use a shallow copying, since all values in train_state are primitive types, and cannot be modified in-place. Although very fast, this copying operation would however be counted as part of the submission time.

A possible alternative solution that would avoid this problem would be to pass train_state['accumulated_submission_time'] directly instead of passing the entire dictionary.

@Niccolo-Ajroldi Niccolo-Ajroldi requested a review from a team as a code owner October 3, 2024 15:51
Copy link

github-actions bot commented Oct 3, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@priyakasimbeg priyakasimbeg changed the base branch from main to dev October 23, 2024 19:09
Copy link
Contributor

@priyakasimbeg priyakasimbeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@priyakasimbeg priyakasimbeg merged commit 7a3710f into mlcommons:dev Oct 29, 2024
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants