-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-35540: Make the real-bogus Task and Interface run and pass the existing tests #5
Conversation
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 style comments and suggestions about the tests.
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.
A few more adjustments, but otherwise you can merge.
inputs = CutoutInputs(science=data, difference=data, template=data) | ||
result = self.interface.infer([inputs]) | ||
# TODO: I think this should return a score of identically zero? | ||
self.assertEqual(result, [0]) | ||
self.assertTupleEqual(result.shape, (1, 1)) # Result is an array, even if we pass a signle sample |
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.
signle->single
tests/test_TransiNetInterface.py
Outdated
# TODO: I think this should return a score of identically zero? | ||
self.assertEqual(result, [0]) | ||
self.assertTupleEqual(result.shape, (1, 1)) # Result is an array, even if we pass a signle sample | ||
self.assertAlmostEqual(result[0][0], 0.5011908) |
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.
Let's note that this is a purely empirical value.
Now checks against an empirical (but meaningless) value, as well as the size of the returned array. Note: this assumes a fixed model+checkpoint file, which may change in the future.
It is also squeezed to prevent the checkpoint from growing too big. Updated checkpoint uploaded too.
DM-35540: Make the real-bogus Task and Interface run and pass the existing tests
It is just about making the code not fail. Has nothing to do with the real-bogus classification accuracy, etc.