From 1cf3f4b4ea0bd8da007a4b7481fb270732443567 Mon Sep 17 00:00:00 2001 From: Nick Jiang Date: Thu, 6 Feb 2025 17:05:04 -0800 Subject: [PATCH] revert futures version --- Cargo.lock | 51 ++++++++++--------- hydro_deploy/core/Cargo.toml | 3 +- .../simple_dedalus.hydro.py | 42 ++++++++------- 3 files changed, 54 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f8c5ce2d48a..c7940a41106d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1536,6 +1536,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "hermit-abi" version = "0.4.0" @@ -1682,7 +1688,6 @@ dependencies = [ "dunce", "dyn-clone", "futures", - "futures-core", "hydroflow_deploy_integration", "indicatif", "inferno", @@ -2168,7 +2173,7 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.59.0", ] @@ -2613,17 +2618,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mio" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", -] - [[package]] name = "multer" version = "2.1.0" @@ -2728,7 +2722,7 @@ dependencies = [ "kqueue", "libc", "log", - "mio 0.8.11", + "mio", "walkdir", "windows-sys 0.48.0", ] @@ -2769,6 +2763,16 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -2820,9 +2824,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "oorandom" @@ -3070,7 +3074,7 @@ checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix", "tracing", @@ -4384,27 +4388,28 @@ dependencies = [ [[package]] name = "tokio" -version = "1.43.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.3", + "mio", + "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", diff --git a/hydro_deploy/core/Cargo.toml b/hydro_deploy/core/Cargo.toml index 749efdbe4ffd..529b311244ae 100644 --- a/hydro_deploy/core/Cargo.toml +++ b/hydro_deploy/core/Cargo.toml @@ -22,8 +22,7 @@ bytes = "1.1.0" cargo_metadata = "0.18.0" dunce = "1.0.0" dyn-clone = "1.0.0" -futures = "0.3.26" -futures-core = "0.3.26" +futures = "0.3.0" hydroflow_deploy_integration = { path = "../hydroflow_deploy_integration", version = "^0.11.0" } indicatif = "0.17.0" inferno = "0.11.0" diff --git a/hydro_deploy/hydro_cli_examples/simple_dedalus.hydro.py b/hydro_deploy/hydro_cli_examples/simple_dedalus.hydro.py index 1ed7e73c19b2..35a0157fe041 100644 --- a/hydro_deploy/hydro_cli_examples/simple_dedalus.hydro.py +++ b/hydro_deploy/hydro_cli_examples/simple_dedalus.hydro.py @@ -2,10 +2,31 @@ import json from pathlib import Path from aiostream import stream +import time + +def setup_machine(argument, deployment, gcp_vpc, localhost_machine): + if argument == "gcp": + machine = deployment.GcpComputeEngineHost( + project="autocompartmentalization", + machine_type="e2-micro", + image="debian-cloud/debian-11", + region="us-west1-a", + network=gcp_vpc + ) + elif argument == "azure": + machine = deployment.AzureHost( + project="hydro-example" + str(int(time.time())), + os_type="linux", + machine_size="Standard_B1s", + region="East US", + ) + elif argument == "kubernetes": + machine = deployment.PodHost() + else: + machine = localhost_machine + return machine async def main(args): - machine_1_gcp = args[0] == "gcp" - machine_2_gcp = args[1] == "gcp" deployment = hydro.Deployment() localhost_machine = deployment.Localhost() @@ -14,21 +35,8 @@ async def main(args): project="autocompartmentalization", ) - machine1 = deployment.GcpComputeEngineHost( - project="autocompartmentalization", - machine_type="e2-micro", - image="debian-cloud/debian-11", - region="us-west1-a", - network=gcp_vpc - ) if machine_1_gcp else localhost_machine - - machine2 = deployment.GcpComputeEngineHost( - project="autocompartmentalization", - machine_type="e2-micro", - image="debian-cloud/debian-11", - region="us-west1-a", - network=gcp_vpc - ) if machine_2_gcp else localhost_machine + machine1 = setup_machine(args[0], deployment, gcp_vpc, localhost_machine) + machine2 = setup_machine(args[1], deployment, gcp_vpc, localhost_machine) sender_count = 2 senders = [deployment.HydroflowCrate(