codeflare-sdk
codeflare-sdk copied to clipboard
guided-demos - simplified import statments not working
Describe the Bug
Currently running the notebook as is written results in the following:
#Import pieces from codeflare-sdk from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication
ImportError Traceback (most recent call last) Cell In [12], line 4 1 # Import pieces from codeflare-sdk 2 # from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration 3 # from codeflare_sdk.cluster.auth import TokenAuthentication ----> 4 from codeflare_sdk import Cluster, ClusterConfiguration, TokenAuthentication
ImportError: cannot import name 'Cluster' from 'codeflare_sdk' (/opt/app-root/lib64/python3.9/site-packages/codeflare_sdk/init.py)
Reverting back to the prior version works fine as intended:
# Import pieces from codeflare-sdk from codeflare_sdk.cluster.cluster import Cluster, ClusterConfiguration from codeflare_sdk.cluster.auth import TokenAuthentication
Codeflare Stack Component Versions
Codeflare SDK:
Steps to Reproduce the Bug
Run with simplified imports.
What Have You Already Tried to Debug the Issue?
Tried reinstalling codeflare-sdk via pip.
Expected Behavior
No failure on simplified inputs.
Screenshots, Console Output, Logs, etc.
Affected Releases
Main.
Additional Context
Add as applicable and when known:
Openshift: 4.14.2, Openshift AI: 2.8.0 CodeFlare Operator: 1.2.0
I have tested with version 0.13.0 and were encountering the same error. It appears that the issue has been resolved in version 0.14.0 of the Codeflare SDK.
It's worth noting that the issue was not encountered in the newest version of the SDK, specifically version 0.15.1. If you have tested with version 0.13.0 and were encountering errors, upgrading to version 0.14.0 or newer, such as version 0.15.1, should resolve the issue.