diff --git a/docs/conf.py b/docs/conf.py index 8a5371f..6e7a9d5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,7 +49,7 @@ # The short X.Y version version = '0.13' # The full version, including alpha/beta/rc tags -release = '0.13.6' +release = '0.13.7' # -- General configuration --------------------------------------------------- diff --git a/docs/examples/monitor_fastai.ipynb b/docs/examples/monitor_fastai.ipynb index 355830b..1a96544 100644 --- a/docs/examples/monitor_fastai.ipynb +++ b/docs/examples/monitor_fastai.ipynb @@ -19,14 +19,10 @@ "outputs": [], "source": [ "from fastai.vision import *\n", - "mnist = untar_data(URLs.MNIST_TINY)\n", - "tfms = get_transforms(do_flip=False)\n", - "data = (ImageItemList.from_folder(mnist)\n", - " .split_by_folder()\n", - " .label_from_folder()\n", - " .transform(tfms, size=32)\n", - " .databunch()\n", - " .normalize(imagenet_stats))" + "path = untar_data(URLs.MNIST_TINY)\n", + "\n", + "data = ImageDataBunch.from_folder(path, ds_tfms=(rand_pad(2, 28), []), bs=64)\n", + "data.normalize(imagenet_stats)" ] }, { @@ -42,7 +38,7 @@ "metadata": {}, "outputs": [], "source": [ - "learn = create_cnn(data, models.resnet18, metrics=accuracy)\n", + "learn = cnn_learner(data, models.resnet18, metrics=accuracy)\n", "learn.lr_find()\n", "learn.recorder.plot()" ] diff --git a/neptunecontrib/monitoring/fastai.py b/neptunecontrib/monitoring/fastai.py index 2c01a5e..ef68bb7 100644 --- a/neptunecontrib/monitoring/fastai.py +++ b/neptunecontrib/monitoring/fastai.py @@ -48,14 +48,15 @@ class NeptuneMonitor(LearnerCallback): Prepare data:: from fastai.vision import * - mnist = untar_data(URLs.MNIST_TINY) - tfms = get_transforms(do_flip=False) - data = (ImageItemList.from_folder(mnist) - .split_by_folder() - .label_from_folder() - .transform(tfms, size=32) - .databunch() - .normalize(imagenet_stats)) + path = untar_data(URLs.MNIST_TINY) + + data = ImageDataBunch.from_folder(path, ds_tfms=(rand_pad(2, 28), []), bs=64) + data.normalize(imagenet_stats) + + learn = cnn_learner(data, models.resnet18, metrics=accuracy) + + learn.lr_find() + learn.recorder.plot() Now, create Neptune experiment, instantiate the monitor and pass it to callbacks:: diff --git a/setup.py b/setup.py index 1aa6826..f72fbb4 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def main(): setup( name='neptune-contrib', - version='0.13.6', + version='0.13.7', description='Neptune Python library contributions', author='neptune.ml', author_email='contact@neptune.ml',