Skip to content

Commit d89fbe9

Browse files
authored
chore(deps): revert dependency catch2 to v2 for 2024.4.0 (#2739)
* Revert "Update dependency catch2 to v3.5.4 (#2703)" * Revert "chore(deps): update dependency catch2 to v3 (#2205)"
1 parent 1a31061 commit d89fbe9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+456
-397
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ onedal_repo(
108108

109109
http_archive(
110110
name = "catch2",
111-
url = "https://github.com/catchorg/Catch2/archive/v3.5.4.tar.gz",
112-
sha256 = "b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb",
113-
strip_prefix = "Catch2-3.5.4",
111+
url = "https://github.com/catchorg/Catch2/archive/v2.13.10.tar.gz",
112+
sha256 = "d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943",
113+
strip_prefix = "Catch2-2.13.10",
114114
)
115115

116116
http_archive(

cpp/oneapi/dal/algo/covariance/test/fixture.hpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
117117
void general_checks(const te::dataframe& input, const te::table_id& input_table_id) {
118118
const table data = input.get_table(this->get_policy(), input_table_id);
119119

120-
INFO("create descriptor cov cor means");
120+
INFO("create descriptor cov cor means")
121121
auto cov_desc =
122122
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
123123
covariance::result_options::cov_matrix | covariance::result_options::cor_matrix |
@@ -126,55 +126,55 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
126126
auto compute_result = this->compute(cov_desc, data);
127127
check_compute_result(cov_desc, data, compute_result);
128128

129-
INFO("create descriptor cov");
129+
INFO("create descriptor cov")
130130
cov_desc =
131131
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
132132
covariance::result_options::cov_matrix);
133133
INFO("run compute optional: cov");
134134
compute_result = this->compute(cov_desc, data);
135135
check_compute_result(cov_desc, data, compute_result);
136136

137-
INFO("create descriptor cov biased");
137+
INFO("create descriptor cov biased")
138138
cov_desc = covariance::descriptor<Float, Method, covariance::task::compute>()
139139
.set_result_options(covariance::result_options::cov_matrix)
140140
.set_bias(true);
141141
INFO("run compute optional: cov biased");
142142
compute_result = this->compute(cov_desc, data);
143143
check_compute_result(cov_desc, data, compute_result);
144144

145-
INFO("create descriptor cor");
145+
INFO("create descriptor cor")
146146
cov_desc =
147147
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
148148
covariance::result_options::cor_matrix);
149149
INFO("run compute optional: cor");
150150
compute_result = this->compute(cov_desc, data);
151151
check_compute_result(cov_desc, data, compute_result);
152152

153-
INFO("create descriptor means");
153+
INFO("create descriptor means")
154154
cov_desc =
155155
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
156156
covariance::result_options::means);
157157
INFO("run compute optional: means");
158158
compute_result = this->compute(cov_desc, data);
159159
check_compute_result(cov_desc, data, compute_result);
160160

161-
INFO("create descriptor cov cor");
161+
INFO("create descriptor cov cor")
162162
cov_desc =
163163
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
164164
covariance::result_options::cov_matrix | covariance::result_options::cor_matrix);
165165
INFO("run compute optional: cov cor");
166166
compute_result = this->compute(cov_desc, data);
167167
check_compute_result(cov_desc, data, compute_result);
168168

169-
INFO("create descriptor cov means");
169+
INFO("create descriptor cov means")
170170
cov_desc =
171171
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
172172
covariance::result_options::cov_matrix | covariance::result_options::means);
173173
INFO("run compute optional: cov means");
174174
compute_result = this->compute(cov_desc, data);
175175
check_compute_result(cov_desc, data, compute_result);
176176

177-
INFO("create descriptor cor means");
177+
INFO("create descriptor cor means")
178178
cov_desc =
179179
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
180180
covariance::result_options::cor_matrix | covariance::result_options::means);
@@ -187,7 +187,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
187187
const te::table_id& input_table_id,
188188
const std::int64_t nBlocks) {
189189
const table data = input.get_table(this->get_policy(), input_table_id);
190-
INFO("create descriptor cov cor means");
190+
INFO("create descriptor cov cor means")
191191
auto cov_desc =
192192
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
193193
covariance::result_options::cov_matrix | covariance::result_options::cor_matrix |
@@ -201,7 +201,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
201201
auto compute_result = this->finalize_compute(cov_desc, partial_result);
202202
check_compute_result(cov_desc, data, compute_result);
203203

204-
INFO("create descriptor cov");
204+
INFO("create descriptor cov")
205205
cov_desc =
206206
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
207207
covariance::result_options::cov_matrix);
@@ -214,7 +214,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
214214
compute_result = this->finalize_compute(cov_desc, partial_result);
215215
check_compute_result(cov_desc, data, compute_result);
216216

217-
INFO("create descriptor cor");
217+
INFO("create descriptor cor")
218218
cov_desc =
219219
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
220220
covariance::result_options::cor_matrix);
@@ -227,7 +227,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
227227
compute_result = this->finalize_compute(cov_desc, partial_result);
228228
check_compute_result(cov_desc, data, compute_result);
229229

230-
INFO("create descriptor means");
230+
INFO("create descriptor means")
231231
cov_desc =
232232
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
233233
covariance::result_options::means);
@@ -240,7 +240,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
240240
compute_result = this->finalize_compute(cov_desc, partial_result);
241241
check_compute_result(cov_desc, data, compute_result);
242242

243-
INFO("create descriptor cov cor");
243+
INFO("create descriptor cov cor")
244244
cov_desc =
245245
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
246246
covariance::result_options::cov_matrix | covariance::result_options::cor_matrix);
@@ -253,7 +253,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
253253
compute_result = this->finalize_compute(cov_desc, partial_result);
254254
check_compute_result(cov_desc, data, compute_result);
255255

256-
INFO("create descriptor cov means");
256+
INFO("create descriptor cov means")
257257
cov_desc =
258258
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
259259
covariance::result_options::cov_matrix | covariance::result_options::means);
@@ -266,7 +266,7 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
266266
compute_result = this->finalize_compute(cov_desc, partial_result);
267267
check_compute_result(cov_desc, data, compute_result);
268268

269-
INFO("create descriptor cor means");
269+
INFO("create descriptor cor means")
270270
cov_desc =
271271
covariance::descriptor<Float, Method, covariance::task::compute>().set_result_options(
272272
covariance::result_options::cor_matrix | covariance::result_options::means);
@@ -285,32 +285,32 @@ class covariance_test : public te::crtp_algo_fixture<TestType, Derived> {
285285
const covariance::compute_result<>& result) {
286286
if (result.get_result_options().test(result_options::cov_matrix)) {
287287
const auto cov_matrix = result.get_cov_matrix();
288-
INFO("check if cov matrix table shape is expected");
288+
INFO("check if cov matrix table shape is expected")
289289
REQUIRE(cov_matrix.get_row_count() == data.get_column_count());
290290
REQUIRE(cov_matrix.get_column_count() == data.get_column_count());
291-
INFO("check if there is no NaN in cov matrix table");
291+
INFO("check if there is no NaN in cov matrix table")
292292
REQUIRE(te::has_no_nans(cov_matrix));
293-
INFO("check if cov matrix values are expected");
293+
INFO("check if cov matrix values are expected")
294294
check_cov_matrix_values(desc, data, cov_matrix);
295295
}
296296
if (result.get_result_options().test(result_options::cor_matrix)) {
297297
const auto cor_matrix = result.get_cor_matrix();
298-
INFO("check if cor matrix table shape is expected");
298+
INFO("check if cor matrix table shape is expected")
299299
REQUIRE(cor_matrix.get_row_count() == data.get_column_count());
300300
REQUIRE(cor_matrix.get_column_count() == data.get_column_count());
301-
INFO("check if there is no NaN in cor matrix table");
301+
INFO("check if there is no NaN in cor matrix table")
302302
REQUIRE(te::has_no_nans(cor_matrix));
303-
INFO("check if cor matrix values are expected");
303+
INFO("check if cor matrix values are expected")
304304
check_cor_matrix_values(desc, data, cor_matrix);
305305
}
306306
if (result.get_result_options().test(result_options::means)) {
307307
const auto means = result.get_means();
308-
INFO("check if means table shape is expected");
308+
INFO("check if means table shape is expected")
309309
REQUIRE(means.get_row_count() == 1);
310310
REQUIRE(means.get_column_count() == data.get_column_count());
311-
INFO("check if there is no NaN in means table");
311+
INFO("check if there is no NaN in means table")
312312
REQUIRE(te::has_no_nans(means));
313-
INFO("check if means values are expected");
313+
INFO("check if means values are expected")
314314
check_means_values(desc, data, means);
315315
}
316316
}

cpp/oneapi/dal/algo/dbscan/test/fixture.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class dbscan_test : public te::crtp_algo_fixture<TestType, Derived> {
9494
const table &ref_responses) {
9595
CAPTURE(epsilon, min_observations);
9696

97-
INFO("create descriptor");
97+
INFO("create descriptor")
9898
const auto dbscan_desc = get_descriptor(epsilon, min_observations);
9999

100100
INFO("run compute");
@@ -119,7 +119,7 @@ class dbscan_test : public te::crtp_algo_fixture<TestType, Derived> {
119119
std::int64_t min_observations,
120120
float_t ref_dbi,
121121
float_t dbi_ref_tol = 1.0e-4) {
122-
INFO("create descriptor");
122+
INFO("create descriptor")
123123
const auto dbscan_desc = get_descriptor(epsilon, min_observations);
124124

125125
INFO("run compute");
@@ -151,7 +151,7 @@ class dbscan_test : public te::crtp_algo_fixture<TestType, Derived> {
151151
std::int64_t min_observations) {
152152
CAPTURE(epsilon, min_observations);
153153

154-
INFO("create descriptor");
154+
INFO("create descriptor")
155155
const auto dbscan_desc =
156156
get_descriptor(epsilon, min_observations).set_result_options(compute_mode);
157157

cpp/oneapi/dal/algo/dbscan/test/spmd.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ class dbscan_spmd_test : public dbscan_test<TestType, dbscan_spmd_test<TestType>
107107

108108
const auto compute_result_batch =
109109
oneapi::dal::test::engine::compute(this->get_policy(), dbscan_desc, data);
110-
INFO("check references");
110+
INFO("check references")
111111
this->check_if_close(joined_result.get_core_flags(),
112112
compute_result_batch.get_core_flags(),
113113
"Cores");
114-
INFO("check references");
114+
INFO("check references")
115115
this->check_if_close(joined_result.get_responses(),
116116
compute_result_batch.get_responses(),
117117
"responses");
@@ -133,15 +133,15 @@ class dbscan_spmd_test : public dbscan_test<TestType, dbscan_spmd_test<TestType>
133133

134134
auto joined_result = this->merge_compute_result(compute_results);
135135

136-
INFO("check references");
136+
INFO("check references")
137137
base_t::check_responses_against_ref(joined_result.get_responses(), ref_responses);
138138
}
139139
void run_spmd_dbi_checks(const table &data,
140140
float_t epsilon,
141141
std::int64_t min_observations,
142142
float_t ref_dbi,
143143
float_t dbi_ref_tol = 1.0e-4) {
144-
INFO("create descriptor");
144+
INFO("create descriptor")
145145
const auto dbscan_desc =
146146
dbscan::descriptor<float_t, method_t>(epsilon, min_observations)
147147
.set_mem_save_mode(true)

cpp/oneapi/dal/algo/decision_forest/test/fixture.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
252252
const auto infer_result = this->infer(desc, model, x_test);
253253
check_infer_shapes(desc, data, infer_result);
254254

255-
INFO("check if infer accuracy is expected");
255+
INFO("check if infer accuracy is expected")
256256
for (auto ch : checker_list) {
257257
CAPTURE(desc.get_features_per_node());
258258
CAPTURE(desc.get_max_tree_depth());
@@ -287,29 +287,29 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
287287
const df::train_result<Task>& result) {
288288
constexpr bool is_cls = std::is_same_v<Task, decision_forest::task::classification>;
289289

290-
INFO("check if model shape is expected");
290+
INFO("check if model shape is expected")
291291
REQUIRE(result.get_model().get_tree_count() == desc.get_tree_count());
292292
if constexpr (is_cls) {
293293
REQUIRE(result.get_model().get_class_count() == desc.get_class_count());
294294
}
295295

296296
if (check_mask_flag(desc.get_error_metric_mode(), error_metric_mode::out_of_bag_error)) {
297-
INFO("check if oob error shape is expected");
297+
INFO("check if oob error shape is expected")
298298
REQUIRE(result.get_oob_err().has_data());
299299
REQUIRE(result.get_oob_err().get_row_count() == 1);
300300
REQUIRE(result.get_oob_err().get_column_count() == 1);
301301
}
302302

303303
if (check_mask_flag(desc.get_error_metric_mode(),
304304
error_metric_mode::out_of_bag_error_per_observation)) {
305-
INFO("check if oob error per observation shape is expected");
305+
INFO("check if oob error per observation shape is expected")
306306
REQUIRE(result.get_oob_err_per_observation().has_data());
307307
REQUIRE(result.get_oob_err_per_observation().get_row_count() == data.get_row_count());
308308
REQUIRE(result.get_oob_err_per_observation().get_column_count() == 1);
309309
}
310310

311311
if (variable_importance_mode::none != desc.get_variable_importance_mode()) {
312-
INFO("check if variable improtance shape is expected");
312+
INFO("check if variable improtance shape is expected")
313313
REQUIRE(result.get_var_importance().has_data());
314314
REQUIRE(result.get_var_importance().get_row_count() == 1);
315315
REQUIRE(result.get_var_importance().get_column_count() == data.get_column_count() - 1);
@@ -322,21 +322,21 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
322322
constexpr bool is_cls = std::is_same_v<Task, decision_forest::task::classification>;
323323
if constexpr (is_cls) {
324324
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_responses)) {
325-
INFO("check if infer responses shape is expected");
325+
INFO("check if infer responses shape is expected")
326326
REQUIRE(result.get_responses().has_data());
327327
REQUIRE(result.get_responses().get_row_count() == data.get_row_count());
328328
REQUIRE(result.get_responses().get_column_count() == 1);
329329
}
330330

331331
if (check_mask_flag(desc.get_infer_mode(), infer_mode::class_probabilities)) {
332-
INFO("check if infer probabilities shape is expected");
332+
INFO("check if infer probabilities shape is expected")
333333
REQUIRE(result.get_probabilities().has_data());
334334
REQUIRE(result.get_probabilities().get_row_count() == data.get_row_count());
335335
REQUIRE(result.get_probabilities().get_column_count() == desc.get_class_count());
336336
}
337337
}
338338
else {
339-
INFO("check if infer responses shape is expected");
339+
INFO("check if infer responses shape is expected")
340340
REQUIRE(result.get_responses().has_data());
341341
REQUIRE(result.get_responses().get_row_count() == data.get_row_count());
342342
REQUIRE(result.get_responses().get_column_count() == 1);
@@ -349,7 +349,7 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
349349
const te::table_id& data_table_id,
350350
double accuracy_threshold) {
351351
if (variable_importance_mode::none != desc.get_variable_importance_mode()) {
352-
INFO("check if match of variable importance vs required one is expected");
352+
INFO("check if match of variable importance vs required one is expected")
353353
const auto required_var_imp = var_imp_data.get_table(data_table_id);
354354
std::int64_t row_ind = 0;
355355
switch (desc.get_variable_importance_mode()) {
@@ -377,7 +377,7 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
377377
double required_oob_error,
378378
double accuracy_threshold) {
379379
if (check_mask_flag(desc.get_error_metric_mode(), error_metric_mode::out_of_bag_error)) {
380-
INFO("check if match of oob error vs required one is expected");
380+
INFO("check if match of oob error vs required one is expected")
381381
const auto oob_err_val =
382382
dal::row_accessor<const double>(train_result.get_oob_err()).pull();
383383
if (required_oob_error > 0.0) {
@@ -393,7 +393,7 @@ class df_test : public te::crtp_algo_fixture<TestType, Derived> {
393393
double accuracy_threshold) {
394394
if (check_mask_flag(desc.get_error_metric_mode(),
395395
error_metric_mode::out_of_bag_error_per_observation)) {
396-
INFO("check if match of oob error vs cumulative oob error per observation is expected");
396+
INFO("check if match of oob error vs cumulative oob error per observation is expected")
397397
const auto oob_err_val =
398398
dal::row_accessor<const double>(train_result.get_oob_err()).pull();
399399
const auto oob_err_per_obs_arr =

cpp/oneapi/dal/algo/decision_forest/test/serialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class df_serialization_test : public te::float_algo_fixture<std::tuple_element_t
178178

179179
void compare_infer_results(const infer_result<task_t>& actual,
180180
const infer_result<task_t>& reference) {
181-
SECTION("compare responses") {
181+
INFO("compare responses") {
182182
te::check_if_tables_equal<float_t>(actual.get_responses(), reference.get_responses());
183183
}
184184
}

cpp/oneapi/dal/algo/jaccard/test/jaccard_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class jaccard_test {
211211
const auto jaccard_coeffs_data = coeffs.get_data<float>();
212212
int correct_coeff_count = 0;
213213
for (std::int64_t i = 0; i < nonzero_coeff_count; i++) {
214-
if (Catch::Approx(jaccard_coeffs_data[i]) == correct_jaccard_coeffs[i])
214+
if (Approx(jaccard_coeffs_data[i]) == correct_jaccard_coeffs[i])
215215
correct_coeff_count++;
216216
}
217217
REQUIRE(correct_coeff_count == nonzero_coeff_count);

0 commit comments

Comments
 (0)