-
Notifications
You must be signed in to change notification settings - Fork 395
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
Baseline model raise exception when using float32 value #496
Comments
Thank you for reporting. Please provide minimal code example to reproduce. |
Some things I've notice:
|
@moshe-rl great job! Thank you! |
Should be fixed with @DanielR59 PR. |
just used latest version and encountered this issue as well ... |
Hi @csetzkorn, could you provide minimal code to reproduce the issue? |
Yep. Getting this too. Problem caused by using xgb. |
Hi @pplonski, the solution provided before is no longer in the code. I've been looking for the error, it seems to be in line 711 of base_automl.py The state["all_params"] contains no JSON serializable objects. Still looking for a solution... |
Hi @DanielR59, Thank you for information. Could you please provide code to reproduce the issue? We have intern to the end of week, he can look into it @Bocianski |
This issue can be reproduced using the one provided before #496 (comment) |
@DanielR59 @Bocianski I confirm, I can reproduce the issue with the above code. |
I fixed it myself :) There is custom JSON Encoder added that can handle numpy types. |
At 'Explain' mode, for regression task.
Other models complete training successfully.
errors.md file content:
Error for 1_Baseline Object of type 'float32' is not JSON serializable Traceback (most recent call last): File "/home/moshe/.local/lib/python3.6/site-packages/supervised/base_automl.py", line 970, in _fit trained = self.train_model(params) File "/home/moshe/.local/lib/python3.6/site-packages/supervised/base_automl.py", line 312, in train_model mf.save(model_path) File "/home/moshe/.local/lib/python3.6/site-packages/supervised/model_framework.py", line 395, in save fout.write(json.dumps(desc, indent=4)) File "/usr/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj) File "/usr/lib/python3.6/json/encoder.py", line 201, in encode chunks = list(chunks) File "/usr/lib/python3.6/json/encoder.py", line 430, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict yield from chunks File "/usr/lib/python3.6/json/encoder.py", line 437, in _iterencode o = _default(o) File "/usr/lib/python3.6/json/encoder.py", line 180, in default o.class.name) TypeError: Object of type 'float32' is not JSON serializable
The text was updated successfully, but these errors were encountered: