...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Type Unions & Missing Values
...
If a field is allowed to have missing values, such as credit_age
in the example above, the Avro schema can accommodate this through a type union that includes "null"
along with the base type, such as "type": ["nullint", "intnull"]
.
Out-of-Bounds Values
The Avro specification does not allow for checking the bounds of numerical fields. As such, If a value is out-of-bounds, it is recommended to put a check in the model source code which changes the type of that field. For instance, if a model is supposed to output a probability, then in the (Python) source code one could include the line
...