Chapter 01 - How to make warning go away

Hi All,

I am trying to train the model for fist chapter pets.
I see this warning -
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:2854: UserWarning: The default behavior for interpolate/upsample with float scale_factor will change in 1.6.0 to align with other frameworks/libraries, and use scale_factor directly, instead of relying on the computed output size. If you wish to keep the old behavior, please set recompute_scale_factor=True.

What can be done about this without ignoring the warning?

Thanks in advance,
Nutan

i see that on colab about a thousand times when i’m fitting; some kind of version clash.

i have to downgrade my pytorch version at the top of the notebook. try this.

!pip install torch==1.4.0 torchvision==0.5.0
1 Like

The issue itself hasn’t been fixed yet, check here: https://github.com/fastai/fastai2/pull/400

1 Like

ok, github noob question, once that gets merged into master will

!curl -s https://course.fast.ai/setup/colab | bash

get me the new version? (that does a pip install fastai --upgrade).
i assume the master branch gets regularly pushed to wherever pip installs happen from?

1 Like

Regularly, sometimes. Also known as whenever they decide to make a release. Right now it’s been a few months (to keep the first version somewhere so when people go to try the book everything works OOTB). To install the most recent versions you must do:

!pip install git+https://github.com/fastai/fastai2.git
!pip install git+https://github.com/fastai/fastcore.git

Also known as a dev install. And do note, that fastai2 and fastcore must both be installed this way otherwise you will run into trouble

2 Likes

Super thanks… Will try this