convitom commited on
Commit ·
e114eb3
1
Parent(s): 7255a88
- configs/train_config.yaml +1 -1
- scripts/vertex_job.yaml +3 -1
- training/train.py +11 -4
configs/train_config.yaml
CHANGED
|
@@ -34,7 +34,7 @@ data:
|
|
| 34 |
# generated findings is not implemented yet.
|
| 35 |
# When switching modes, the on-disk instruct JSON must be rebuilt (delete it
|
| 36 |
# to trigger auto_build, or rerun iu_xray_builder.py with --report_mode).
|
| 37 |
-
report_mode: "
|
| 38 |
|
| 39 |
# How multiple images per study are handled. A study (one XML / one MIMIC
|
| 40 |
# report) often has multiple views (frontal PA/AP + lateral). Three options:
|
|
|
|
| 34 |
# generated findings is not implemented yet.
|
| 35 |
# When switching modes, the on-disk instruct JSON must be rebuilt (delete it
|
| 36 |
# to trigger auto_build, or rerun iu_xray_builder.py with --report_mode).
|
| 37 |
+
report_mode: "split_cascade"
|
| 38 |
|
| 39 |
# How multiple images per study are handled. A study (one XML / one MIMIC
|
| 40 |
# report) often has multiple views (frontal PA/AP + lateral). Three options:
|
scripts/vertex_job.yaml
CHANGED
|
@@ -14,7 +14,9 @@
|
|
| 14 |
|
| 15 |
workerPoolSpecs:
|
| 16 |
- machineSpec:
|
| 17 |
-
machineType: g2-standard-
|
|
|
|
|
|
|
| 18 |
acceleratorType: NVIDIA_L4
|
| 19 |
acceleratorCount: 1
|
| 20 |
replicaCount: 1
|
|
|
|
| 14 |
|
| 15 |
workerPoolSpecs:
|
| 16 |
- machineSpec:
|
| 17 |
+
machineType: g2-standard-12 # 12 vCPU, 48GB RAM, 1×L4 24GB
|
| 18 |
+
# ↑ Bumped from g2-standard-8 (32GB) — OOM with ITC batch=192 + persistent
|
| 19 |
+
# dataloader workers. 48GB has comfortable headroom.
|
| 20 |
acceleratorType: NVIDIA_L4
|
| 21 |
acceleratorCount: 1
|
| 22 |
replicaCount: 1
|
training/train.py
CHANGED
|
@@ -394,10 +394,17 @@ def get_trainer(
|
|
| 394 |
data_collator = collator,
|
| 395 |
)
|
| 396 |
trainer.remove_callback(PrinterCallback)
|
| 397 |
-
#
|
| 398 |
-
#
|
| 399 |
-
|
| 400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
return trainer
|
| 402 |
|
| 403 |
|
|
|
|
| 394 |
data_collator = collator,
|
| 395 |
)
|
| 396 |
trainer.remove_callback(PrinterCallback)
|
| 397 |
+
# ── Eval progress bar policy ─────────────────────────────────────────
|
| 398 |
+
# Default: KEEP the eval per-batch tqdm bar so users can see eval
|
| 399 |
+
# actually running on long val sets (22k MIMIC-CXR samples → ~25-45 min
|
| 400 |
+
# of silent eval is hard to distinguish from a hang).
|
| 401 |
+
# Set DISABLE_EVAL_TQDM=1 to restore the suppressor (originally added
|
| 402 |
+
# because Colab's text renderer spams \r-updates as new lines — only
|
| 403 |
+
# matters in a Colab `!python -m ...` subprocess; native notebooks,
|
| 404 |
+
# Lightning, and Vertex handle \r fine).
|
| 405 |
+
if os.environ.get("DISABLE_EVAL_TQDM", "0") == "1":
|
| 406 |
+
trainer.remove_callback(ProgressCallback)
|
| 407 |
+
trainer.add_callback(_NoEvalTqdmCallback())
|
| 408 |
return trainer
|
| 409 |
|
| 410 |
|