Skip to content

torch_to_nnef.exceptions

Regroup all Exceptions that can happen in torch_to_nnef.

rational

Can catch all package related error with an except T2NError same apply for tract errors with except T2NErrorTract

This library is embedded in others codebase: Errors should be specific to be catchable so no builtin Exception should be raised

Classes:

Name Description
T2NError

Generic error that all errors in this lib inherit.

T2NErrorImport

Import error that all errors in this lib inherit.

T2NErrorInvalidArgument

specification of torch_to_nnef export not respected.

T2NErrorMissingOpEmitter

No emitter is registered for this operator.

T2NErrorNotFoundFile

Expected file path does not exist.

T2NError

Bases: Exception

Generic error that all errors in this lib inherit.

T2NErrorImport

Bases: T2NError

Import error that all errors in this lib inherit.

T2NErrorInvalidArgument

Bases: ValueError, T2NError

specification of torch_to_nnef export not respected.

T2NErrorMissingOpEmitter

Bases: T2NErrorNotImplemented

No emitter is registered for this operator.

Narrower than its parent, which an emitter also raises when it exists but refuses a particular configuration (an unsupported dtype, rank or attribute combination). Only this one means "torch_to_nnef has no translation for the operator at all", which is the state the support page reports as unsupported.

T2NErrorNotFoundFile

Bases: ValueError, T2NError

Expected file path does not exist.