We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad5347 commit 0192628Copy full SHA for 0192628
README.md
@@ -142,7 +142,7 @@ End-to-end examples for using distributed checkpoints with S3 Connector for PyTo
142
can be found in the [examples/dcp](examples/dcp) directory.
143
144
```py
145
-from s3torchconnector import S3StorageWriter, S3StorageReader
+from s3torchconnector.dcp import S3StorageWriter, S3StorageReader
146
147
import torchvision
148
import torch.distributed.checkpoint as DCP
@@ -156,7 +156,7 @@ model = torchvision.models.resnet18()
156
# Save distributed checkpoint to S3
157
s3_storage_writer = S3StorageWriter(region=REGION, path=CHECKPOINT_URI)
158
DCP.save(
159
- state_dict=model.state_dict,
+ state_dict=model.state_dict(),
160
storage_writer=s3_storage_writer,
161
)
162
0 commit comments