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

AutoML API: expose the new get_leaderboard function available in other clients (Py+R) #3459

Closed
exalate-issue-sync bot opened this issue May 22, 2023 · 2 comments
Assignees

Comments

@exalate-issue-sync
Copy link

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}

@DinukaH2O
Copy link

JIRA Issue Migration Info

Jira Issue: SW-1935
Assignee: Marek Novotny
Reporter: Sebastien Poirier
State: Resolved
Fix Version: 3.28.0.4-1
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#1862

@hasithjp
Copy link
Member

JIRA Issue Migration Info Cont'd

Jira Issue Created Date: 2020-02-12T05:45:28.024-0800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants