FLAML icon indicating copy to clipboard operation
FLAML copied to clipboard

[Feature Request]: Update AutoML metric argument documentation

Open bl3e967 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

The AutoML instance argument metric documentation is currently:

metric - A string of the metric name or a function, e.g., 'accuracy', 'roc_auc', 'roc_auc_ovr', 'roc_auc_ovo', 'roc_auc_weighted', 'roc_auc_ovo_weighted', 'roc_auc_ovr_weighted', 'f1', 'micro_f1', 'macro_f1', 'log_loss', 'mae', 'mse', 'r2', 'mape'. Default is 'auto'. If passing a customized metric function, the function needs to have the following input arguments:

where it lists examples of metrics that are supported, but doesn't provide a full list of all metrics.

This forces a user to trawl through the AutoML source code to verify whether that metric is supported in the first place.

An SDK that forces a user to manually go through its underlying source code is undesirable.

Describe the solution you'd like

  • The docstring for the metric argument should provide the full list of supported metric values.
  • If this is too verbose, then in the very least it should contain a url link to some page where the full list can be found.

If this is already documented somewhere, then it should be made much more obvious to someone reading the docs via the two methods above.

Additional context

No response

bl3e967 avatar Jan 15 '25 13:01 bl3e967

Thank you @bl3e967 for reporting it. Would you like to raise a PR?

thinkall avatar Jan 24 '25 03:01 thinkall

@bl3e967 Hi, It is already documented in this page where the full list can be found.

@thinkall Maybe the docstring can be updated to redirect to this page?

CyanideAngel avatar Apr 09 '25 05:04 CyanideAngel

@bl3e967 Hi, It is already documented in this page where the full list can be found.

@thinkall Maybe the docstring can be updated to redirect to this page?

Thank you, @CyanideAngel ! Good idea. Moreover, we can update the docs to cover more details of all the metrics. Would you like to raise a PR for it?

thinkall avatar Apr 09 '25 10:04 thinkall