plow-technologies / inferno

A statically-typed functional scripting language
MIT License
4 stars 1 forks source link

[inferno-ml] Change input/output representation #122

Closed ngua closed 6 months ago

ngua commented 6 months ago

Changes the internal representation of InferenceParam inputs/outputs. Instead of having two separate inputs and outputs as vectors, they are now both in a single field and annotated with a ScriptInputType, which controls readability/writability of the input. Also, instead of being a Vector, they are now explicitly mapped to Inferno Idents

The rationale for the merging inputs/outputs:

The rationale for storing the Inferno identifiers:

Also I fixed the JSON encoding/decoding so that NaNs can be transmitted to/from inferno-ml-server. Previously, [null, 0.0, 0.0] would parse to [IEmpty, IDouble 0.0, IDouble 0.0], which is of course incorrect. Now it correctly parses to [IDouble NaN, IDouble 0.0, IDouble 0.0]

ngua commented 6 months ago

~CI is broken due to IOG cache woes (seems to be a Cloudflare issue)~ Fixed it