Skip to content

Commit c5a44a2

Browse files
IsaevIlyaIlya Isaev
andcommitted
Feature/dcp fix wheels (#264)
Rename `uri` parameter back to `path` and limit number of workers to the same amount as in distributed training --------- Co-authored-by: Ilya Isaev <[email protected]>
1 parent 547d30e commit c5a44a2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

s3torchconnector/src/s3torchconnector/dcp/s3_file_system.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,24 +196,24 @@ class S3StorageWriter(FileSystemWriter):
196196
def __init__(
197197
self,
198198
region: str,
199-
uri: str,
199+
path: str,
200200
**kwargs,
201201
) -> None:
202202
"""
203203
Initialize an S3 writer for distributed checkpointing.
204204
205205
Args:
206206
region (str): The AWS region for S3.
207-
uri (str): The S3 URI to write checkpoints to.
207+
path (str): The S3 URI to write checkpoints to.
208208
kwargs (dict): Keyword arguments to pass to the parent :class:`FileSystemWriter`.
209209
"""
210210
super().__init__(
211-
path=uri,
211+
path=path,
212212
sync_files=False, # FIXME: setting this to True makes the run to fail (L#333: `os.fsync(stream.fileno())`)
213213
**kwargs,
214214
)
215215
self.fs = S3FileSystem(region) # type: ignore
216-
self.path = self.fs.init_path(uri)
216+
self.path = self.fs.init_path(path)
217217

218218
@classmethod
219219
def validate_checkpoint_id(cls, checkpoint_id: Union[str, os.PathLike]) -> bool:

s3torchconnector/tst/e2e/dcp/test_e2e_s3_file_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_dcp_when_multi_process(
157157
checkpoint_directory, tensor_dimensions, thread_count, port_offset
158158
):
159159
multi_process_dcp_save_load(
160-
6, thread_count, checkpoint_directory, tensor_dimensions, port_offset
160+
3, thread_count, checkpoint_directory, tensor_dimensions, port_offset
161161
)
162162

163163

0 commit comments

Comments
 (0)