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

feat(CB_GF): accept graph in json format #4568

Merged
merged 3 commits into from Apr 20, 2023

Conversation

olgavrou
Copy link
Collaborator

@olgavrou olgavrou commented Apr 20, 2023

and tests and graph validation

graph accepted as:

"_graph" : [{"row": 0, "col": 1, "val": 2}, {"row": 1, "col": 1, "val": 3}]

parse_cb_label(lp, "0:1.0:0.5 graph 0,1,2 0,1,2 5,5,5 | a_1 b_1 c_1", label, red_features), VW::vw_exception);
}

void check_graph_and_preds(const VW::multi_ex& examples)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

git didn't detect the rename, the new tests are from here down

@@ -421,11 +424,12 @@ void cb_explore_adf_graph_feedback::update_example_prediction(multi_ex& examples
a_s.begin(), a_s.end(), [](const VW::action_score& a, const VW::action_score& b) { return a.score > b.score; });
}

arma::sp_mat get_graph(const VW::cb_graph_feedback::reduction_features& graph_reduction_features, size_t num_actions)
arma::sp_mat get_graph(
const VW::cb_graph_feedback::reduction_features& graph_reduction_features, size_t num_actions, VW::workspace& all)
Copy link
Member

Choose a reason for hiding this comment

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

Pass logger instead of all object

@olgavrou olgavrou merged commit fdfb019 into VowpalWabbit:master Apr 20, 2023
113 of 114 checks passed
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.

None yet

2 participants