Skip to content

Commit

Permalink
minor fix on compatibility (#454)
Browse files Browse the repository at this point in the history
Co-authored-by: Qingyun Wu <qxw5138@psu.edu>
  • Loading branch information
qingyun-wu and PennState-DSML authored Mar 1, 2022
1 parent 548b56e commit db5c550
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frameworks/flaml/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def run(dataset, config):
with Timer() as predict:
predictions = aml.predict(X_test)
probabilities = aml.predict_proba(X_test) if is_classification else None
labels = aml.classes_ if is_classification else None
labels = None
if is_classification:
labels = aml.classes_ if isinstance(aml.classes_, list) else aml.classes_.tolist()
return result(
output_file=config.output_predictions_file,
probabilities=probabilities,
Expand Down

0 comments on commit db5c550

Please sign in to comment.