|
26 | 26 | import ipywidgets as widgets
|
27 | 27 | from IPython.display import display, HTML, Javascript
|
28 | 28 | import pandas as pd
|
29 |
| -from .config import ClusterConfiguration |
30 |
| -from .model import RayClusterStatus |
| 29 | +from ..ray.cluster.config import ClusterConfiguration |
| 30 | +from ..ray.cluster.status import RayClusterStatus |
31 | 31 | from ..common import _kube_api_error_handling
|
32 | 32 | from ..common.kubernetes_cluster.auth import (
|
33 | 33 | config_check,
|
34 | 34 | get_api_client,
|
35 | 35 | )
|
36 | 36 |
|
37 | 37 |
|
38 |
| -def cluster_up_down_buttons(cluster: "codeflare_sdk.cluster.Cluster") -> widgets.Button: |
| 38 | +def cluster_up_down_buttons( |
| 39 | + cluster: "codeflare_sdk.ray.cluster.cluster.Cluster", |
| 40 | +) -> widgets.Button: |
39 | 41 | """
|
40 | 42 | The cluster_up_down_buttons function returns two button widgets for a create and delete button.
|
41 | 43 | The function uses the appwrapper bool to distinguish between resource type for the tool tip.
|
@@ -115,7 +117,7 @@ def view_clusters(namespace: str = None):
|
115 | 117 | )
|
116 | 118 | return # Exit function if not in Jupyter Notebook
|
117 | 119 |
|
118 |
| - from .cluster import get_current_namespace |
| 120 | + from ..ray.cluster.cluster import get_current_namespace |
119 | 121 |
|
120 | 122 | if not namespace:
|
121 | 123 | namespace = get_current_namespace()
|
@@ -278,7 +280,7 @@ def _on_ray_dashboard_button_click(
|
278 | 280 | """
|
279 | 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
|
280 | 282 | """
|
281 |
| - from codeflare_sdk.cluster import Cluster |
| 283 | + from codeflare_sdk.ray.cluster import Cluster |
282 | 284 |
|
283 | 285 | cluster_name = classification_widget.value
|
284 | 286 | namespace = ray_clusters_df[ray_clusters_df["Name"] == classification_widget.value][
|
@@ -309,7 +311,7 @@ def _on_list_jobs_button_click(
|
309 | 311 | """
|
310 | 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
|
311 | 313 | """
|
312 |
| - from codeflare_sdk.cluster import Cluster |
| 314 | + from codeflare_sdk.ray.cluster import Cluster |
313 | 315 |
|
314 | 316 | cluster_name = classification_widget.value
|
315 | 317 | namespace = ray_clusters_df[ray_clusters_df["Name"] == classification_widget.value][
|
@@ -342,7 +344,7 @@ def _delete_cluster(
|
342 | 344 | _delete_cluster function deletes the cluster with the given name and namespace.
|
343 | 345 | It optionally waits for the cluster to be deleted.
|
344 | 346 | """
|
345 |
| - from .cluster import _check_aw_exists |
| 347 | + from ..ray.cluster.cluster import _check_aw_exists |
346 | 348 |
|
347 | 349 | try:
|
348 | 350 | config_check()
|
@@ -400,7 +402,7 @@ def _fetch_cluster_data(namespace):
|
400 | 402 | """
|
401 | 403 | _fetch_cluster_data function fetches all clusters and their spec in a given namespace and returns a DataFrame.
|
402 | 404 | """
|
403 |
| - from .cluster import list_all_clusters |
| 405 | + from ..ray.cluster.cluster import list_all_clusters |
404 | 406 |
|
405 | 407 | rayclusters = list_all_clusters(namespace, False)
|
406 | 408 | if not rayclusters:
|
|
0 commit comments