How to train/test on a subset of your FastAI data
If you have a large FastAI (v2) DataLoaders
and you're trying to debug something at epoch-scale (such as a custom metric), an easy way to train on a small subset of your data is:
subset_size = 100 # Or whatever
selected_items = np.random.choice(dls.train_ds.items, subset_size …