3a0d088517
Flip default value for mypy disallow_untyped_defs [5/11] ( #127842 )
...
See #127836 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127842
Approved by: https://github.com/oulgen
2024-06-08 18:49:18 +00:00
644bc69530
[DCP] Allow users to save and load without creating storage reader and writer ( #117772 )
...
Right now DCP API requires users to create StorageWriter and StorageReader for every API call. This PR allows users to only pass the checkpointer_id (a path) and use it to read/write a checkpoint without creating a StorageReader and Writer.
Differential Revision: [D52740556](https://our.internmc.facebook.com/intern/diff/D52740556/ )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/117772
Approved by: https://github.com/wz337
ghstack dependencies: #116248
2024-01-26 09:08:35 +00:00
b342286646
adds async save, makes checkpointer private ( #116293 )
...
Adds Async Save and also makes `Checkpointer` classes private.
The original PR was here: https://github.com/pytorch/pytorch/pull/115864
Pull Request resolved: https://github.com/pytorch/pytorch/pull/116293
Approved by: https://github.com/fegin
2023-12-22 05:22:39 +00:00
5432088098
Adds Checkpointer Wrapper for DCP [3/N] ( #114603 )
...
Adds a useful high level wrapper for calling `dist.save/load` with the correct storage readers and writers.
Instead of doing:
```
DCP.save(
state_dict={...},
storage_writer=StorageWriter(...)
)
DCP.load(
state_dict={...},
storage_reader=StorageReader(...)
)
```
We can now do:
```
checkpointer = Checkpointer(...)
checkpointer.save(state_dict={...})
checkpointer.load(state_dict={...})
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114603
Approved by: https://github.com/fegin , https://github.com/wz337
2023-12-08 01:03:21 +00:00
f073dcd4f7
Stateful Checkpointing for Distributed [1/N] ( #113867 )
...
First pass at adding a save/load API, as well as definition of Stateful objects.
Amongst a couple todo's, we still need to explore adding an `all_gather` & potentially a `barrier` while iterating through state keys.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/113867
Approved by: https://github.com/fegin , https://github.com/wz337
2023-12-01 19:21:03 +00:00