2626import ipywidgets as widgets
2727from IPython .display import display , HTML , Javascript
2828import pandas as pd
29- from ..ray .cluster .config import ClusterConfiguration
30- from ..ray .cluster .status import RayClusterStatus
31- from ..common import _kube_api_error_handling
32- from ..common . kubernetes_cluster .auth import (
29+ from ... ray .cluster .config import ClusterConfiguration
30+ from ... ray .cluster .status import RayClusterStatus
31+ from ..kubernetes_cluster import _kube_api_error_handling
32+ from ..kubernetes_cluster .auth import (
3333 config_check ,
3434 get_api_client ,
3535)
@@ -58,7 +58,7 @@ def cluster_up_down_buttons(
5858 icon = "trash" ,
5959 )
6060
61- wait_ready_check = wait_ready_check_box ()
61+ wait_ready_check = _wait_ready_check_box ()
6262 output = widgets .Output ()
6363
6464 # Display the buttons in an HBox wrapped in a VBox which includes the wait_ready Checkbox
@@ -83,7 +83,7 @@ def on_down_button_clicked(b): # Handle the down button click event
8383 delete_button .on_click (on_down_button_clicked )
8484
8585
86- def wait_ready_check_box ():
86+ def _wait_ready_check_box ():
8787 """
8888 The wait_ready_check_box function will return a checkbox widget used for waiting for the resource to be in the state READY.
8989 """
@@ -117,7 +117,7 @@ def view_clusters(namespace: str = None):
117117 )
118118 return # Exit function if not in Jupyter Notebook
119119
120- from ..ray .cluster .cluster import get_current_namespace
120+ from ... ray .cluster .cluster import get_current_namespace
121121
122122 if not namespace :
123123 namespace = get_current_namespace ()
@@ -280,7 +280,7 @@ def _on_ray_dashboard_button_click(
280280 """
281281 _on_ray_dashboard_button_click handles the event when the Open Ray Dashboard button is clicked, opening the Ray Dashboard in a new tab
282282 """
283- from codeflare_sdk . ray . cluster import Cluster
283+ from codeflare_sdk import Cluster
284284
285285 cluster_name = classification_widget .value
286286 namespace = ray_clusters_df [ray_clusters_df ["Name" ] == classification_widget .value ][
@@ -311,7 +311,7 @@ def _on_list_jobs_button_click(
311311 """
312312 _on_list_jobs_button_click handles the event when the View Jobs button is clicked, opening the Ray Jobs Dashboard in a new tab
313313 """
314- from codeflare_sdk . ray . cluster import Cluster
314+ from codeflare_sdk import Cluster
315315
316316 cluster_name = classification_widget .value
317317 namespace = ray_clusters_df [ray_clusters_df ["Name" ] == classification_widget .value ][
@@ -344,7 +344,7 @@ def _delete_cluster(
344344 _delete_cluster function deletes the cluster with the given name and namespace.
345345 It optionally waits for the cluster to be deleted.
346346 """
347- from ..ray .cluster .cluster import _check_aw_exists
347+ from ... ray .cluster .cluster import _check_aw_exists
348348
349349 try :
350350 config_check ()
@@ -402,7 +402,7 @@ def _fetch_cluster_data(namespace):
402402 """
403403 _fetch_cluster_data function fetches all clusters and their spec in a given namespace and returns a DataFrame.
404404 """
405- from ..ray .cluster .cluster import list_all_clusters
405+ from ... ray .cluster .cluster import list_all_clusters
406406
407407 rayclusters = list_all_clusters (namespace , False )
408408 if not rayclusters :
0 commit comments