walkwithfastai.github.io icon indicating copy to clipboard operation
walkwithfastai.github.io copied to clipboard

tab_ae.ipynb; could not do one pass in your dataloader

Open lzumot opened this issue 2 years ago • 1 comments

where: 03_tab.ae.ipynb,

cell/command: to = TabularPandasIdentity(df, [Categorify, FillMissing, Normalize], cat_names, cont_names, splits=RandomSplitter(seed=32)(df)) dls = to.dataloaders(bs=1024)

error: = .iLoc requires numeric indexers, got [None]

cannot do _one_pass

lzumot avatar Jan 22 '23 13:01 lzumot

potential fix in notebook but not sure it breaks anything, comment out do_item = noops to allow it to run when called for one_pass:

@delegates() class TabDataLoaderIdentity(TabDataLoader): "A transformed DataLoader for AutoEncoder problems with Tabular data" #do_item = noops <------------------ comment out def init(self, dataset, bs=16, shuffle=False, after_batch=None, num_workers=0, **kwargs): if after_batch is None: after_batch = L(TransformBlock().batch_tfms)+ReadTabBatchIdentity(dataset) super().init(dataset, bs=bs, shuffle=shuffle, after_batch=after_batch, num_workers=num_workers, **kwargs)

def create_batch(self, b): return self.dataset.iloc[b]

lzumot avatar Jan 22 '23 17:01 lzumot