Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into local-telemetry-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewitt1 committed Sep 17, 2024
2 parents 5e40e2e + 01302bc commit 68cca27
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 75 deletions.
5 changes: 0 additions & 5 deletions runhouse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,6 @@ def _print_status(status_data: dict, current_cluster: Cluster) -> None:
cluster_name, style=f"link {cluster_link_in_den_ui} white"
)
console.print(cluster_name_hyperlink)
<<<<<<< HEAD

has_cuda: bool = cluster_config.get("has_cuda")
=======
>>>>>>> 8560211c (status cmd prints cluster name as hyperlink to den (#1226))

has_cuda: bool = cluster_config.get("has_cuda")

Expand Down
35 changes: 0 additions & 35 deletions runhouse/resources/hardware/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,29 +194,6 @@ def default_env(self, env):
"Run `cluster.restart_server()` to restart the Runhouse server on the new default env."
)

@classmethod
def from_name(
cls,
name,
load_from_den: bool = True,
dryrun: bool = False,
_alt_options: Dict = None,
_resolve_children: bool = True,
):
cluster = super().from_name(
name=name,
load_from_den=load_from_den,
dryrun=dryrun,
_alt_options=_alt_options,
_resolve_children=_resolve_children,
)
if hasattr(cluster, "_update_from_sky_status"):
try:
cluster._update_from_sky_status(dryrun=True)
except:
pass
return cluster

def save_config_to_cluster(
self,
node: str = None,
Expand Down Expand Up @@ -366,18 +343,8 @@ def endpoint(self, external: bool = False):
external (bool, optional): If ``True``, will only return the external url, and will return ``None``
otherwise (e.g. if a tunnel is required). If set to ``False``, will either return the external url
if it exists, or will set up the connection (based on connection_type) and return the internal url
<<<<<<< HEAD
<<<<<<< HEAD
(including the local connected port rather than the sever port). If cluster is not up, returns
`None``. (Default: ``False``)
=======
(including the local connected port rather than the sever port). If cluster is not up, returns None.
(Default: ``False``)
>>>>>>> c2289235 (Update docstrings (#1230))
=======
(including the local connected port rather than the sever port). If cluster is not up, returns
`None``. (Default: ``False``)
>>>>>>> bbbd6411 (More docstrings cleanup (#1232))
"""
if not self.address or self.on_this_cluster():
return None
Expand Down Expand Up @@ -654,7 +621,6 @@ def put(self, key: str, obj: Any, env: str = None):
obj (Any): Object to put in the object store
env (str, optional): Env of the object store to put the object in. (Default: ``None``)
"""

if self.on_this_cluster():
return obj_store.put(key, obj, env=env)
return self.call_client_method(
Expand Down Expand Up @@ -843,7 +809,6 @@ def connect_server_client(self, force_reconnect=False):
system=self,
)


def status(self, send_to_den: bool = False):
"""Load the status of the Runhouse daemon running on a cluster.
Expand Down
8 changes: 0 additions & 8 deletions runhouse/servers/cluster_servlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ async def __init__(
threading.Lock()
) # will be used when self.gpu_metrics will be updated by different threads.

if self.cluster_config.get("has_cuda"):
logger.debug("Creating _periodic_gpu_check thread.")
collect_gpu_thread = threading.Thread(
target=self._periodic_gpu_check, daemon=True
)
collect_gpu_thread.start()


if self.cluster_config.get("has_cuda"):
logger.debug("Creating _periodic_gpu_check thread.")
collect_gpu_thread = threading.Thread(
Expand Down
27 changes: 0 additions & 27 deletions tests/test_servers/test_servlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,37 +48,10 @@ def test_get_obj(self, test_env_servlet):
resource = deserialize_data(resp.data, resp.serialization)
assert isinstance(resource, Resource)

@pytest.mark.level("unit")
def test_put_obj_local(self, test_env_servlet):
resource = Resource(name="local-resource")
resp = ObjStore.call_actor_method(
test_env_servlet,
"aput_local",
key="key1",
data=serialize_data(resource, "pickle"),
serialization="pickle",
)
assert resp.output_type == "success"

@pytest.mark.level("unit")
def test_get_obj(self, test_env_servlet):
resp = ObjStore.call_actor_method(
test_env_servlet,
"aget_local",
key="key1",
default=KeyError,
serialization="pickle",
remote=False,
)
assert resp.output_type == "result_serialized"
resource = deserialize_data(resp.data, resp.serialization)
assert isinstance(resource, Resource)

@pytest.mark.level("unit")
def test_get_obj_remote(self, test_env_servlet):
resp = ObjStore.call_actor_method(
test_env_servlet,

"aget_local",
key="key1",
default=KeyError,
Expand Down

0 comments on commit 68cca27

Please sign in to comment.