Fastai v2 tabular

Ok, changed test_dl to DataBunch.test_dl and in the case of tabular data it has a different behavior.

1 Like

Thanks!

@sgugger I seem to be getting an error, I think this line in test_dl should be:

test_ds = test_set(self.valid_ds, test_items, rm_tfms=rm_type_tfms) if isinstance(self.valid_ds, DataSource) else test_items

As we no longer have dbunch :slight_smile: (originally it was ifinstance(dbunch.valid_ds...)

Missed one indeed, should be fixed.

1 Like

Tabular is still showing the DataFrame object has no attribute with_cont. Should it be now:

dl = dbunch.test_dl(df)

If I look at the type of dbunch it’s just showing the generic DataBunch, (fastai2.data.core.DataBunch) which may be a hint of what is going on.
(also doing dbunch.test_dl?? shows the non-tabular version

(part of this may be because I’m doing to = TabularPandas(df, procs, cat_names, cont_names, y_names="salary", splits=splits) and then dbunch = to.dbunch instead of TabularDataBunch)

When I try going through and ensuring it is a TabDataLoader (start with TabularDataBunch.from_df) I still get the DataFrame has no attribute with_cont

Ah right, .databunch doesn’t use the subclass (yet). Will fix tonight or tomorrow.

1 Like

Thanks! Appreciate all the help :slight_smile:

Should be fixed now.

1 Like

Can verify @sgugger! Also nice that we can have them be labeled too (assuming they can be labelled the same as the original dbunch) :slight_smile: Thank you for this!

Hey Guys,
I am working on a dataset similar to sale prediction task.
I am getting this error when I want to use metrics like rmse, mse.

If I use mae it works but I need my metrics proportional to the cost.
GIST for error using rmse
Execution using MAE

I got a similar error (fastai2 0.0.7). I think that the dataloader does not encode the data.

On:

I Get

How are you guys making your DataLoaders? I just used tabular the other day and it was working fine

I use this code as reference:

At least I know it’s a trusted source :wink: try running this notebook:

What do your procs look like?

procs = [Categorify, FillMissing, Normalize]

I’m going to try that notebook with fastai2 0.0.7 from pip

No, I use pip. The tabular baseline notebook shows my install script

The new one has regression block its not fully documented yet. So, you might need to wait for documents updated or browse the code…

@s.s.o it looks like it’s just adults he’s running, which shouldn’t be a RegressionBlock. Though I got regression to work too. @Javi are you installing fastcore too?

Now it works! I had pytorch 1.2.0 sorry