Skip to content

Commit e321de8

Browse files
committed
add: address comments
1 parent 9a0fa80 commit e321de8

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/codeflare_sdk/cluster/cluster.py

-18
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
from time import sleep
2222
from typing import List, Optional, Tuple, Dict
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)