Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3d5da52

Browse files
committedApr 5, 2024·
add: address comments
1 parent c9c5e51 commit 3d5da52

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed
 

‎src/codeflare_sdk/cluster/cluster.py

+1-19
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919
"""
2020

2121
from time import sleep
22-
from typing import List, Optional, Tuple, Dict
22+
from typing import List, Optional, Tuple
2323

24-
import openshift as oc
2524
from kubernetes import config
2625
from ray.job_submission import JobSubmissionClient
27-
import urllib3
2826

2927
from .auth import config_check, api_config_handler
3028
from ..utils import pretty_print
@@ -58,8 +56,6 @@ class Cluster:
5856
Note that currently, the underlying implementation is a Ray cluster.
5957
"""
6058

61-
torchx_scheduler = "ray"
62-
6359
def __init__(self, config: ClusterConfiguration):
6460
"""
6561
Create the resource cluster object by passing in a ClusterConfiguration
@@ -472,20 +468,6 @@ def job_logs(self, job_id: str) -> str:
472468
"""
473469
return self.job_client.get_job_logs(job_id)
474470

475-
def torchx_config(
476-
self, working_dir: str = None, requirements: str = None
477-
) -> Dict[str, str]:
478-
dashboard_address = urllib3.util.parse_url(self.cluster_dashboard_uri()).host
479-
to_return = {
480-
"cluster_name": self.config.name,
481-
"dashboard_address": dashboard_address,
482-
}
483-
if working_dir:
484-
to_return["working_dir"] = working_dir
485-
if requirements:
486-
to_return["requirements"] = requirements
487-
return to_return
488-
489471
def from_k8_cluster_object(
490472
rc,
491473
mcad=True,

‎tests/unit_test.py

-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# TODO: replace all instances of torchx_runner
1615

1716
from pathlib import Path
1817
import sys
@@ -81,10 +80,6 @@
8180
import openshift
8281
from openshift.selector import Selector
8382
import ray
84-
from torchx.specs import AppDryRunInfo, AppDef
85-
from torchx.runner import get_runner, Runner
86-
from torchx.schedulers.ray_scheduler import RayJob
87-
from torchx.schedulers.kubernetes_mcad_scheduler import KubernetesMCADJob
8883
import pytest
8984
import yaml
9085
from unittest.mock import MagicMock

0 commit comments

Comments
 (0)
Please sign in to comment.