mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Merge pull request #1645 from danpcampbell/bugfix/1637_slurm-fix
Only call load_spawn_weights if COLAB_GPU or KAGGLE_URL_BASE
This commit is contained in:
@@ -750,8 +750,9 @@ class Trainer(
|
||||
# train
|
||||
mp.spawn(self.ddp_train, nprocs=self.num_processes, args=(model,))
|
||||
# load weights if not interrupted
|
||||
self.load_spawn_weights(model)
|
||||
self.model = model
|
||||
if os.getenv('COLAB_GPU') or os.getenv('KAGGLE_URL_BASE'):
|
||||
self.load_spawn_weights(model)
|
||||
self.model = model
|
||||
|
||||
# 1 gpu or dp option triggers training using DP module
|
||||
# easier to avoid NCCL issues
|
||||
|
||||
Reference in New Issue
Block a user