Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing kubeflow-training breaks import for other kubeflow packages (katib, fairing, etc.) #1471

Closed
cakeislife100 opened this issue Nov 18, 2021 · 20 comments · Fixed by #1531
Labels

Comments

@cakeislife100
Copy link
Contributor

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__)
@gaocegege
Copy link
Member

cc @alembiewski

@gaocegege
Copy link
Member

Thanks for the issue. I am not familiar with the python client, maybe @alembiewski could help us.

6523d8d#diff-b7637017217263593c31539d809c79ef7ddcc2018b8b454ba6bdbacdb6962aaaL1

@alembiewski
Copy link
Member

Thanks for finding that, @cakeislife100! The fix you provided in the description looks good to me - it seems like this code was lost during the major SDK upgrade. Feel free to open a PR or let me know if you need any help with that.

@jaiganeshp
Copy link

Will this issue be resolved with v1.4.0 release? I still don't see the fix in master code. It is breaking kubeflow katib for us as well.

@cakeislife100
Copy link
Contributor Author

Sorry for the delay, I completely lost track of this. @alembiewski do you mind reviewing?

@jaiganeshp
Copy link

Thank you for the reply @cakeislife100 . @alembiewski : Do you think it could be released with v1.4.0?

@alembiewski
Copy link
Member

@jaiganeshp, it definitely makes sense to me to include it. cc @gaocegege and @terrytangyuan to confirm

@terrytangyuan
Copy link
Member

terrytangyuan commented Feb 8, 2022

Yeah I think we can include it for the next 1.4 RC release.

@terrytangyuan
Copy link
Member

cc @johnugeorge

@jaiganeshp
Copy link

Thank you so much @alembiewski and @terrytangyuan . And thank you @cakeislife100 for the fix.

@terrytangyuan
Copy link
Member

@johnugeorge Could you cherry-pick this #1531 to the 1.4 release branch?

@terrytangyuan
Copy link
Member

Actually this doesn’t have to be part of the release of the repo. We can just release the Python SDK independently as the versioning is different. https://pypi.org/project/kubeflow-training/#history

@alembiewski Would you like to release a new version of the SDK once 1.4 is officially released?

@alembiewski
Copy link
Member

@terrytangyuan, sure!

We can just release the Python SDK independently as the versioning is different

But the package version should be 1.4, right? To match the operator version?

@terrytangyuan
Copy link
Member

Yes

@johnugeorge
Copy link
Member

Sorry that I missed this. As @terrytangyuan mentioned, this can go in the separate sdk release. We can close this issue once sdk is released

@terrytangyuan
Copy link
Member

We are releasing 1.4 now.

@alembiewski Would you be able to help us released the new SDK with the fix?

@alembiewski
Copy link
Member

@terrytangyuan, sure! working on it

@johnugeorge
Copy link
Member

@terrytangyuan
Copy link
Member

@alembiewski Thanks! I've also created an issue to track the release automation. #1540 Feel free to pick it up if that's something you are interested in working on.

@johnugeorge
Copy link
Member

Closing this PR as #1539 and #1541 are merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants