Open
Description
Describe the bug
(openadapt-py3.10) abrichr@MacBook-Pro-3 OpenAdapt % pytest
=================================================================== test session starts ====================================================================
platform darwin -- Python 3.10.11, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/abrichr/oa/OpenAdapt
plugins: anyio-3.7.0
collected 23 items / 1 error
========================================================================== ERRORS ==========================================================================
__________________________________________________ ERROR collecting tests/openadapt/test_summary_mixin.py __________________________________________________
tests/openadapt/test_summary_mixin.py:10: in <module>
REPLAY = DemoReplayStrategy(RECORDING)
openadapt/strategies/demo.py:39: in __init__
super().__init__(recording)
openadapt/strategies/mixins/huggingface.py:30: in __init__
super().__init__(recording)
openadapt/strategies/mixins/ocr.py:35: in __init__
super().__init__(recording)
openadapt/strategies/mixins/ascii.py:28: in __init__
super().__init__(recording)
openadapt/strategies/mixins/sam.py:48: in __init__
self.sam_model = self._initialize_model(model_name, checkpoint_dir_path)
openadapt/strategies/mixins/sam.py:60: in _initialize_model
return sam_model_registry[model_name](checkpoint=checkpoint_file_path)
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/segment_anything/build_sam.py:15: in build_sam_vit_h
return _build_sam(
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/segment_anything/build_sam.py:105: in _build_sam
state_dict = torch.load(f)
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/torch/serialization.py:797: in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/torch/serialization.py:283: in __init__
super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
E RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
===================================================================== warnings summary =====================================================================
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/fuzzywuzzy/fuzz.py:11
/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py:28
/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py:28: DeprecationWarning: invalid escape sequence '\S'
"(other than %SystemRoot%\System32), "
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:121
/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870
/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870
../../Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870
/Users/abrichr/Library/Caches/pypoetry/virtualenvs/openadapt-VBXg4jpm-py3.10/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================= short test summary info ==================================================================
ERROR tests/openadapt/test_summary_mixin.py - RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================= 8 warnings, 1 error in 64.82s (0:01:04) ==========================================================
To Reproduce
Follow recommended installation instructions in README:
git clone https://github.com/MLDSAI/OpenAdapt.git
cd OpenAdapt
pip install poetry
poetry install
poetry shell
alembic upgrade head
pytest