--- title: Experiments with loading 01 keywords: fastai sidebar: home_sidebar summary: "Contains some experiments with implemented functions" description: "Contains some experiments with implemented functions" nb_path: "nbs/03_load_tests.ipynb" ---
# from fastai.tabular.all import *
# import json
# import torch
# from torch.autograd import Variable
# from transfertab.utils import *
# from transfertab.core import *
# from srsly import ujson
# import wandb
# from fastai.callback.wandb import WandbCallback
# wandb.init(settings=wandb.Settings(start_method="thread"))
# df2 = pd.read_csv('../data/toy_dataset.csv')
# splits2 = RandomSplitter(valid_pct=0.2)(range_of(df2))
# to2 = TabularPandas(df2, procs=[Categorify, FillMissing,Normalize],
# cat_names = ['City','sex'],
# cont_names = ['Number', 'Income', 'Age'],
# y_names='Illness',
# splits=splits2)
# dls2 = to2.dataloaders(bs=64)
# learn2 = tabular_learner(dls2, metrics=accuracy, cbs=WandbCallback(log_dataset=True, log_model=True))
# learn2.fit(1)
# row, clas, probs = learn2.predict(df2.iloc[-1])
# row, clas, probs
# tab_obj = TabTransfer(learn2)
# wandb.finish()