Lightning-AI/pytorch-lightning

support len(datamodule)

Open

#5,965 opened on Feb 14, 2021

View on GitHub
 (13 comments) (0 reactions) (0 assignees)Python (3,233 forks)batch import
data handlingfeaturegood first issuehelp wanted

Repository metrics

Stars
 (26,687 stars)
PR merge metrics
 (Avg merge 9d 15h) (3 merged PRs in 30d)

Description

Let's add support for len(datamodule) so we can get the following:

len(datamodule)

# prints:  
# train_dataloder_1:   200 samples
# train_dataloader_2:  500 samples
# tval_dataloder_1:    200 samples
# val_dataloader_2:    500 samples
# test_dataloder_1:    200 samples
# test_dataloader_2:   500 samples

cc @edenafek

Contributor guide