AutoML API: expose the new get_leaderboard
function available in other clients (Py+R)
#3459
Labels
get_leaderboard
function available in other clients (Py+R)
#3459
Since {{3.28.0.1}}, {{h2o-3}} clients are exposing a new {{get_leaderboard}} function that allows the retrieval of the leaderboard with additional columns/information like the training time for each model, the scoring time per row (and probably more to come).
A customer that wants to benefit from this new information, and using Sparkling can't currently access those data.
Contract for
get_leaderboard
as defined in {{autoh2o.py}}:{code:python}def get_leaderboard(aml, extra_columns=None):
"""
Retrieve the leaderboard from the AutoML instance.
Contrary to the default leaderboard attached to the automl instance, this one can return columns other than the metrics.
:param H2OAutoML aml: the instance for which to return the leaderboard.
:param extra_columns: a string or a list of string specifying which optional columns should be added to the leaderboard. Defaults to None.
Currently supported extensions are:
- 'ALL': adds all columns below.
- 'training_time_ms': column providing the training time of each model in milliseconds (doesn't include the training of cross validation models).
- 'predict_time_per_row_ms`: column providing the average prediction time by the model for a single row.
:return: An H2OFrame representing the leaderboard.
:examples:
>>> aml = H2OAutoML(max_runtime_secs=30)
>>> aml.train(y=y, training_frame=train)
>>> lb_all = h2o.automl.get_leaderboard(aml, 'ALL')
>>> lb_custom = h2o.automl.get_leaderboard(aml, ['predict_time_per_row_ms', 'training_time_ms'])
>>> lb_custom_sorted = lb_custom.sort(by='predict_time_per_row_ms')
"""
assert_is_type(aml, H2OAutoML)
return H2OAutoML._fetch_leaderboard(aml.key, extra_columns){code}
The text was updated successfully, but these errors were encountered: