As highlighted in #38, the error type currently returned by wasi-nn calls is limited in several ways:
- all possible errors are included in one large enum: this should change to have separate error types for separate calls (i.e., what can go wrong for
load is different than what can go wrong for compute); this may only be possible to do in WIT (?)
- the set of errors should be audited: some errors, e.g.,
busy, may never be returned by any implementation so we should remove them based on current implementation experience
- the errors are not descriptive enough: some errors, e.g.,
invalid-argument or model-too-large, would benefit from additional information to give the user some clue of what is going on; some of this could be improved by documentation, but being able to attach some extra data to an error might be helpful (is this possible in WIT?)
As highlighted in #38, the error type currently returned by
wasi-nncalls is limited in several ways:loadis different than what can go wrong forcompute); this may only be possible to do in WIT (?)busy, may never be returned by any implementation so we should remove them based on current implementation experienceinvalid-argumentormodel-too-large, would benefit from additional information to give the user some clue of what is going on; some of this could be improved by documentation, but being able to attach some extra data to an error might be helpful (is this possible in WIT?)