FastAI.jl
FastAI.jl copied to clipboard
Interface tests
This adds interface tests to various interfaces in FastAI.jl. This allows
- giving user-friendly error messages by performing checks in high-level functions
- giving help when implementing an interface, and providing tests for implementations
Examples
Blocks
is_block(block, obs) checks that a piece of data is a valid observation for a Block:
When data is not valid, you get detailed information on the reason why:
This is extensible for custom Block types. Since tuples of blocks are also valid blocks, we can check them, too:
Data containers
is_data(data) checks that data implements MLUtils.jl's data container interface.
When that is not the case, precise errors are given indicating which parts are not implemented:
is_data(data, block) additionally checks that the observations in the data container are valid for a Block:
Status
This depends on Invariants.jl which still needs to be released.