Commit 91869ec
authored
Reduce moco notebook training iterations in CI via FAST_CI_MODE (#1542)
## Summary
Fixes
[BIO-403](https://linear.app/nvidia/issue/BIO-403/investigate-flaky-tests-and-timeout-errors-in-bionemo-moco-notebook):
Investigate flaky tests and timeout errors in bionemo-moco notebook.
The `discrete_data_interpolant_tutorial.ipynb` notebook has 3 training
loops that hard-code `range(50000)` iterations. When executed in CI via
`nbval`, these loops cause timeouts.
## Changes
1. Added a configuration cell that detects the `FAST_CI_MODE`
environment variable (already set by `unit-tests-framework.yml` when
running notebook tests)
2. Sets `NUM_TRAINING_STEPS = 500` when in CI mode, `50000` otherwise
3. Replaced all 3 `range(50000)` occurrences with
`range(NUM_TRAINING_STEPS)` in the DFM, D3PM, and MDLM training loops
This follows the existing pattern used in
`bionemo-recipes/recipes/evo2_megatron/examples/` notebooks.
## Testing
- The notebook behavior is unchanged when run outside CI (`FAST_CI_MODE`
not set)
- When `FAST_CI_MODE=true` (as in framework CI), iterations drop from
50,000 to 500, preventing timeouts
Signed-off-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com>
Co-authored-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com>1 parent 0883c09 commit 91869ec
1 file changed
Lines changed: 16 additions & 3 deletions
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| |||
144 | 157 | | |
145 | 158 | | |
146 | 159 | | |
147 | | - | |
| 160 | + | |
148 | 161 | | |
149 | 162 | | |
150 | 163 | | |
| |||
659 | 672 | | |
660 | 673 | | |
661 | 674 | | |
662 | | - | |
| 675 | + | |
663 | 676 | | |
664 | 677 | | |
665 | 678 | | |
| |||
892 | 905 | | |
893 | 906 | | |
894 | 907 | | |
895 | | - | |
| 908 | + | |
896 | 909 | | |
897 | 910 | | |
898 | 911 | | |
| |||
0 commit comments