mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 03:57:19 +00:00
Check cuda availability before calling (#4174)
Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
This commit is contained in:
parent
18e7b8399b
commit
7aae4293d7
@ -505,7 +505,7 @@ class Trainer:
|
||||
"scheduler_state": self.lr_schedule.state_dict(),
|
||||
"numpy_rng_state": numpy.random.get_state(),
|
||||
"rng_state": torch.get_rng_state(),
|
||||
"cuda_rng_state": torch.cuda.get_rng_state(),
|
||||
"cuda_rng_state": torch.cuda.get_rng_state() if torch.cuda.is_available() else None,
|
||||
},
|
||||
checkpoint_path / "trainer",
|
||||
pickle_module=dill,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user