Closed Andrew-Crosby closed 1 year ago
Thanks for the report @Andrew-Crosby
Yes, agree that a start-up time error is probably preferable to a request time error here.
A possible alternative would be to assume that every unmapped type is an object
(which might also fix #11 ), though not sure how that would get mapped into JSON... I'll investigate
Will release as 0.4.1, probably next week
https://github.com/autotraderuk/fastapi-mlflow/blob/98701a0f5af535ceedda78c07759f5a3b6b62b8e/fastapi_mlflow/_mlflow_types.py#L30
The MLFlow to Python type lookup should use
[]
rather than.get(...)
, and throw a descriptive error if the type is not found.The use of
.get(...)
masks missing type mappings and instead creates a field of typeNone
leading to crypticValidationError
s at request time.