Skip to content

Commit 3d7fefd

Browse files
committed
Default publication fits to A100
1 parent a9a1e2a commit 3d7fefd

5 files changed

Lines changed: 30 additions & 10 deletions

File tree

.github/workflows/pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
inputs:
66
gpu:
77
description: "GPU type for regional calibration"
8-
default: "T4"
8+
default: "A100-40GB"
99
type: string
1010
national_gpu:
1111
description: "GPU type for national calibration"
12-
default: "T4"
12+
default: "A100-40GB"
1313
type: string
1414
epochs:
1515
description: "Epochs for regional calibration"
@@ -116,8 +116,8 @@ jobs:
116116
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
117117
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
118118
PIPELINE_BRANCH: main
119-
GPU: ${{ inputs.gpu || 'T4' }}
120-
NATIONAL_GPU: ${{ inputs.national_gpu || 'T4' }}
119+
GPU: ${{ inputs.gpu || 'A100-40GB' }}
120+
NATIONAL_GPU: ${{ inputs.national_gpu || 'A100-40GB' }}
121121
EPOCHS: ${{ inputs.epochs || '1000' }}
122122
NATIONAL_EPOCHS: ${{ inputs.national_epochs || '1000' }}
123123
NUM_WORKERS: ${{ inputs.num_workers || '50' }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ SOI_TARGET_YEAR ?= 2023
55

66
YEAR ?= 2024
77

8-
GPU ?= T4
8+
GPU ?= A100-40GB
99
EPOCHS ?= 1000
10-
NATIONAL_GPU ?= T4
10+
NATIONAL_GPU ?= A100-40GB
1111
NATIONAL_EPOCHS ?= 1000
1212
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
1313
NUM_WORKERS ?= 8
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Default publication calibration fits to A100-40GB GPUs to avoid T4 memory failures on the full target matrix.

modal_app/pipeline.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,9 +904,9 @@ def _new_run_metadata(
904904
)
905905
def run_pipeline(
906906
branch: str = "main",
907-
gpu: str = "T4",
907+
gpu: str = "A100-40GB",
908908
epochs: int = 1000,
909-
national_gpu: str = "T4",
909+
national_gpu: str = "A100-40GB",
910910
national_epochs: int = 1000,
911911
num_workers: int = 50,
912912
n_clones: int = 430,
@@ -2097,9 +2097,9 @@ def main(
20972097
branch: str = "main",
20982098
run_id: str = None,
20992099
resume_run_id: str = None,
2100-
gpu: str = "T4",
2100+
gpu: str = "A100-40GB",
21012101
epochs: int = 1000,
2102-
national_gpu: str = "T4",
2102+
national_gpu: str = "A100-40GB",
21032103
national_epochs: int = 1000,
21042104
num_workers: int = 50,
21052105
n_clones: int = 430,

tests/unit/test_pipeline_source_contracts.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@ def _name(node: ast.AST) -> str | None:
2020
return node.id if isinstance(node, ast.Name) else None
2121

2222

23+
def test_run_pipeline_defaults_to_a100_for_full_target_matrix() -> None:
24+
tree = ast.parse(PIPELINE_SOURCE.read_text())
25+
run_pipeline = _function_def(tree, "run_pipeline")
26+
defaults = dict(
27+
zip(
28+
[
29+
arg.arg
30+
for arg in run_pipeline.args.args[-len(run_pipeline.args.defaults) :]
31+
],
32+
run_pipeline.args.defaults,
33+
)
34+
)
35+
36+
assert isinstance(defaults["gpu"], ast.Constant)
37+
assert defaults["gpu"].value == "A100-40GB"
38+
assert isinstance(defaults["national_gpu"], ast.Constant)
39+
assert defaults["national_gpu"].value == "A100-40GB"
40+
41+
2342
def test_promote_run_uses_single_full_release_promotion() -> None:
2443
tree = ast.parse(PIPELINE_SOURCE.read_text())
2544
promote_run = _function_def(tree, "promote_run")

0 commit comments

Comments
 (0)