Compatibility of torch API's DataLoader and ray Dataset

Hi ,

Developing code based on the examples

I have to read data from database and load onto ray framework.

For import DataLoader class, have passed from, like below snippet.

 train_dl = DataLoader(train_dataset, batch_size=32, shuffle=True)
 test_dl = DataLoader(test_dataset, batch_size=32, shuffle=False)

It gives the error TypeError: object of type ‘Dataset’ has no len()

Are these two classes compatible , or is there a work around for these?

If you are using the Ray SGD Dataset, then you shouldn’t wrap it in a DataLoader yourself. You just need to pass it in directly to TorchTrainer.train