Skip to content

Commit 0192628

Browse files
authored
Update DCP sample in README.md (#303)
1 parent 0ad5347 commit 0192628

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ End-to-end examples for using distributed checkpoints with S3 Connector for PyTo
142142
can be found in the [examples/dcp](examples/dcp) directory.
143143

144144
```py
145-
from s3torchconnector import S3StorageWriter, S3StorageReader
145+
from s3torchconnector.dcp import S3StorageWriter, S3StorageReader
146146

147147
import torchvision
148148
import torch.distributed.checkpoint as DCP
@@ -156,7 +156,7 @@ model = torchvision.models.resnet18()
156156
# Save distributed checkpoint to S3
157157
s3_storage_writer = S3StorageWriter(region=REGION, path=CHECKPOINT_URI)
158158
DCP.save(
159-
state_dict=model.state_dict,
159+
state_dict=model.state_dict(),
160160
storage_writer=s3_storage_writer,
161161
)
162162

0 commit comments

Comments
 (0)