Runhouse

Latest version: v0.1.1

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

Scan your dependencies

Page 4 of 6

0.0.19

Minor bug fix release
[Bug fix](https://github.com/run-house/runhouse/pull/494) fixing import breaking in Python 3.8
[Bug fix](https://github.com/run-house/runhouse/pull/497) for loading public functions by name

0.0.18

Highlights
Runhouse Local Mode and rh.here
Previously, the Runhouse server was strictly designed to allow you to deploy apps to it remotely with `my_module.to(my_cluster)`. Now, you can now start the Runhouse server daemon directly to be able to deploy it locally like a traditional web server. Access the local daemon's Cluster object in Python with `rh.here`. `rh.here` always refers to the locally running daemon, so you can use within an existing Runhouse cluster as well.

Start your local Runhouse server:
CLI setup
$ runhouse restart
$ runhouse status


To send a module:
Python
def concat(a, b):
return a+b

import runhouse as rh
rh.function(concat).to(rh.here)


To try out your service:

curl -X "GET" 'http://localhost:32300/concat/call?a=run&b=house'

>>> {"data":"\"runhouse\"","error":null,"traceback":null,"output_type":"result_serialized","serialization":"json"}


This is also particularly useful for debugging. You can ssh onto your cluster, start a Python shell, and run methods like `rh.here.call("my_module", "my_method")` to test or analyze your deployed module's behavior or contents quickly.

Replace nginx with Caddy
Use [Caddy](https://caddyserver.com/) as a reverse proxy for the Runhouse server launched on clusters, as well as automatically generating and auto-renewing self-signed certificates, making it easy to secure your cluster with HTTPS right out of the box.


Improvements
* Improved logging to reduce log clutter, and differentiate local and cluster(436, 475)
* Support packages using setup.cfg (456)
* Runhouse status updates (462, 469)

Build
* Remove Sky dependency for SSH command runner

Bug Fixes
* Fix name to properly be updated in cluster when saved (451, 477)
* Fix bug in sagemaker cluster factory (459)
* Fix Cluster.from_name to properly load existing config in Den (468)
* Fix CLI runhouse status for on-demand cluster (478)

BC-Breaking
* `reqs` and `setup_cmds` removed from function .to (373)
* Generator module now returns generator rather than streamed results (373)

Other
* Refactor and new methods for obj store (373)
* Replace nginx with Caddy (406)
* Set unique SSH control path

0.0.17

0.0.16

This release largely consists of updates to Runhouse infrastructure and build, with the addition of two new runhouse CLI commands (stop and status), basic ASGI support, and some bug fixes.

Note: We’ve removed some dependencies to better support local-only use cases of Runhouse. To use Runhouse with a cluster, please install with `pip install “runhouse[sky]”`, and to use Runhouse data structures like tables, please install with `pip install “runhouse[data]”`

Improvements
* Change Module's endpoint from property to function (367)
* Change ray to only be initialized in runhouse start or HTTPServer() (369)
* Ray start to connect to existing cluster (405)

New features
* Introduce Asgi module and support calling route functions directly (370)
* Add runhouse stop command/function (392)
* Add deleting env servlet functionality (417)
* Add runhouse status command (416)

Build
* Relax hard dependency on sky (414)
* Localize data dependency imports (418)

Bug Fixes
* Account for workdir or compute in env factory (354)
* `rh.here` working (338)
* Fix to function's .notebook() functionality (362)
* Only set rns_address upon save (434)

BC-Breaking
* Replace num_entries with limit for resource history API (399)

0.0.15

Highlights
* Mapper, a built-in Runhouse module for mapping functions over a list of inputs across compute (327)
* Python3.11 support (279)

rh.Mapper Module
The [Mapper](https://www.run.house/docs/stable/en/api/python/mapper) expands Runhouse functions and Module methods to handle mapping, replicating, and load balancing. A Mapper object is constructed simply by passing in a function or module and module method, along with the number of replicas to use, and optionally your own user-specified replicas. It takes the function and creates replicas of it and its envs, and round-robin calls the replicas to run function calls in parallel.


def local_sum(arg1, arg2, arg3):
return arg1 + arg2 + arg3

remote_fn = rh.function(local_sum).to(my_cluster)
mapper = rh.mapper(remote_fn, num_replicas=2)
mapper.map([1, 2], [1, 4], [2, 3])
output: [4,9]


Improvements
Better multinode cluster support
* Sync runhouse to all nodes instead of just the head node (278)
* Start Ray on both head and worker nodes (305)
* Add back support for cluster IPs (346)
Introduce cluster servlet for handling global cluster object store (308)

Build
* Python3.11 support (279)
* Update AWS dependencies (290)

Bug Fixes
* Fix streaming with HTTP/HTTPS/Nginx (261)

BC-Breaking
* Replace `instance_count` with `num_instances` for cluster class (269)

Docs
* Updated quick start and compute tutorials (310, 347)

0.0.14

Highlights
* Secrets Revamp (135)
* Facilitate saving, sending, and sharing of Secrets by treating Secrets as a Runhouse resource
* (Alpha) AWS Lambda Functions support (139, 240, 244)
* Introduce AWS Lambda support for Runhouse functions

Secrets Revamp
The `rh.Secrets` class is being deprecated in favor of converting secrets to a Runhouse resource type. As with other resources, the new Secret class supports saving, reloading, and sending secrets across clusters.

There are various builtin secret provider types, for keeping track of compute providers (aws, azure, gcp..), api key based providers (openai, anthropic, …), and ssh key pairs.


non-provider secret, in-memory
my_secret = rh.secret(name=”my_secret”, values={“key1”: “val1”, “key2”: “val2”})
my_secret.save()
reloaded_secret = rh.secret(“my_secret”)

provider secret, in-memory or loaded from default location
aws_secret = rh.provider_secret(“aws”) loads from ~/.aws/credentials or from env vars
openai_secret = rh.provider_secret(“openai”, values={“api_key”: “my_openai_key”}) explicitly provided values

There are also various APIs for syncing secrets across your clusters and environments:

aws_secret.to(cluster, env)
cluster.sync_secrets([“aws”, “gcp”], env)

env = rh.env(secrets=[“aws”, “openai”]
fn.to(cluster, env)


Please refer to the [API tutorial](https://www.run.house/docs/stable/en/tutorials/api/secrets) for a more in-depth walkthrough of using Secrets, or the [documentation](https://www.run.house/docs/stable/en/api/python/secrets) for specific APIs and a full list of builtin providers.

(Alpha) Lambda Functions (AWS serverless)
Runhouse is extending functions to [Amazon Web Services (AWS) Lambda Compute](https://aws.amazon.com/lambda/). These functions are deployed directly on AWS serverless compute, with Lambda’s infra and servers handled under the hood, making the Lambda onboarding process more smooth and removing the need to translate code through Lambda-specific APIs.

Note: Lambda Functions are in Alpha and the APIs are subject to change. A more stable release along with examples will be published soon. In the meantime, you can find documentation [here](https://www.run.house/docs/main/en/api/python/function#lambda-function-class).

New Additions
* Add visibility to resource config, and enable public resources (222)
* API for revoking access to shared secrets (235)

Bug Fixes
* Proper tunnel caching (191, 194): tunnels were not previously being cached correctly, and dead connections not accounted for
* Sagemaker cluster launch fix (206): remove runhouse as a dependency from the launch script, as it has not yet been installed on the cluster
* Fix bug with loading runhouse files/folders through SSH fsspec (225): custom SSH port was not being set in fsspec filesystem of runhouse files/folders
* Correctly launch multiple node clusters according to num_instances (229): previously was not properly launching multiple nodes

Deprecations + BC-Breaking
* `access_type` deprecated and renamed to `access_level` for resource and sharing (223, 224, 231)
* `rh.Secrets` class deprecated in favor of convert Secrets to a resource type ((135). Some old APIs are removed, and others are deprecated. Please refer to [docs](https://www.run.house/docs/stable/en/api/python/secrets) and [tutorial](https://www.run.house/docs/stable/en/tutorials/api/secrets) for the new secrets flow.

Other
* README updates (187)
* Various docs updates

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.