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

Reorganise unit tests to better match source layout #122

Merged
merged 6 commits into from
Oct 10, 2023
Merged

Conversation

hatemhelal
Copy link
Contributor

@hatemhelal hatemhelal commented Oct 9, 2023

This breaks up the growing test cases that were added in test_experimental into multiple files.

  • removes some duplicated test cases which weren't obvious but were adding to the overall time.
  • IPU specific tests are now in their own test file.
  • updates to .pytest.ini will default to showing the 10 slowest test cases which can help flag any unexpected slow tests as more functionality is added to this module.

@hatemhelal hatemhelal self-assigned this Oct 9, 2023
@hatemhelal hatemhelal requested a review from awf October 9, 2023 15:22
@hatemhelal hatemhelal linked an issue Oct 9, 2023 that may be closed by this pull request
@hatemhelal
Copy link
Contributor Author

A couple observations from the unittest logs

============================= slowest 10 durations =============================
13.21s call     test/test_integrals_ipu.py::test_eri
11.19s call     test/test_integrals_ipu.py::test_kinetic
9.56s call     test/test_integrals_ipu.py::test_nuclear
8.09s call     test/test_integrals.py::test_eri
6.58s call     test/test_integrals_ipu.py::test_overlap
4.50s call     test/test_integrals.py::test_nuclear
2.92s call     test/test_interop.py::test_gto
2.09s call     test/test_integrals.py::test_water_nuclear
1.93s call     test/test_integrals.py::test_kinetic
1.19s call     test/test_integrals.py::test_water_overlap[sto-3g]
======= 22 passed, 2 skipped, 1 xfailed, 3 warnings in [69](https://github.com/graphcore-research/pyscf-ipu/actions/runs/6458641631/job/17532758834?pr=122#step:7:70).21s (0:01:09) ========

The IPU tests use the IpuModel with 46 tiles -> experimenting with only 4 tiles doesn't noticeably speedup the tests

Copy link
Collaborator

@awf awf left a comment

Choose a reason for hiding this comment

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

Brilliant, thanks.

@awf
Copy link
Collaborator

awf commented Oct 9, 2023

Great to link to the logs from the PR too :)

@hatemhelal hatemhelal merged commit 8b0ee07 into main Oct 10, 2023
8 checks passed
@hatemhelal hatemhelal deleted the 121-reorg-tests branch October 10, 2023 08:48
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.

Reorg test_experimental to better match source file layout
2 participants