[codex] Fix fusion test subprocess environment - #2623
Open
lintool wants to merge 1 commit into
Open
Conversation
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.
Summary
os.system(...)fusion invocations withsubprocess.run(..., check=True).pyserini.fusionwithsys.executableso subprocesses use the same Python environment as the running test.tmp/and usedownload_urlplusgzipextraction instead of root-levelwget/gunzipside effects.Root Cause
The old test used bare
python, which could resolve outside the active test environment. In this workspace it resolved to Homebrew Python 3.11 instead ofpyserini-dev3; that subprocess failed on missing dependencies, butos.systemhid the error and the test surfaced only as a failed TREC-file comparison.Validation
mamba run -n pyserini-dev3 python -m py_compile tests/core/test_fusion.pymamba run -n pyserini-dev3 python -c "<smoke simple fusion tests>"mamba run -n pyserini-dev3 python -c "<smoke complex COVID fusion test>"