Skip to content

Commit 29113f5

Browse files
thomasthomas
thomas
authored and
thomas
committed
update
1 parent d61f6fe commit 29113f5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lightning/data/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class ImagenetStreamingDataset(StreamingDataset):
311311

312312
def __getitem__(self, index):
313313
image = super().__getitem__(index)
314-
return T.resize(image, (224, 224))
314+
return F.resize(image, (224, 224))
315315

316316
dataset = ImagenetStreamingDataset(...)
317317
dataloader = StreamingDataLoader(dataset, batch_size=4)

src/lightning/data/processing/functions.py

+6
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def map(
157157
num_nodes: Optional[int] = None,
158158
machine: Optional[str] = None,
159159
num_downloaders: Optional[int] = None,
160+
num_uploaders: Optional[int] = None,
160161
reorder_files: bool = True,
161162
error_when_not_empty: bool = False,
162163
reader: Optional[BaseReader] = None,
@@ -173,6 +174,7 @@ def map(
173174
num_nodes: When doing remote execution, the number of nodes to use. Only supported on https://lightning.ai/.
174175
machine: When doing remote execution, the machine to use. Only supported on https://lightning.ai/.
175176
num_downloaders: The number of downloaders per worker.
177+
num_uploaders: The number of uploaders per workers.
176178
reorder_files: By default, reorders the files by file size to distribute work equally among all workers.
177179
Set this to ``False`` if the order in which samples are processed should be preserved.
178180
error_when_not_empty: Whether we should error if the output folder isn't empty.
@@ -215,6 +217,7 @@ def map(
215217
num_workers=num_workers or os.cpu_count(),
216218
fast_dev_run=fast_dev_run,
217219
num_downloaders=num_downloaders,
220+
num_uploaders=num_uploaders,
218221
reorder_files=reorder_files,
219222
weights=weights,
220223
reader=reader,
@@ -240,6 +243,7 @@ def optimize(
240243
num_nodes: Optional[int] = None,
241244
machine: Optional[str] = None,
242245
num_downloaders: Optional[int] = None,
246+
num_uploaders: Optional[int] = None,
243247
reorder_files: bool = True,
244248
reader: Optional[BaseReader] = None,
245249
) -> None:
@@ -258,6 +262,7 @@ def optimize(
258262
num_nodes: When doing remote execution, the number of nodes to use. Only supported on https://lightning.ai/.
259263
machine: When doing remote execution, the machine to use. Only supported on https://lightning.ai/.
260264
num_downloaders: The number of downloaders per worker.
265+
num_uploaders: The numbers of uploaders per worker.
261266
reorder_files: By default, reorders the files by file size to distribute work equally among all workers.
262267
Set this to ``False`` if the order in which samples are processed should be preserved.
263268
@@ -302,6 +307,7 @@ def optimize(
302307
num_workers=num_workers or os.cpu_count(),
303308
fast_dev_run=fast_dev_run,
304309
num_downloaders=num_downloaders,
310+
num_uploaders=num_uploaders,
305311
reorder_files=reorder_files,
306312
reader=reader,
307313
)

0 commit comments

Comments
 (0)