Closed chr-werner closed 3 days ago
Hello!
Well spotted, this is suboptimal. I'd rather have all of these converted to floats as expected. I'm tackling some other PRs right now, but I'll pick this up in a few days if someone else hasn't beat me to it by then. Thanks for reporting!
ill be happy to work on this :)
I came across the problem where
is returning outputs in
np.float32()
andnp.float64()
which cause problems during model saving, as thejson/encoder.py
sees those types asnot JSON serializable
.By changing the code snippet to
the elements get copied to a standard Python scalar each (note:
precision
already is) and then behave like expected during saving.