From 495faaf3b82d6a5ce7e0635f664b9f2d27120932 Mon Sep 17 00:00:00 2001 From: Caroline Date: Thu, 6 Jun 2024 17:54:37 -0400 Subject: [PATCH] random small fixes --- runhouse/main.py | 2 +- runhouse/resources/packages/package.py | 1 + runhouse/rns/defaults.py | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/runhouse/main.py b/runhouse/main.py index a11bd670b..f5be1001f 100644 --- a/runhouse/main.py +++ b/runhouse/main.py @@ -604,7 +604,7 @@ def _start_server( flags.append(default_env_flag) conda_env_flag = f" --conda-env {conda_env}" if conda_env else "" - if default_env_flag: + if conda_env_flag: logger.info(f"Creating runtime env for conda env: {conda_env}") flags.append(conda_env_flag) diff --git a/runhouse/resources/packages/package.py b/runhouse/resources/packages/package.py index 9c9776046..da7d92b1a 100644 --- a/runhouse/resources/packages/package.py +++ b/runhouse/resources/packages/package.py @@ -162,6 +162,7 @@ def _install(self, env: Union[str, "Env"] = None, cluster: "Cluster" = None): path = self.install_target.path else: path = self.to(cluster).install_target.path + install_cmd = self._install_cmd(cluster=cluster) if not path: return diff --git a/runhouse/rns/defaults.py b/runhouse/rns/defaults.py index 49cfd4131..1c06be742 100644 --- a/runhouse/rns/defaults.py +++ b/runhouse/rns/defaults.py @@ -236,7 +236,9 @@ def set(self, key: str, value: Any, config_path: Optional[str] = None): def set_nested(self, key: str, value: Any, config_path: Optional[str] = None): """Set a config key that has multiple key/value pairs""" - self.defaults_cache.setdefault(key, {}).update(value) + if not self.defaults_cache.get(key): + self.defaults_cache.setdefault(key, {}) + self.defaults_cache[key].update(value) self.save_defaults(config_path=config_path) def set_many(self, key_value_pairs: Dict, config_path: Optional[str] = None):