-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Add version validation if model fails to load #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1336a7d
to
9a70088
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments - may be out of the scope of this PR, but I feel like we might want to clean this code at some point.
Also if we're adding a new feature, we should probably add a test - just something simple like mock/patching the call to torch.load
, forcing it to raise an exception, and ensuring that the validate_environment
is called, is probably sufficient to check that the high-level behaviour is doing what we expect (rather than the details of what's returned etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I share Aaron's concerns but we also want this function to be flexible. We could look at improving the documentation a bit, but it's good enough imo.
Description
Add environment context information if the model fails to load.
Type of Change
Code Compatibility
Code Performance and Testing
Dependencies
Documentation
Additional Notes