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 ExpectedImpact JSON serializable #2233

Merged
merged 1 commit into from
Jul 6, 2022
Merged

Make ExpectedImpact JSON serializable #2233

merged 1 commit into from
Jul 6, 2022

Conversation

hungcs
Copy link
Contributor

@hungcs hungcs commented Jul 6, 2022

this enum not being json-serializable causes problems on the predibase side, since we return the ludwig config to the client over http

  File "/Users/hw/mambaforge/envs/based/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ExpectedImpact is not JSON serializable.' -- invalid character 'T' looking for beginning of value

https://stackoverflow.com/questions/36699512/is-it-possible-to-dump-an-enum-in-json-without-passing-an-encoder-to-json-dumps

tested locally

@hungcs hungcs requested review from justinxzhao and tgaddair July 6, 2022 04:57
@hungcs hungcs merged commit cd4815b into master Jul 6, 2022
@hungcs hungcs deleted the ser branch July 6, 2022 05:32
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.

2 participants