Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions demo-notebooks/additional-demos/hf_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -60,7 +60,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -76,8 +76,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/additional-demos/local_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -30,7 +30,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -46,8 +46,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/additional-demos/ray_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, RayJobClient, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration, RayJobClient\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -33,7 +33,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"# Note: auth_token is also used below as the bearer token for the RayJobClient\n",
"auth_token = \"sha256~XXXXX\" # oc whoami -t\n",
"auth_config = AuthConfig(\n",
Expand All @@ -52,8 +52,7 @@
"# )\n",
"# auth_token = ... # Retrieve access token from your OIDC provider for RayJobClient\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -39,7 +39,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -55,8 +55,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/guided-demos/1_cluster_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -33,7 +33,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -49,8 +49,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/guided-demos/2_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -36,7 +36,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -52,8 +52,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions demo-notebooks/guided-demos/3_widget_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"outputs": [],
"source": [
"# Import pieces from codeflare-sdk\n",
"from codeflare_sdk import Cluster, ClusterConfiguration, view_clusters, set_api_client\n",
"from kube_authkit import AuthConfig, get_k8s_client"
"from codeflare_sdk import Codeflare, SDKConfig, Cluster, ClusterConfiguration, view_clusters\n",
"from kube_authkit import AuthConfig"
]
},
{
Expand All @@ -39,7 +39,7 @@
"# auth_config = AuthConfig(method=\"auto\")\n",
"\n",
"# Option 2 (Recommended for RHOAI Workbenches): Token-based authentication\n",
"# Get your token with: oc whoami -t (or from the OpenShift console Copy login command)\n",
"# Get your token with: oc whoami -t (or from the OpenShift console \u2192 Copy login command)\n",
"auth_config = AuthConfig(\n",
" method=\"openshift\",\n",
" k8s_api_host=\"https://api.example.com:6443\",\n",
Expand All @@ -55,8 +55,7 @@
"# use_device_flow=True, # Interactive device flow for notebook environments\n",
"# )\n",
"\n",
"api_client = get_k8s_client(config=auth_config)\n",
"set_api_client(api_client)"
"cf = Codeflare(config=SDKConfig(auth=auth_config))\n"
]
},
{
Expand Down
Loading
Loading