FluxML / FastAI.jl

Repository of best practices for deep learning in Julia, inspired by fastai
https://fluxml.ai/FastAI.jl
MIT License
589 stars 51 forks source link

Interface tests #230

Open lorenzoh opened 2 years ago

lorenzoh commented 2 years ago

This adds interface tests to various interfaces in FastAI.jl. This allows

Examples

Blocks

is_block(block, obs) checks that a piece of data is a valid observation for a Block:

image

When data is not valid, you get detailed information on the reason why:

image

This is extensible for custom Block types. Since tuples of blocks are also valid blocks, we can check them, too:

image

Data containers

is_data(data) checks that data implements MLUtils.jl's data container interface.

image

When that is not the case, precise errors are given indicating which parts are not implemented:

image

is_data(data, block) additionally checks that the observations in the data container are valid for a Block:

image

Status

This depends on Invariants.jl which still needs to be released.