Comments (4)
Here is an example resulting of this problem where the IterableDataset is un-aware of the batch_size and num_workers: Lightning-AI/pytorch-lightning#19624
from pytorch.
@tchaton thanks for flagging this! Definitely understand and agree that IterableDatasets are difficult to get correct. Just to check my understanding: I think the proposal you're making is to pass information from DataLoader to dataset through a method call, but the user would still be required to set the behaviour up to eg end iteration early.
To be honest I'm not totally convinced how much of an improvement this is. Re: the linked Lightning issue, that does sound like a pain but I'm not sure how this proposal would help in this situation.
from pytorch.
Hey @andrewkho Yes, there is a lot of things hard to get it right.
As an example, here: https://github.com/Lightning-AI/litdata/blob/f23ba626c48d62a8397c2b7ae4bacfd345df2c86/src/litdata/streaming/dataloader.py#L620.
I had to override the length of the DataLoader to ensure the length was correct
from pytorch.
Here is another example of this issue: Lightning-AI/litdata#147
from pytorch.
Related Issues (20)
- Document the torch.distributed.elastic.events.construct_and_record_rdzv_event function HOT 1
- Document the torch.fx.annotate.annotate function HOT 2
- Document the torch.jit.frontend.get_jit_class_def function HOT 1
- Document the torch.onnx.symbolic_opset9.sub function HOT 1
- Document the torch.ao.quantization.utils.get_combined_dict function HOT 1
- Document the torch.onnx.symbolic_opset9.unsqueeze function HOT 1
- Document the torch.cuda.cudart function HOT 1
- Document the torch.fx.experimental.proxy_tensor.disable_proxy_modes_tracing function HOT 2
- Document the torch.onnx.symbolic_opset9.cat function HOT 1
- Document the torch.utils.collect_env.get_env_info function HOT 1
- Document the torch.utils.data.datapipes.utils.decoder.basichandlers function HOT 2
- Document the torch.onnx.symbolic_opset9.sigmoid function HOT 1
- Document the torch.distributed.elastic.utils.distributed.get_free_port function HOT 1
- Document the torch.fx.traceback.preserve_node_meta function HOT 1
- Document the torch.fx.operator_schemas.create_type_hint function HOT 1
- Document the torch.cuda.profiler.start function HOT 1
- Document the torch.cuda.profiler.stop function HOT 1
- Pytorch build from source failed with GCC 12.3
- Model parameter and gradient memory formats are inconsistent with compiled autograd
- recent torchinductor changes seems to break torchao CI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.