Issues with serializing pipelines to JSON
It seems we have some issues with that. JSON does not differentiate between integers and floats, but our serialization expects that. For example, Union hyper-parameter can contain two sub-hyper-parameters, one float and one int and it should generally know which type it is. Another problem is that computing hash changes depending on the fact if in Python a value is in float or int. And then there is another problem that some float values (like NaN and infinity) cannot be represented in standard JSON (non-standard JSON prevents it from being stored in ElasticSearch in metalearning database). But sometimes NaN as a value is probably a reasonable hyper-parameter value, like for imputer primitive.
If we can figure out if this problem does not affect Union hyper-parameters, and if we find some other way to represent NaN, we could maybe solve digest/hash problem by always serializing all numbers in consistent way, no matter the type (like always to float representation).