Skip to content

MAINT: changes to test_log.py to avoid RuntimeErrors #1311

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

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Changed tests to avoid RuntimeErrors issued by NumPy for numerical exceptions

Replaced feeding zeros into dpt.log where it is not essentially for the property tested.

When testing special values, hard code expected results, rather than recompute them with np.log.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@oleksandr-pavlyk
Copy link
Contributor Author

@antonwolfy For some reason using fixture suppress_invalid_numpy_warnings did not work like it does in "test_sqrt.py".

Perhaps "test_sqrt.py" could use similar type of changes.

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 83.265%. remained the same when pulling f0d1ec9 on suppress-numpy-warnings-in-test-log into 47f4bc9 on master.

@github-actions
Copy link

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

This is a good change.

Similar changes should be propagated to other tests with warnings.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev0=py310h7bf5fec_51 ran successfully.
Passed: 566
Failed: 434
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk merged commit 05c6b42 into master Jul 29, 2023
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@oleksandr-pavlyk oleksandr-pavlyk deleted the suppress-numpy-warnings-in-test-log branch July 29, 2023 20:25
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev0=py310h7bf5fec_54 ran successfully.
Passed: 595
Failed: 405
Skipped: 119

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