Runhouseは、研究と生産全体の迅速で費用対効果の高い機械学習開発を可能にします。これにより、Python機能とクラスを独自のクラウドコンピューティングインフラストラクチャのいずれかに派遣し、ローカルであるかのように熱心に呼び出すことができます。これはつまり:
スケーリング、フォールトトレランス、マルチステップワークフローなどの複雑なロジックと同様に、クラスター、領域、または雲を横切るのは些細なことです。
Runhouse APIは簡単です。このように、インフラを計算する上で、モジュール(関数とクラス)を環境(ワーカープロセス)に送信します。
import runhouse as rh
from diffusers import StableDiffusionPipeline
def sd_generate ( prompt , ** inference_kwargs ):
model = StableDiffusionPipeline . from_pretrained ( "stabilityai/stable-diffusion-2-base" ). to ( "cuda" )
return model ( prompt , ** inference_kwargs ). images
if __name__ == "__main__" :
img = rh . Image ( "sd_image" ). install_packages ([ "torch" , "transformers" , "diffusers" ])
gpu = rh . cluster ( name = "rh-a10x" , instance_type = "A10G:1" , provider = "aws" , image = img ). up_if_not ()
# Deploy the function and environment (syncing over local code changes and installing dependencies)
remote_sd_generate = rh . function ( sd_generate ). to ( gpu )
# This call is actually an HTTP request to the app running on the remote server
imgs = remote_sd_generate ( "A hot dog made out of matcha." )
imgs [ 0 ]. show ()
# You can also call it over HTTP directly, e.g. from other machines or languages
print ( remote_sd_generate . endpoint ())上記のシンプルな構造を使用すると、構築、呼び出し、共有できます。
このリポジトリの補完的な製品であるRunhouse Denと、ユニークな観察可能性と共有機能のロックを解除できます。
関数またはクラスをリモートコンピューティングに送信した後、Runhouseを使用すると、サービスとして持続して共有でき、それ以外の場合は冗長なAIアクティビティをチームまたは会社の共通のモジュラーコンポーネントに変えます。
どこからでもログインして、リソースを保存、共有、ロードし、ガラスの1つのペインでの使用、ログ、および計算の使用を遵守します。
runhouse loginまたはPythonから:
import runhouse as rh
rh . login ()上記の例を拡張して、DENを介してアプリを共有およびロードします。
remote_sd_generate . share ([ "[email protected]" ])
# The service stub can now be reloaded from anywhere, always at yours and your collaborators' fingertips
# Notice this code doesn't need to change if you update, move, or scale the service
remote_sd_generate = rh . function ( "/your_username/sd_generate" )
imgs = remote_sd_generate ( "More matcha hotdogs." )
imgs [ 0 ]. show ()お気に入りのコンピューティアが表示されない場合は、(run.houseの名)にアクセスしてください。
?開始:インストール、セットアップ、クイックウォークスルー。
ドキュメント:詳細なAPI参照、基本的なAPIの例とウォークスルー、エンドツーエンドのチュートリアル、高レベルのアーキテクチャの概要。
?ブログ:Runhouseの機能、ユースケース、およびAI Infraの未来へのディープダイブ。
? Discord :私たちのコミュニティに参加して、質問をし、アイデアを共有し、助けを得ます。
? Twitter :更新と発表については、フォローしてください。
Discordで私たちにメッセージを送るか、メール(run.houseの名)にメールするか、問題を作成してください。
貢献を歓迎します!寄付をチェックしてください。