Skip to content

Commit 4933653

Browse files
authored
Merge pull request #684 from PolicyEngine/fix/h5-pipeline-improvements
Scale H5 pipeline to 50 workers at 1 CPU each
2 parents fb96f57 + 3a35d02 commit 4933653

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/pipeline.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
type: string
2020
num_workers:
2121
description: "Number of parallel H5 workers"
22-
default: "8"
22+
default: "50"
2323
type: string
2424
skip_national:
2525
description: "Skip national calibration/H5"
@@ -49,7 +49,7 @@ jobs:
4949
GPU="${{ inputs.gpu || 'T4' }}"
5050
EPOCHS="${{ inputs.epochs || '1000' }}"
5151
NATIONAL_EPOCHS="${{ inputs.national_epochs || '4000' }}"
52-
NUM_WORKERS="${{ inputs.num_workers || '8' }}"
52+
NUM_WORKERS="${{ inputs.num_workers || '50' }}"
5353
SKIP_NATIONAL="${{ inputs.skip_national || 'false' }}"
5454
5555
python -c "

modal_app/local_area.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,9 @@ def run_phase(
293293
"/pipeline": pipeline_volume,
294294
},
295295
memory=16384,
296-
cpu=4.0,
296+
cpu=1.0,
297297
timeout=28800,
298+
max_containers=50,
298299
nonpreemptible=True,
299300
)
300301
def build_areas_worker(
@@ -618,7 +619,7 @@ def promote_publish(branch: str = "main", version: str = "", run_id: str = "") -
618619
)
619620
def coordinate_publish(
620621
branch: str = "main",
621-
num_workers: int = 8,
622+
num_workers: int = 50,
622623
skip_upload: bool = False,
623624
n_clones: int = 430,
624625
validate: bool = True,
@@ -877,7 +878,7 @@ def coordinate_publish(
877878
@app.local_entrypoint()
878879
def main(
879880
branch: str = "main",
880-
num_workers: int = 8,
881+
num_workers: int = 50,
881882
skip_upload: bool = False,
882883
n_clones: int = 430,
883884
run_id: str = "",

modal_app/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def run_pipeline(
606606
epochs: int = 1000,
607607
national_gpu: str = "T4",
608608
national_epochs: int = 4000,
609-
num_workers: int = 8,
609+
num_workers: int = 50,
610610
n_clones: int = 430,
611611
skip_national: bool = False,
612612
resume_run_id: str = None,
@@ -1268,7 +1268,7 @@ def main(
12681268
epochs: int = 1000,
12691269
national_gpu: str = "T4",
12701270
national_epochs: int = 4000,
1271-
num_workers: int = 8,
1271+
num_workers: int = 50,
12721272
n_clones: int = 430,
12731273
skip_national: bool = False,
12741274
clear_checkpoints: bool = False,

0 commit comments

Comments
 (0)