26
26
import ipywidgets as widgets
27
27
from IPython .display import display , HTML , Javascript
28
28
import 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 (
33
33
config_check ,
34
34
get_api_client ,
35
35
)
@@ -58,7 +58,7 @@ def cluster_up_down_buttons(
58
58
icon = "trash" ,
59
59
)
60
60
61
- wait_ready_check = wait_ready_check_box ()
61
+ wait_ready_check = _wait_ready_check_box ()
62
62
output = widgets .Output ()
63
63
64
64
# 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
83
83
delete_button .on_click (on_down_button_clicked )
84
84
85
85
86
- def wait_ready_check_box ():
86
+ def _wait_ready_check_box ():
87
87
"""
88
88
The wait_ready_check_box function will return a checkbox widget used for waiting for the resource to be in the state READY.
89
89
"""
@@ -117,7 +117,7 @@ def view_clusters(namespace: str = None):
117
117
)
118
118
return # Exit function if not in Jupyter Notebook
119
119
120
- from ..ray .cluster .cluster import get_current_namespace
120
+ from ... ray .cluster .cluster import get_current_namespace
121
121
122
122
if not namespace :
123
123
namespace = get_current_namespace ()
@@ -280,7 +280,7 @@ def _on_ray_dashboard_button_click(
280
280
"""
281
281
_on_ray_dashboard_button_click handles the event when the Open Ray Dashboard button is clicked, opening the Ray Dashboard in a new tab
282
282
"""
283
- from codeflare_sdk . ray . cluster import Cluster
283
+ from codeflare_sdk import Cluster
284
284
285
285
cluster_name = classification_widget .value
286
286
namespace = ray_clusters_df [ray_clusters_df ["Name" ] == classification_widget .value ][
@@ -311,7 +311,7 @@ def _on_list_jobs_button_click(
311
311
"""
312
312
_on_list_jobs_button_click handles the event when the View Jobs button is clicked, opening the Ray Jobs Dashboard in a new tab
313
313
"""
314
- from codeflare_sdk . ray . cluster import Cluster
314
+ from codeflare_sdk import Cluster
315
315
316
316
cluster_name = classification_widget .value
317
317
namespace = ray_clusters_df [ray_clusters_df ["Name" ] == classification_widget .value ][
@@ -344,7 +344,7 @@ def _delete_cluster(
344
344
_delete_cluster function deletes the cluster with the given name and namespace.
345
345
It optionally waits for the cluster to be deleted.
346
346
"""
347
- from ..ray .cluster .cluster import _check_aw_exists
347
+ from ... ray .cluster .cluster import _check_aw_exists
348
348
349
349
try :
350
350
config_check ()
@@ -402,7 +402,7 @@ def _fetch_cluster_data(namespace):
402
402
"""
403
403
_fetch_cluster_data function fetches all clusters and their spec in a given namespace and returns a DataFrame.
404
404
"""
405
- from ..ray .cluster .cluster import list_all_clusters
405
+ from ... ray .cluster .cluster import list_all_clusters
406
406
407
407
rayclusters = list_all_clusters (namespace , False )
408
408
if not rayclusters :
0 commit comments