mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
RC & Docs/changelog (#1776)
* missing * RC * tol * Apply suggestions from code review Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> * test Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
This commit is contained in:
co-authored by
Adrian Wälchli
parent
d120f97896
commit
9d2df24d6b
@@ -45,15 +45,16 @@ def run_test_from_config(trainer_options):
|
||||
ckpt_path = trainer_options['default_root_dir']
|
||||
trainer_options.update(checkpoint_callback=ModelCheckpoint(ckpt_path))
|
||||
|
||||
model = EvalModelTemplate(EvalModelTemplate.get_default_hparams())
|
||||
model = EvalModelTemplate()
|
||||
run_model_test(trainer_options, model, on_gpu=args.on_gpu, version=0, with_hpc=False)
|
||||
|
||||
# Horovod should be initialized following training. If not, this will raise an exception.
|
||||
assert hvd.size() == 2
|
||||
|
||||
if args.on_gpu:
|
||||
trainer = Trainer(gpus=1, distributed_backend='horovod', max_epochs=1)
|
||||
# Test the root_gpu property
|
||||
assert Trainer(gpus=1, distributed_backend='horovod', max_epochs=1).root_gpu == hvd.local_rank()
|
||||
assert trainer.root_gpu == hvd.local_rank()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user