Runhouse

Latest version: v0.1.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

0.85

• /sashab/summer (runhouse.Function)
  • mult (runhouse.Function)

0.0.36

Highlights

Enrich CLI commands (and corresponding python APIs) for interacting with Runhouse clusters.

`runhouse cluster`: `list`, `down`, `up`, `keep-warm`, `logs`, `status`, `ssh`

`runhouse server`: `start`, `restart`, `stop`, `status`

New Features

* Cluster list support (1225, 1227, 1231, 1233, 1245)
* Runhouse cluster & server CLI support (1268, 1301)
* Default ssh key to use for clusters (1357, 1358, 1359, 1365)
* Kubeconfig secret (1346)
* Distributed Pool - runhouse, Ray, PyTorch, and Dask (1304, 1305, 1378, 1379)

Improvements

* Cluster to reuse secrets keys instead of generating new secrets per cluster (1338, 1344)
* Log streaming for nested and multinode (1375, 1377)

Bugfixes
* Cluster reloading fixes (1290, 1291)
* Don't refresh when initializing on-demand clusters via Sky (1258)
* Fix notebook support (1390)
* Fix multinode K8s (1376)

Deprecations
* Python 3.7 support (1281)
* Replacing cluster num_instances with num_nodes (1380, 1405)
* Replace cluster address with head_ip (1370)

Build
* Pin skypilot to 0.7.0 for faster cluster start times

Examples
* Running Flux1 Schnell on AWS EC2 (1275)
* Distributed Examples
* Distributed Pool (1280)
* Pytorch HPO and ResNet (1378)
* Dask LGBM Train (1379)

0.0.35

Quick release to fix autostop loop for ondemand clusters (1262). Also, adding Python 3.12 support and dropping Python 3.7 support (1074).

0.0.34

Highlights

This release expands reporting and monitoring of cluster status, cloud properties, and utilization metrics (via `runhouse status` and the Den UI), and improves mutli-node and multi-cluster support broadly.

Improvements

* Cluster status, cloud info, and utilization reporting improvements (1209, 1224, 1226, 1197, 1242, 1246, 1249)
* Install default_env on all nodes (1240)
* Introduce cluster.a_up to parallelize or launch clusters asyncronously by dongreenberg in https://github.com/run-house/runhouse/pull/1247

Bugfixes
* Install from explicit `dest_path` instead of relative path. by rohinb2 in https://github.com/run-house/runhouse/pull/1238
* Temporary fix for pydantic version error with FastAPI. by rohinb2 in https://github.com/run-house/runhouse/pull/1237
* Run ssh commands for docker clusters via `ssh` + `docker exec` as opposed to SSH Proxy. by rohinb2 in (1235, 1251)

Deprecations
* Deprecate function.send_secrets (1091)
* Deprecate some old unused function methods by dongreenberg in https://github.com/run-house/runhouse/pull/1092
* remove sagemaker github action by jlewitt1 in https://github.com/run-house/runhouse/pull/1244

Examples
* Add Multicloud Airflow example by py-rh in https://github.com/run-house/runhouse/pull/1219

**Full Changelog**: https://github.com/run-house/runhouse/compare/0.0.33...v0.0.34

0.0.33

Highlights

Docker dev & prod workflows
We released a new [guide](https://www.run.house/docs/docker-workflows) showing how you can use the same docker image on a Runhouse cluster for both local development and production.

**Local Development**: We now support passing in requirements to the Runhouse `env` object instead of preemptively sending the env to the function, ensuring that local changes are synced over.

dev_env = rh.env(name="dev_env", env_vars={"HF_TOKEN": "****"}, reqs=["diffusers", "transformers"])

we pass in the env object to ensure any requirements specified in the env will be synced onto the cluster properly
dev_fn = rh.function(is_transformers_available).to(cluster, env=dev_env)


**Production**: The docker image holds all the packages and versions we want, ensuring reproducibility and reduce ingress costs of installing dependencies on each production cluster.


Improvements

- If no package version is specified, install the same version that is installed locally (1058)
- Convert folder to a Module (995)
- Support constructing an empty env with only a name (1095)
- Support loading an on-demand cluster from name locally in addition to Den (1093)
- Add option to skip loading resources from Den (1096)
- Update client connection flow to reduce check server calls (1098, 1141)
- Updating Folder APIs when interacting with a cluster (1147, 1116, 1108)
- Add launched properties to ondemand cluster config (1139)
- Stream logs in SSH setup commands (1211)
- Logging updates and improvements (1177, 1178, 1204)
- Update command running for Kubernetes, and support Docker images with Kubernetes clusters (1173, 1174)

Clean up

- Remove sshfs dependency ([1129](https://github.com/run-house/runhouse/pull/1129))
- Convert cluster `rsync` method to public (1082)

Bug Fixes

- Remove callable param from Folder APIs (1101)
- Fix folder construction in the Package (1083)
- `importlib` support for Python 3.7 (1073)
- Fix conda installation on cluster (1176)
- Have modules created in an env be put within that env (1194)

Deprecations

Deprecate no longer maintained resources and functionality
- Table (1216)
- SageMaker Cluster (1222)
- Provenance and Runs (1221)
- File and Blob (1213)

Examples

- Docker workflow guide (1094)
- FastAPI RAG app with custom vector embeddings (1118)
- Torch image classification example (1086)
- Airflow Torch training with Runhouse (1086)
- LoRA fine-tuning from a notebook example (1086)

0.0.32

Highlights
Changes to reqs, packages, and env installation
More explicit sycning behavior between local and remote development, and more flexible support for package installations on the cluster.

**`working_dir` env argument**
Previously, you could specify a "working directory" as part of your Runhouse env to sync over to a cluster. By default, this working directory is based on the folder that you are running your Runhouse Python code from (perhaps totally disconnected from the location of the coe you're sending over). This behavior changes in this release, and we now instead sync over the package in which the local class or function being sent to the cluster belongs. This eliminates unexpected sharp edges users encountered with working_dir setting, and we look to deprecate working_dir sometime soon (though this should not be disruptive). To specify folders to sync, one can directly pass local paths into the `reqs` of the Runhouse env.


env = rh.env(
name="env_with_local_package",
reqs=["pandas", "torch", "~/path/to/package"],
)


**Local path detection**
When sending over a function or module that imports local code to a remote cluster, we now automatically detect [1] the package on the filesystem corresponding to that code, add it to the env requirements, and sync it over to the cluster.

**Local package detection**
You can now pass the name of a local Python package, whether installed from source or editably, and we'll detect the correct directory to sync over. This is important for teams collaborating on shapred repos, who may not have their clones saved in the same place.

**Increased package installation support**
Pip install will now work properly for local folders, in addition to package strings. Including a requirement that is installed locally will also sync appropriately to the cluster.

* Pip install method will correctly work for local folders as well (998)
* Importing from a given file will now detect [1] a package on the filesystem to sync based on that file, add that to the envs reqs, and then sync it (914)

Updated Connection Flow
Improvements to detecting and checking the HTTP server connection. Improved and faster approach to fallbacks and retries when unable to reach the client. As part of the connection refactor, ondemand clusters are no longer automatically brought up when there is a call made to/on it. Rather, one needs to manually call `up()` or `up_if_not()` to bring up the cluster if it is not already running.

Deprecations
Remove support and clean up docs for features that are no longer maintained. See release notes below for complete list.

Release Notes

Improvements
**Reqs, Packages & Envs Revamp**
* Automatically add module pointers and reqs to env if they don't exist (914, 968)
* Change pointers to store absolute path (989)
* Insert at the beginning of sys.path for packages (990)
* Including a req that is installed locally will now sync appropriately (997)
* Support pip installing folders (998)


**Connection Flow**
* Fix tunnel hanging at termination (957, 959)
* Convert cluster client to a property (975)
* Add wrapper for running client methods (981)
* Move check server logic into cluster client call (982, 983)
* Handle Ray start in runhouse restart more reliably (1059)

**Other**
* Expand supported Ray versions (720)
* Handle SSH secret syncing in login (887)
* Add log support for clusters with port forwarding (928)
* Remove use of pexpect from password cluster login (940)
* Improve and wrap conda install command on the cluster (954)
* Add runhouse ssh support to local unsaved clusters (1012)
* Check IPs for ondemand clusters when loading from Den (1018)
* Add memory percent to cluster status (1030)
* Don’t log full config (1063)

Bug Fixes
* Propagate self.env if it was set for a module (916)
* Previously, if you pass reqs to a resource constructor as a list, it would get wiped when actually running `.to`
* Update conda env run commands to handle bash commands (920)
* Update config comparison check in cluster factory (955)
* Due to string v int mismatch in ips, sometimes cluster would reconstruct rather than load from Den
* Quote pip installs correctly (1032)
* Previously, package strings like `numpy==1.24.6` wouldnt install correctly due to parsing
* Pass through missing k8s cluster factory args (1067)

BC-Breaking
**Package & Envs**
* Locate working dir in breath first approach (908)
* Search for local of module based on it's file location, rather than runhouse or current working directory
* Remove default working dir from `\.` to `None` (915)
* Working directory is no longer synced over by default when sending to a cluster. Instead, it can be specified by passing in the corresponding Package in the env reqs
* Selectively sync runhouse for default restart behavior (1020)
* Only resync runhouse during restart server if it is a local editable package, or if it is explicitly set to True

**`cluster.run()`**
* Disallow passing node when on cluster (946)
* Remove run name support for running via ssh (936)
* Remove port_forward argument (934)

**Deprecations**
* Remove telemetry APIs and otel requirements (986)
* Remove KVstore, mapper, tables, and queue (994)
* Remove Run from docs (1011)
* Deprecate `system` arg from function and module factories

**Other**
* No longer automatically up an ondemand cluster when performing a call on it
* Previously, when making a call to or on an ondemand cluster that is not already running, Runhouse automatically brings up the cluster. This behavior changes in this release, and one will need to add run `cluster.up()` or `cluster.up_if_not()` to start the ondemand cluster.

Doc & Examples
* Add llama 3 fine tuning example (939, 942)
* Update module API example (950)
* Update architecture overview (1036)
* Add `up_if_not()` in examples and tutorials (999, 1009)
* Minor fixes in docs (1008, 1040, 1057)

[1] The detection algorithm for what to sync when you have an importable function or module is as follows:
* Start with the file that contains this importable function or module on the filesystem
* Go up directories till you find any of the following config files ".git", "setup.py", "setup.cfg", "pyproject.toml", "requirements.txt"

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.