Skip to content
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

#1036: Added pytorch and numba integration test compatible with CPU only VM #485

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

tomuben
Copy link
Collaborator

@tomuben tomuben commented Dec 9, 2024

'''))

row = self.query(f"SELECT pytorchbasic.test_pytorch(1000);")[0]
self.assertIn('Mean Squared Error', row[0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assert if the loss is not NaN, this could hint to something is broken, if it worked before

/
'''))

row = self.query("SELECT numbabasic.test_numba(10000);")[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to verify the returned value?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should simply out of good practice

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not. The return value is some random number. If there is any problem, an exception is thrown and this breaks the test.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case your are assert should be , did we get a row back

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an assert for the resulting row

/
'''))

row = self.query(f"SELECT pytorchbasic.test_pytorch(1000);")[0]
self.assertIn('Mean Squared Error', row[0])

self.assertFalse(math.isnan(row[0]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, NaN is transformed to NULL in the DB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appearantly the build failed when fetching micromamba. Running the test locally , the assert is correct.

Return the sum of the discrimants and check number
@tomuben tomuben merged commit fb964ea into master Jan 7, 2025
24 checks passed
@tomuben tomuben deleted the refactoring/1036_numba_pytorch_tests branch January 7, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants