Commit d7b01807 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Fix bugs in pytest and googletest errors

Fix errors introduced from excluded inds changes
parent 1e53d83c
Pipeline #109529 canceled with stages
in 34 minutes and 16 seconds
......@@ -63,7 +63,7 @@ void generateDivNode(std::vector<node_ptr>& feat_list, const node_ptr feat_1, co
double div_mult_tot_first = div_mult_leaves.begin()->second;
if(
(std::abs(div_mult_tot_first) != 1.0) &&
std::all_of(div_mult_leaves.begin(), div_mult_leaves.end(), [&div_mult_tot_first](auto el){return el.second == div_mult_tot_first;})
std::all_of(div_mult_leaves.begin(), div_mult_leaves.end(), [&div_mult_tot_first](auto el){return std::abs(el.second) == div_mult_tot_first;})
)
{
return;
......
......@@ -107,7 +107,7 @@ namespace
EXPECT_EQ(feat_space.max_rung(), 2);
EXPECT_EQ(feat_space.n_sis_select(), 10);
EXPECT_EQ(feat_space.n_samp_train(), 10);
EXPECT_EQ(feat_space.n_feat(), 154);
EXPECT_EQ(feat_space.n_feat(), 148);
EXPECT_EQ(feat_space.n_rung_store(), 1);
EXPECT_EQ(feat_space.n_rung_generate(), 0);
......@@ -165,7 +165,7 @@ namespace
EXPECT_EQ(feat_space.max_rung(), 2);
EXPECT_EQ(feat_space.n_sis_select(), 10);
EXPECT_EQ(feat_space.n_samp_train(), 10);
EXPECT_EQ(feat_space.n_feat(), 154);
EXPECT_EQ(feat_space.n_feat(), 148);
EXPECT_EQ(feat_space.n_rung_store(), 1);
EXPECT_EQ(feat_space.n_rung_generate(), 0);
......@@ -193,7 +193,7 @@ namespace
EXPECT_EQ(feat_space.max_rung(), 2);
EXPECT_EQ(feat_space.n_sis_select(), 10);
EXPECT_EQ(feat_space.n_samp_train(), 10);
EXPECT_EQ(feat_space.n_feat(), 154);
EXPECT_EQ(feat_space.n_feat(), 148);
EXPECT_EQ(feat_space.n_rung_store(), 1);
EXPECT_EQ(feat_space.n_rung_generate(), 0);
......
......@@ -25,7 +25,7 @@ def test_gen_feature_space_from_file():
inputs = read_csv(str(parent / "data.csv"), "Prop", task_key="Task", max_rung=2)
phi_sel = phi_selected_from_file(
str(parent / "selected_features.txt"), inputs.phi_0
str(parent / "selected_features.txt"), inputs.phi_0, []
)
assert phi_sel[0].postfix_expr == "3|2|add|3|abs|add"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment