Open bfirsh opened 2 years ago
The order is still intact in Cog's OpenAPI schema:
But not in the schema (nor the prediction object) in replicate-web, which looks to be alphabetical:
In replicate-web, the order of the outputs in the properties
is reversed:
postgres=# select openapi_schema->'components'->'schemas'->'Output'->'properties' from models_version where docker_image_id='9d45ce800c36226fa0190021cc70ce6bbb64dce6ff71c70eb2acf11c45fd2635';
?column?
-------------------------------------------------------------------------------------------------------------------------------------------------------------
{"seed": {"type": "integer", "title": "Seed"}, "text": {"type": "string", "title": "Text"}, "image": {"type": "string", "title": "Image", "format": "uri"}}
(1 row)
I think we need to solve this by adding x-order
properties to each output object, like we do for Input
in Cog.
@chenxwh ran into this again today.
Inputs are ordered, but outputs are not.