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: Gtest fix #4657

Merged
merged 36 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e4d1e6d
test
bassmang Oct 30, 2023
9caee56
rm
bassmang Oct 30, 2023
a390c91
upgrade googletest
bassmang Oct 30, 2023
76c831f
ts
bassmang Oct 30, 2023
3a7230f
Update VowpalWabbitUtils.cmake
bassmang Oct 30, 2023
4c74a79
libc++
bassmang Oct 30, 2023
efdab0e
only for clang
bassmang Oct 30, 2023
5192ea3
install clang builds
bassmang Oct 30, 2023
a6065de
revert
bassmang Oct 30, 2023
4c25e49
remove clang
bassmang Oct 30, 2023
50871d0
try just 20
bassmang Oct 30, 2023
ac75f49
try v4
bassmang Oct 30, 2023
f4f6bb5
clang 15
bassmang Oct 30, 2023
480bb96
rm 20
bassmang Oct 30, 2023
5d9b6f1
include
bassmang Oct 30, 2023
e0c393c
ignore unused for eigen
bassmang Oct 30, 2023
a57435b
lint
bassmang Oct 30, 2023
901a19e
only for clang/gnu
bassmang Oct 31, 2023
5ab0e3e
ignore eigen unused
bassmang Oct 31, 2023
c935ffe
get target
bassmang Oct 31, 2023
59a7213
vw
bassmang Oct 31, 2023
ac81fc0
only for gf test
bassmang Oct 31, 2023
84301aa
fix
bassmang Oct 31, 2023
a7909ee
check test target built
bassmang Oct 31, 2023
9f8db04
try def clang
bassmang Oct 31, 2023
bbecb81
update apt-get
bassmang Oct 31, 2023
7583dd6
libc++ for clang
bassmang Oct 31, 2023
86a9097
clang15 for ubuntu 22
bassmang Oct 31, 2023
ff8b1b4
spell out matrix
bassmang Oct 31, 2023
02161bf
check g++ ve3rsion
bassmang Oct 31, 2023
d3ff85a
ep_dec fix
bassmang Oct 31, 2023
40c3b66
lint
bassmang Oct 31, 2023
bfc8e71
try 17 std
bassmang Nov 1, 2023
ff9a12a
rm named_labels include
bassmang Nov 1, 2023
00af24c
readd include
bassmang Nov 1, 2023
20145d8
revert settings.json
bassmang Nov 1, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/vendor_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions vowpalwabbit/core/include/vw/core/named_labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "vw/common/string_view.h"
#include "vw/core/vw_fwd.h"

#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
Expand Down
8 changes: 3 additions & 5 deletions vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
16 changes: 7 additions & 9 deletions vowpalwabbit/core/src/reductions/epsilon_decay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -345,7 +344,6 @@ std::shared_ptr<VW::LEARNER::learner> 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;
Expand Down Expand Up @@ -439,9 +437,9 @@ std::shared_ptr<VW::LEARNER::learner> VW::reductions::epsilon_decay_setup(VW::se
bool is_brentq = opt_func == "brentq";

auto data = VW::make_unique<VW::reductions::epsilon_decay::epsilon_decay_data>(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
Expand Down
4 changes: 2 additions & 2 deletions vowpalwabbit/core/tests/epsilon_decay_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading