Use more consistent and documented exception types
E.g. some sort of InvalidTensorizerFile exception when deserializing, which could have subtypes like UnsupportedTensorizerVersion
This would just make it a bit easier for code using tensorizer to differentiate between bad files or issues with their system, library dependency versions, deserialization flags they requested, or various other things
Having a smaller, documented set of errors in the outer layer of the API makes it so people don't have to use except Exception as often, which is usually nice
From @Eta0 in https://github.com/coreweave/tensorizer/pull/127#pullrequestreview-2133569874
InvalidTensorizerFile
exception when deserializing, which could have subtypes likeUnsupportedTensorizerVersion
except Exception
as often, which is usually nice