Skip to content

Baseline model raise exception when using float32 value #496

@moshe-rl

Description

@moshe-rl

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions