def test_load(tmpdir, ray_start_2_cpus, num_workers): """Tests if model checkpoint can be loaded.""" model = BoringModel() plugin = RayPlugin(num_workers=num_workers, use_gpu=False) trainer = get_trainer(tmpdir, plugins=[plugin]) load_test(trainer, model)
def test_load_gpu(tmpdir, ray_start_2_gpus, seed, num_slots): """Tests if model checkpoint can be loaded.""" model = BoringModel() plugin = HorovodRayPlugin(num_slots=num_slots, use_gpu=True) trainer = get_trainer(tmpdir, plugins=[plugin], use_gpu=True) load_test(trainer, model)
def test_load(tmpdir, ray_start_2_cpus, num_workers): """Tests if model checkpoint can be loaded.""" model = BoringModel() accelerator = RayAccelerator(num_workers=num_workers, use_gpu=False) trainer = get_trainer(tmpdir, accelerator=accelerator) load_test(trainer, model)
def test_load_gpu(tmpdir, ray_start_2_gpus, seed, num_slots): """Tests if model checkpoint can be loaded.""" model = BoringModel() accelerator = HorovodRayAccelerator(num_slots=num_slots, use_gpu=True) trainer = get_trainer(tmpdir, accelerator=accelerator, use_gpu=True) load_test(trainer, model)