Commit c7cbb75
Sophiex/dev/ema fix inference (ecmwf#1094)
* Save current state
* Save current state
* Barebone FSDP2 prototype TODO save checkpoints
* First version of saving model
* Fix save_model
* Log everything and log to files
* Remove redundant path creation
* Allow for both slurm and torchrun + fewer log files
* Cleaning up init_ddp
* Ruff
* Attempt to avoid duplicate logging
* FSDP2 with mixed precision policy
* Ruff
* Clean up and logging
* Try to get loggers to behave as we want
* Makes ruff unhappy but works
* Fixed ruff issue
* Fixed problems with multi-node training.
* Fix for interactive/non-DDP runs
* No idea why, but this seems to work so far
Committing simply so it is saved, obviously needs cleanup
* Still works! So which is it memory or the grad scaler?
* Also still works, I now strongly suspect the amp.gradscaler
* This still works, I have no clue anymore why but whatever it works
now....
* Enable loading model from absolute paths
* Enable loading for 1 GPU only
* Fix 1 GPU train continue
* Appease ruff
* Fix saving the model more regularly and perf logging
* Fixed problem when training with 2 nodes.
* Fix data loader seed
* Appease ruff
* Shouldn't overwrite with_fsdp like this
* Potential fix for FSDP2 issue
with different ranks using different model parts
* Fix loss scaling and logging of dummy data loss
* Clean up
* Appease ruff
* Start implementing EMA, works for 1 GPU
* Make EMA model multi-gpu compatible
* Fix linting issues
* Address comments on PR
* Enforce the ema model to strictly be the same as model
Note this likely needs to be changed for student-teacher training
* Rename variable
* Fix inference
* One more thing
* Fixed linting
* Fix problem with checkpoint saving when validate_with_ema is false or not specified
---------
Co-authored-by: Christian Lessig <christian.lessig@ecmwf.int>1 parent c17ad41 commit c7cbb75
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
646 | 653 | | |
647 | 654 | | |
648 | 655 | | |
| |||
0 commit comments