Skip to content

Conversation

@lior1990
Copy link
Contributor

Hi,
I encountered a similar issue like #1824, where the target value (i.e. y) was np.float32, then the computed y_scale was np.float32 as well, which caused json serialization to fail.

In my scenario, the extra regressors were np.float32, so mu and std are also np.float32 and I'm unable to serialize the model (of course after calling model_to_dict).

The solution is just to convert it to float, same as in 9e4e87a.

Thanks!

@facebook-github-bot
Copy link
Contributor

Hi @lior1990!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@tcuongd
Copy link
Collaborator

tcuongd commented May 7, 2023

pandas strikes again 😂 Thanks for the fix, I'll kick off CI and it should be good to merge after that.

@tcuongd
Copy link
Collaborator

tcuongd commented May 7, 2023

One test is failing due to the same issue as in #2401 (comment)
This is safe to merge

@tcuongd tcuongd self-requested a review May 7, 2023 13:42
@tcuongd tcuongd merged commit 5e54831 into facebook:main May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants