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

Make convert_predictions() backend-aware #2200

Merged
merged 5 commits into from
Jun 28, 2022
Merged

Make convert_predictions() backend-aware #2200

merged 5 commits into from
Jun 28, 2022

Conversation

hungcs
Copy link
Contributor

@hungcs hungcs commented Jun 28, 2022

discovered this from the predibase side - predictions can be dd.Series, and have to be converted to pandas

    pred_df = model.predict(inputs_df, return_type=dict)[0]
  File "/Users/hw/mambaforge/envs/based/lib/python3.8/site-packages/ludwig/api.py", line 803, in predict
    converted_postproc_predictions = convert_predictions(
  File "/Users/hw/mambaforge/envs/based/lib/python3.8/site-packages/ludwig/data/postprocessing.py", line 108, in convert_predictions
    return convert_fn(
  File "/Users/hw/mambaforge/envs/based/lib/python3.8/site-packages/ludwig/data/postprocessing.py", line 127, in convert_to_dict
    values = np.stack(values.to_numpy())
AttributeError: 'Series' object has no attribute 'to_numpy'

@github-actions
Copy link

github-actions bot commented Jun 28, 2022

Unit Test Results

       6 files  +    1         6 suites  +1   2h 17m 22s ⏱️ + 37m 44s
2 880 tests ±    0  2 834 ✔️ ±    0    46 💤 ±  0  0 ±0 
8 640 runs  +161  8 498 ✔️ +138  142 💤 +23  0 ±0 

Results for commit 43c9050. ± Comparison against base commit e3c03c9.

♻️ This comment has been updated with latest results.

@hungcs hungcs merged commit 5193e0d into master Jun 28, 2022
@hungcs hungcs deleted the postp branch June 28, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants