training-operator: Installing kubeflow-training breaks import for other kubeflow packages (katib, fairing, etc.)
Installing kubeflow-training (at the user-level) and then trying to import katib (previously installed at the system level) leads to the error:
>>> from kubeflow import katib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'katib' from 'kubeflow' (/home/jovyan/.local/lib/python3.8/site-packages/kubeflow/__init__.py)
To repro:
- Install
kubeflow-katibat the system level usingpip install kubeflow-katib - Install
kubeflow-trainingat the user level usingpip install --user kubeflow-training - Try to import
katib
I believe the fix should be to revert __init__.py back to what it was in this commit, unless there is a specific reason this was removed?
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 20 (17 by maintainers)
@alembiewski Thanks! I’ve also created an issue to track the release automation. https://github.com/kubeflow/training-operator/issues/1540 Feel free to pick it up if that’s something you are interested in working on.
Sorry for the delay, I completely lost track of this. @alembiewski do you mind reviewing?
Thanks for the issue. I am not familiar with the python client, maybe @alembiewski could help us.
https://github.com/kubeflow/training-operator/commit/6523d8d2b7a27f1140a05971843cc4da7523694f#diff-b7637017217263593c31539d809c79ef7ddcc2018b8b454ba6bdbacdb6962aaaL1