Skip to content

Commit 28077df

Browse files
committed
further integrated wall time
1 parent cf21930 commit 28077df

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

openml/extensions/sklearn/extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ def _prediction_to_probabilities(
12201220
if can_measure_cputime:
12211221
modelfit_duration_cputime = (time.process_time() - modelfit_start_cputime) * 1000
12221222
user_defined_measures['usercpu_time_millis_training'] = modelfit_duration_cputime
1223-
elif can_measure_wallclocktime:
1223+
if can_measure_wallclocktime:
12241224
modelfit_duration_walltime = (time.time() - modelfit_start_walltime) * 1000
12251225
user_defined_measures['wall_clock_time_millis_training'] = modelfit_duration_walltime
12261226

tests/test_runs/test_run_functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,13 @@ def _check_sample_evaluations(self, sample_evaluations, num_repeats,
286286
# a dict mapping from openml measure to a tuple with the minimum and
287287
# maximum allowed value
288288
check_measures = {
289+
# should take at least one millisecond (?)
289290
'usercpu_time_millis_testing': (0, max_time_allowed),
290291
'usercpu_time_millis_training': (0, max_time_allowed),
291-
# should take at least one millisecond (?)
292292
'usercpu_time_millis': (0, max_time_allowed),
293+
'wall_clock_time_millis_training': (0, max_time_allowed),
294+
'wall_clock_time_millis_testing': (0, max_time_allowed),
295+
'wall_clock_time_millis': (0, max_time_allowed),
293296
'predictive_accuracy': (0, 1)}
294297

295298
self.assertIsInstance(sample_evaluations, dict)

0 commit comments

Comments
 (0)