diff --git a/.github/workflows/vendor_build.yml b/.github/workflows/vendor_build.yml index 4877c29a4de..e15b5ae89ab 100644 --- a/.github/workflows/vendor_build.yml +++ b/.github/workflows/vendor_build.yml @@ -48,7 +48,7 @@ jobs: -DVW_INSTALL=Off -DWARNINGS=On -DWARNING_AS_ERROR=On - -DUSE_LATEST_STD=On + -DVW_CXX_STANDARD=17 - name: Build run: cmake --build build - name: Unit tests diff --git a/vowpalwabbit/core/include/vw/core/named_labels.h b/vowpalwabbit/core/include/vw/core/named_labels.h index 9118a3bcddd..294b2c5f34b 100644 --- a/vowpalwabbit/core/include/vw/core/named_labels.h +++ b/vowpalwabbit/core/include/vw/core/named_labels.h @@ -6,6 +6,7 @@ #include "vw/common/string_view.h" #include "vw/core/vw_fwd.h" +#include #include #include #include diff --git a/vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h b/vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h index 30eec5aff54..4accadb59f1 100644 --- a/vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h +++ b/vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h @@ -27,10 +27,9 @@ class epsilon_decay_data { public: epsilon_decay_data(uint64_t model_count, uint64_t min_scope, double epsilon_decay_significance_level, - double epsilon_decay_estimator_decay, dense_parameters& weights, std::string epsilon_decay_audit_str, - bool constant_epsilon, uint32_t& feature_width, uint64_t _min_champ_examples, float initial_epsilon, - uint64_t shift_model_bounds, bool reward_as_cost, double tol_x, bool is_brentq, bool predict_only_model, - bool challenger_epsilon); + dense_parameters& weights, std::string epsilon_decay_audit_str, bool constant_epsilon, uint32_t& feature_width, + uint64_t _min_champ_examples, float initial_epsilon, uint64_t shift_model_bounds, bool reward_as_cost, + double tol_x, bool is_brentq, bool predict_only_model, bool challenger_epsilon); void update_weights(float init_ep, VW::LEARNER::learner& base, VW::multi_ex& examples); void promote_model(int64_t model_ind, int64_t swap_dist); void rebalance_greater_models(int64_t model_ind, int64_t swap_dist, int64_t model_count); @@ -44,7 +43,6 @@ class epsilon_decay_data uint64_t _model_count; uint64_t _min_scope; double _epsilon_decay_significance_level; // Confidence interval - double _epsilon_decay_estimator_decay; // Count decay time constant dense_parameters& _weights; std::string _epsilon_decay_audit_str; std::stringstream _audit_msg; diff --git a/vowpalwabbit/core/src/reductions/epsilon_decay.cc b/vowpalwabbit/core/src/reductions/epsilon_decay.cc index 817236e2b81..4c631978d2c 100644 --- a/vowpalwabbit/core/src/reductions/epsilon_decay.cc +++ b/vowpalwabbit/core/src/reductions/epsilon_decay.cc @@ -36,14 +36,13 @@ float decayed_epsilon(float init_ep, uint64_t update_count) } epsilon_decay_data::epsilon_decay_data(uint64_t model_count, uint64_t min_scope, - double epsilon_decay_significance_level, double epsilon_decay_estimator_decay, dense_parameters& weights, - std::string epsilon_decay_audit_str, bool constant_epsilon, uint32_t& feature_width, uint64_t min_champ_examples, - float initial_epsilon, uint64_t shift_model_bounds, bool reward_as_cost, double tol_x, bool is_brentq, - bool predict_only_model, bool challenger_epsilon) + double epsilon_decay_significance_level, dense_parameters& weights, std::string epsilon_decay_audit_str, + bool constant_epsilon, uint32_t& feature_width, uint64_t min_champ_examples, float initial_epsilon, + uint64_t shift_model_bounds, bool reward_as_cost, double tol_x, bool is_brentq, bool predict_only_model, + bool challenger_epsilon) : _model_count(model_count) , _min_scope(min_scope) , _epsilon_decay_significance_level(epsilon_decay_significance_level) - , _epsilon_decay_estimator_decay(epsilon_decay_estimator_decay) , _weights(weights) , _epsilon_decay_audit_str(std::move(epsilon_decay_audit_str)) , _constant_epsilon(constant_epsilon) @@ -345,7 +344,6 @@ std::shared_ptr VW::reductions::epsilon_decay_setup(VW::se uint64_t model_count; uint64_t min_scope; float epsilon_decay_significance_level; - float epsilon_decay_estimator_decay; std::string epsilon_decay_audit_str; bool constant_epsilon = false; uint64_t bonferroni_denominator; @@ -439,9 +437,9 @@ std::shared_ptr VW::reductions::epsilon_decay_setup(VW::se bool is_brentq = opt_func == "brentq"; auto data = VW::make_unique(model_count, min_scope, - epsilon_decay_significance_level, epsilon_decay_estimator_decay, all.weights.dense_weights, - epsilon_decay_audit_str, constant_epsilon, all.reduction_state.total_feature_width, min_champ_examples, - initial_epsilon, shift_model_bounds, reward_as_cost, tol_x, is_brentq, predict_only_model, challenger_epsilon); + epsilon_decay_significance_level, all.weights.dense_weights, epsilon_decay_audit_str, constant_epsilon, + all.reduction_state.total_feature_width, min_champ_examples, initial_epsilon, shift_model_bounds, reward_as_cost, + tol_x, is_brentq, predict_only_model, challenger_epsilon); // make sure we setup the rest of the stack with cleared interactions // to make sure there are not subtle bugs diff --git a/vowpalwabbit/core/tests/epsilon_decay_test.cc b/vowpalwabbit/core/tests/epsilon_decay_test.cc index d5704ee8dde..bf37c6b139f 100644 --- a/vowpalwabbit/core/tests/epsilon_decay_test.cc +++ b/vowpalwabbit/core/tests/epsilon_decay_test.cc @@ -255,7 +255,7 @@ TEST(EpsilonDecay, ScoreBoundsUnit) uint32_t feature_width = 8; VW::dense_parameters dense_weights(num_models); epsilon_decay_data ep_data( - num_models, 100, .05, .1, dense_weights, "", false, feature_width, 0, 1.f, 0, false, 1e-6, "bisect", false, true); + num_models, 100, .05, dense_weights, "", false, feature_width, 0, 1.f, 0, false, 1e-6, "bisect", false, true); // Set update counts to fixed values with expected horizon bound violation size_t score_idx = 0; @@ -341,7 +341,7 @@ TEST(EpsilonDecay, HorizonBoundsUnit) uint32_t feature_width = 8; VW::dense_parameters dense_weights(num_models); epsilon_decay_data ep_data( - num_models, 100, .05, .1, dense_weights, "", false, feature_width, 0, 1.f, 0, false, 1e-6, "bisect", false, true); + num_models, 100, .05, dense_weights, "", false, feature_width, 0, 1.f, 0, false, 1e-6, "bisect", false, true); // Set update counts to fixed values with expected horizon bound violation size_t score_idx = 0;