We are working on this. For the moment you can use this function:
def get_toploss_paths(md, ds, dl, loss_func, n_imgs=None): if not n_imgs: n_imgs = len(dl) val_losses = get_preds(md, dl, loss_func=loss_func)[2] losses,idxs = torch.topk(val_losses, n_imgs) return ds.x[idxs]
Where you can either feed in Training or Validation Dataset and Dataloader. For the lesson 2 notebook you can call it like this:
train_toploss_fns = get_toploss_paths(learn.model, data.train_ds, data.train_dl, learn.loss_func)
You can then feed train_toploss_fns to FileDeleter.
We are also working on showing and being able to change the labels in the widget.