Open oferfrid opened 6 months ago
git clone git@github.com:ashleve/lightning-hydra-template.git cd lightning-hydra-template virtualenv --python=/usr/bin/python3.8 venv source venv/bin/activate.csh pip install -r requirements.txt python -m pytest tests/test_configs.py::test_train_config
ERROR tests/test_configs.py::test_train_config - AttributeError: 'OrphanPath' object has no attribute 'exists'
self = provider=hydra, path=pkg://hydra.conf, config_path = 'train.yaml'
def is_config(self, config_path: str) -> bool: config_path = self._normalize_file_name(config_path) try: files = resources.files(self.path) except (ValueError, ModuleNotFoundError, TypeError): return False res = files.joinpath(config_path)
ret = res.exists() and res.is_file() E AttributeError: 'OrphanPath' object has no attribute 'exists'
ret = res.exists() and res.is_file()
E AttributeError: 'OrphanPath' object has no attribute 'exists'
venv_v203_test/lib/python3.8/site-packages/hydra/_internal/core_plugins/importlib_resources_config_source.py:87: AttributeError
pip freeze: venv.txt
add explicit version to requirements.txt: importlib-resources==6.1.3
reproduce:
result:
ERROR tests/test_configs.py::test_train_config - AttributeError: 'OrphanPath' object has no attribute 'exists'
self = provider=hydra, path=pkg://hydra.conf, config_path = 'train.yaml'
venv_v203_test/lib/python3.8/site-packages/hydra/_internal/core_plugins/importlib_resources_config_source.py:87: AttributeError
pip freeze: venv.txt
workaround:
add explicit version to requirements.txt: importlib-resources==6.1.3