Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Train] Throw error messages if dataset_iter_config is not set in LightningTrainer. #36509

Closed
woshiyyya opened this issue Jun 16, 2023 · 2 comments · Fixed by #36368
Closed
Assignees
Labels
enhancement Request for new feature and/or capability ray-team-created Ray Team created train Ray Train Related Issue

Comments

@woshiyyya
Copy link
Member

Description

User reports that they found an obscure particularity with the lightning trainer in combination with ray datasets:
The datasets_iter_config argument will be None if unset, but this will lead to an obscure error:

TypeError: An invalid dataloader was returned from `RayDataModule.train_dataloader()`. Found <torch.utils.data.dataloader.DataLoader object at 0x7f2280356710>.

We should raise an error with clear message to ask the users to provide a dataset_iter_config.

Use case

No response

@woshiyyya woshiyyya added enhancement Request for new feature and/or capability train Ray Train Related Issue ray-team-created Ray Team created labels Jun 16, 2023
@woshiyyya woshiyyya self-assigned this Jun 16, 2023
@matthewdeng
Copy link
Contributor

Should we just use a default value if the user passes in None?

@woshiyyya
Copy link
Member Author

Yeah, we can pass a empty dict, which would use the default values defined in dataset.iter_torch_batches().

But I think it's better to make it mandatory when the users provided ray datasets, we don't want to silently set the default batch size for the users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature and/or capability ray-team-created Ray Team created train Ray Train Related Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants