Mark a few more tests as slow#1292
Open
mhucka wants to merge 6 commits intoquantumlib:mainfrom
Open
Conversation
Some of the tests are extremely time-consuming on even a fast parallel Linux VM. The two tests marked in this commit clocked in at **20 minutes** each. The following numbers are from using the pytest `--durations` option: 1288.49s call src/openfermion/ops/representations/doci_hamiltonian_test.py::IntegralTransformsTest::test_fermionic_hamiltonian_from_integrals 1208.20s call src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py::ReduceSymmetryQubitsTest::test_energy_reduce_symmetry_qubits
We don't run isort in check/format-incremental. I didn't need to run it manually in the previous commit.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the @pytest.mark.slow decorator to several long-running tests to optimize CI performance and removes unused imports in doci_hamiltonian_test.py. Feedback indicates that test_kpoint_isdf_single_translation was identified as slow in the PR description but was missed in the code changes, and should be marked accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some of the tests are extremely time-consuming on even a fast parallel Linux VM. Two of tests marked in this commit clocked in at 20 minutes each even when running with
-n 30. The following numbers are from using the pytest--durationsoption:1288.49s call src/openfermion/ops/representations/doci_hamiltonian_test.py::IntegralTransformsTest::test_fermionic_hamiltonian_from_integrals
1208.20s call src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py::ReduceSymmetryQubitsTest::test_energy_reduce_symmetry_qubits
Two other tests were in the 600-700 sec range, and they are marked as slow in this PR as well. The use of
@pytest.mark.slowallows the user to run pytest with-m "not slow"to skip the these tests and some other tests in OpenFermion that are already marked as slow.Note: the changes to the imports are purely formatting/linting changes brought about by running check/format-incremental.