What is the v2 version for tabular regression?

Following is the code to run my tabular regression with v1:

cat_names=[...]
cont_names=[...]
dep_var=[...]

df = pd.read_csv('/content/gdrive/My Drive/data.csv')
data = (TabularList.from_df(df, path='.', cat_names=cat_names, cont_names=cont_names, procs=[Categorify, Normalize])
    .split_by_rand_pct(valid_pct = 0.3, seed = 8888)
    .label_from_df(cols=dep_var)
    .databunch())   

learn = tabular_learner(data, layers=[2000,2000,2000,2000,1000,500,500], metrics=exp_rmspe,emb_drop=0.2)

learn.lr_find()
learn.recorder.plot()
learn.unfreeze() 
learn.fit_one_cycle(10, max_lr =lr,callbacks=[SaveModelCallback(learn,
    monitor='valid_loss',
    mode='min',
    name='/content/gdrive/My Drive/'+jobname)])
learn.load('/content/gdrive/My Drive/'+jobname)
measure=(learn.validate(learn.data.train_dl),learn.validate(learn.data.valid_dl))
print("Validation:",measure,measure[0][0]+measure[1][0])
learn.recorder.plot()
learn.recorder.plot_losses()
learn.export('/content/gdrive/My Drive/m'+jobname)
learn2 = load_learner('/content/gdrive/My Drive/','m'+jobname)
learn2.data.valid_dl =data.valid_dl
%time res=learn2.get_preds(ds_type=DatasetType.Valid)

What are the fastai2 equivalent for these functions?

Read tabular docs section and do tabular tutorial. If you want more, read fastbook / watch fastai new courses or/and see Muellerz tabular courses.

I did so but didn’t find many of the similar functions such as lr_find(). I guess my codes in the previous post is pretty typical and if someone can summarize a migration guide it would also help a lot of other fastai users.

I think that tabular tutorial covers all your workflow except:

  1. unfreeze call (it’s the same in fastai v1).
  2. export / load. You can find docs here.

Fastai API had changed and it may not translate 1:1 call from version 1 but the funcionalty is there.