Neptune.ai fast.ai integration library
Project description
Neptune - fast.ai integration
See the official docs.
from fastai.basics import URLs, untar_data, accuracy
from fastai.tabular.all import tabular_learner, TabularDataLoaders, Categorify, FillMissing, Normalize
from fastai.callback.all import SaveModelCallback
from neptune import new as neptune
from neptune_fastai.impl import NeptuneCallback
neptune_run = neptune.init()
path = untar_data(URLs.ADULT_SAMPLE)
dls = TabularDataLoaders.from_csv(path / 'adult.csv',
path=path,
y_names="salary",
cat_names=[
'workclass',
'education',
'marital-status',
'occupation',
'relationship',
'race'
],
cont_names=['age', 'fnlwgt', 'education-num'],
procs=[Categorify, FillMissing, Normalize])
learn = tabular_learner(dls,
metrics=accuracy)
learn.fit_one_cycle(10,
cbs=[
NeptuneCallback(run=neptune_run,
base_namespace='experiment'),
SaveModelCallback(monitor='accuracy')
])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neptune-fastai-0.10.1.tar.gz
(24.7 kB
view hashes)