wgpubs
(WG)
1
Code was working yesterday, but getting this error now when using ColumnarModelData
learner.
Here is the relevant code:
md = ColumnarModelData.from_data_frame(PATH, val_idxs, train_df, y, cat_flds=cat_vars, bs=128)
learner = md.get_learner(emb_szs, len(train_df.columns)-len(cat_vars),
0.04, 1, [1000, 500], [0.001, 0.01], y_range=y_range)
learner.lr_find()
Error:
jeremy
(Jeremy Howard)
2
You have to add .astype(np.float32)
after y
, since we no longer automatically cast that dependent variable.
3 Likes
wgpubs
(WG)
3
Ah ok … thanks! I wasn’t aware of the change.
jeremy
(Jeremy Howard)
4
That could be because I didn’t tell anyone… 
(I was hoping to find a way to avoid it breaking anything but ran out of time)