# pytest (bc-harnes)
============================================= test session starts ==============================================
platform darwin -- Python 3.11.11, pytest-8.3.4, pluggy-1.5.0
rootdir: /private/tmp/bigcode-evaluation-harness
collected 3 items / 1 error
==================================================== ERRORS ====================================================
______ ERROR collecting bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py ______ImportError while importing test module '/private/tmp/bigcode-evaluation-harness/bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/ggcr/miniconda3/envs/bc-harnes/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py:4: in <module>
from safe_subprocess import run
E ModuleNotFoundError: No module named 'safe_subprocess'
=============================================== warnings summary ===============================================bigcode_eval/tasks/humanevalpack.py:179
/private/tmp/bigcode-evaluation-harness/bigcode_eval/tasks/humanevalpack.py:179: DeprecationWarning: invalid escape sequence '\ '
stop_words = ["<BEF>", "<MSG>", "<DFF>", "\ No newline at end of file"]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================== short test summary info ============================================ERROR bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!========================================= 1 warning, 1 error in 24.32s ========================================
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
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.
This fixes a bad import at module_test
Steps to reproduce
Clone the main repo
$ git clone https://github.com/bigcode-project/bigcode-evaluation-harness.git $ cd bigcode-evaluation-harness/I am using conda envs
$ conda create -n bc-harness python=3.11 $ conda activate bc-harness $ pip install -r requirements.txt && pip install pytestThen as suggested by the GUIDE.md we should run pytest:
bigcode-evaluation-harness/docs/guide.md
Lines 125 to 131 in 6116c6a
However when running a bad import error triggers:
# pytest (bc-harnes) ============================================= test session starts ============================================== platform darwin -- Python 3.11.11, pytest-8.3.4, pluggy-1.5.0 rootdir: /private/tmp/bigcode-evaluation-harness collected 3 items / 1 error ==================================================== ERRORS ==================================================== ______ ERROR collecting bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py ______ImportError while importing test module '/private/tmp/bigcode-evaluation-harness/bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /Users/ggcr/miniconda3/envs/bc-harnes/lib/python3.11/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py:4: in <module> from safe_subprocess import run E ModuleNotFoundError: No module named 'safe_subprocess' =============================================== warnings summary ===============================================bigcode_eval/tasks/humanevalpack.py:179 /private/tmp/bigcode-evaluation-harness/bigcode_eval/tasks/humanevalpack.py:179: DeprecationWarning: invalid escape sequence '\ ' stop_words = ["<BEF>", "<MSG>", "<DFF>", "\ No newline at end of file"] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================================== short test summary info ============================================ERROR bigcode_eval/tasks/custom_metrics/multiple_metrics/safe_subprocess/module_test.py !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!========================================= 1 warning, 1 error in 24.32s ========================================