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:

  1. Install kubeflow-katib at the system level using pip install kubeflow-katib
  2. Install kubeflow-training at the user level using pip install --user kubeflow-training
  3. 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)

Most upvoted comments

@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?