Toke Emil Heldbo Reines
03/22/2024, 11:02 AMclass AnomalyOutput(BaseModel):
anomaly_scored: NumpyNdarray(dtype="float") # Doesnt work
marginal_anomaly_score: np.ndarray # Works but doesnt hint to type float/int
...
service = bentoml.Service(...)
@service.api(input=..., output=JSON(pydantic_model=AnomalyOutput))
Documentation doesn't show how to combine pydantic models with bento io like this.Marcos Fernandes
03/23/2024, 4:46 PMToke Emil Heldbo Reines
03/25/2024, 9:18 AM