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

[Dev only] MOO ensemble can fail to return pareto front if automl instance consutrcted with single metric #1496

Closed
eddiebergman opened this issue Jun 6, 2022 · 4 comments · Fixed by #1501
Assignees
Labels
Milestone

Comments

@eddiebergman
Copy link
Contributor

If constructing the automl instance with only a single metric but then using multiple metrics during ensemble, querying for the pareto front will fail with:

File "/home/skantify/code/automlbenchmark-fairness-private/frameworks/autosklearn_moo/lib/auto-sklearn/autosklearn/automl.py", line 1656, in _load_pareto_set
    raise ValueError("Pareto set is only available for two or more metrics.")
@eddiebergman
Copy link
Contributor Author

eddiebergman commented Jun 7, 2022

I guess this is an odd case and doesn't seem easy to fix. fit_ensemble() doesn't take different metrics and the only source of metrics is the init. I'll close but if this is an issue in the future, I guess we can re-open

@mfeurer
Copy link
Contributor

mfeurer commented Jun 8, 2022

Couldn't we fix this case by checking if the loaded ensemble is a multi-objective ensemble instead of checking if we have multiple metrics?

@mfeurer mfeurer reopened this Jun 8, 2022
@eddiebergman
Copy link
Contributor Author

eddiebergman commented Jun 8, 2022

That's an easy fix for sure, but the issue also lies in the fact that the point of entry for metrics is at __init__ time.

If you wish to have single objective SMAC runs, you pass in a single objective. Any Ensembler is then lmited to this one metric and it makes no sense to have a multiobjective one. I guess the easiest workaround is allow fit_ensemble to take metrics?

How does this sound?

# Optimize with respect to one metric
automl = AutoSklearnCalssifier(metric=acc, ensemble=None)
automl.fit(X, y)

# Fit ensemble with respect to many
# Need to add this `metrics` arg to API
automl.fit_ensemble(X, y, ensemble=MooEnsemble, metrics=[acc, auc])

@mfeurer
Copy link
Contributor

mfeurer commented Jun 8, 2022

That sounds good. I somehow assumed fit_ensemble accepts metric, but apparently, it doesn't.

@eddiebergman eddiebergman linked a pull request Jun 9, 2022 that will close this issue
@eddiebergman eddiebergman added this to the V0.15 milestone Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants