API listEndpoint Failing on JSON Deserialize
We make a call to HuggingFace to list the endpoints we have defined.  This used to work and suddenly is broken.Below is the stack trace segment for where it happens.I observe that the call to H.F. API gets made and has succeeded but upon deserializing the JSON body it fails.Is this a know bug?Is there a work around?Help!!java.lang.IllegalArgumentException: The fieldscaleToZeroTimeoutin the JSON string is not defined in theEndpointScalingproperties. JSON: {“minReplica”:0,“maxReplica”:1,“scaleToZeroTimeout”:null}at org.huggingface.client.model.EndpointScaling.validateJsonElement(EndpointScaling.java:178)at org.huggingface.client.model.EndpointCompute.validateJsonElement(EndpointCompute.java:252)at org.huggingface.client.model.EndpointWithStatus.validateJsonElement(EndpointWithStatus.java:342)at org.huggingface.client.model.EndpointWithStatusList.validateJsonElement(EndpointWithStatusList.java:179)at org.huggingface.client.model.EndpointWithStatusList$CustomTypeAdapterFactory$1.read(EndpointWithStatusList.java:204)at org.huggingface.client.model.EndpointWithStatusList$CustomTypeAdapterFactory$1.read(EndpointWithStatusList.java:194)at org.huggingface.client.JSON.deserialize(JSON.java:179) [5 skipped]at org.huggingface.client.ApiClient.deserialize(ApiClient.java:919)at org.huggingface.client.ApiClient.handleResponse(ApiClient.java:1129)at org.huggingface.client.ApiClient.execute(ApiClient.java:1053)at org.huggingface.client.api.V2endpointApi.listEndpointWithHttpInfo(V2endpointApi.java:996)at org.huggingface.client.api.V2endpointApi.listEndpoint(V2endpointApi.java:977)
2024-03-26T22:12:45Z
Turns outhttps://api.endpoints.huggingface.cloud/openapi.jsonchanged and now has the new field scaleToZeroTimeout in it.  But the revision 0.1.0 did not increase.Fixed.Warning - There are errors inhttps://api.endpoints.huggingface.cloud/openapi.jsonand we have to hand-fix it before we can auto generate the API code.
2024-03-27T10:12:53Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.