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

refactor: migrate cbzo finish_example #4347

Merged
merged 5 commits into from
Dec 16, 2022

Conversation

jackgerrits
Copy link
Member

No description provided.

@@ -346,8 +350,8 @@ base_learner* VW::reductions::cbzo_setup(VW::setup_base_i& stack_builder)
if (options.was_supplied("feature_mask")) { feature_mask_off = false; }

uint8_t policy;
if (policy_str.compare("constant") == 0) { policy = CONSTANT_POLICY; }
else if (policy_str.compare("linear") == 0) { policy = LINEAR_POLICY; }
if (policy_str == "constant") { policy = CONSTANT_POLICY; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this check already happens inside of the one_of parsing, but not sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah the one_of check does confirm that but we still need to convert the string to the int here.

@jackgerrits jackgerrits merged commit f1068cc into VowpalWabbit:master Dec 16, 2022
@jackgerrits jackgerrits deleted the migrate_finish_cbzo branch December 16, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants