Skip to content

guided-demos - simplified import statments not working  #488

@ncau

Description

@ncau

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions