Skip to content

Commit

Permalink
revert futures version
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjiang2378 committed Feb 7, 2025
1 parent 58d0e6e commit 1cf3f4b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 42 deletions.
51 changes: 28 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions hydro_deploy/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
42 changes: 25 additions & 17 deletions hydro_deploy/hydro_cli_examples/simple_dedalus.hydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down

0 comments on commit 1cf3f4b

Please sign in to comment.