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

fix: [epsilon_decay] save_load weight indices #4606

Merged
merged 7 commits into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions vowpalwabbit/core/src/reductions/epsilon_decay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ size_t read_model_field(io_buf& io, VW::reductions::epsilon_decay::epsilon_decay
{
size_t bytes = 0;
epsilon_decay.conf_seq_estimators.clear();
epsilon_decay._weight_indices.clear();
bytes += read_model_field(io, epsilon_decay.conf_seq_estimators);
bytes += read_model_field(io, epsilon_decay._weight_indices);
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't a runtest fail?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess its mostly unit tests

Copy link
Member Author

Choose a reason for hiding this comment

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

yea its just unit tests, doesnt change any of the outcomes

bytes += read_model_field(io, epsilon_decay._global_counter);
return bytes;
}
Expand All @@ -256,6 +258,7 @@ size_t write_model_field(io_buf& io, const VW::reductions::epsilon_decay::epsilo
{
size_t bytes = 0;
bytes += write_model_field(io, epsilon_decay.conf_seq_estimators, upstream_name + "conf_seq_estimators", text);
bytes += write_model_field(io, epsilon_decay._weight_indices, upstream_name + "_weight_indices", text);
bytes += write_model_field(io, epsilon_decay._global_counter, upstream_name + "_global_counter", text);
return bytes;
}
Expand Down