Loosen checks on numeric values
During some work on TranscriptionScorer (which sometimes creates MetaData with a 0.0
value), we noticed that the checks for the value in the endpoint CreateMetadata
might be too strict.
assert metadata.get("value") and isinstance(get("value"), (str, float, int)
raises an Error when the value is 0.0
because 0.0 == False
in python.
We should instead do something similar to what we do for classification confidences (see this) where we check if value is None
instead of True