Anyone able to run the Lesson 1 notebook?

Thanks.

Does anyone had the following issue with Pytorch ?
I tried reinstalling it on my instance but still getting the same issues.

Traceback (most recent call last):

File “/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py”, line 2910, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File “”, line 1, in
from fastai.transforms import *

File “/home/ubuntu/fastai/courses/dl1/fastai/transforms.py”, line 2, in
from .layer_optimizer import *

File “/home/ubuntu/fastai/courses/dl1/fastai/layer_optimizer.py”, line 2, in
from .torch_imports import *

File “/home/ubuntu/fastai/courses/dl1/fastai/torch_imports.py”, line 26
if pre: load_model(m, f’{path}/weights/{fn}.pth’)
^
SyntaxError: invalid syntax
Thanks

You are running Python 3.5. You should install 3.6.

2 Likes

Could anyone try to run the very first lesson1 notebook with latest git pull fastai
and see if it works till “plot_confusion_matrix(cm, data.classes)”?

I started to get empty graphs on: learn.sched.plot_lr()

And on:

sklearn.metrics import confusion_matrix
cm = confusion_matrix(y, preds)

~/anaconda3/envs/fastai/lib/python3.6/site-packages/sklearn/utils/validation.py in check_consistent_length(*arrays)
202 if len(uniques) > 1:
203 raise ValueError(“Found input variables with inconsistent numbers of”
→ 204 " samples: %r" % [int(l) for l in lengths])
205
206

ValueError: Found input variables with inconsistent numbers of samples: [2000, 5]

On fastai repo from Nov 22 - all works fine.

1 Like

Thanks for being 18h ahead of me, good sanity check. I’m having the same issues. I’m running Windows + GPU. What environment are you running? Good news is Windows + GPU is now working – at least as well as your system.

  1. Empty graphs (2) starting from Improve Your Graph onwards: learn.sched.plot_lr()
  2. ValueError: Found input variables with inconsistent numbers of samples: [2000, 5]
  3. Many errors (albeit innocuous): “Failed to display Jupyter Widget of type HBox.”

ValueError Traceback (most recent call last)
in ()
1 from sklearn.metrics import confusion_matrix
----> 2 cm = confusion_matrix(y, preds)

~\Anaconda3\lib\site-packages\sklearn\metrics\classification.py in confusion_matrix(y_true, y_pred, labels, sample_weight)
248
249 “”"
–> 250 y_type, y_true, y_pred = _check_targets(y_true, y_pred)
251 if y_type not in (“binary”, “multiclass”):
252 raise ValueError("%s is not supported" % y_type)

~\Anaconda3\lib\site-packages\sklearn\metrics\classification.py in _check_targets(y_true, y_pred)
69 y_pred : array or indicator matrix
70 “”"
—> 71 check_consistent_length(y_true, y_pred)
72 type_true = type_of_target(y_true)
73 type_pred = type_of_target(y_pred)

~\Anaconda3\lib\site-packages\sklearn\utils\validation.py in check_consistent_length(*arrays)
202 if len(uniques) > 1:
203 raise ValueError(“Found input variables with inconsistent numbers of”
–> 204 " samples: %r" % [int(l) for l in lengths])
205
206

ValueError: Found input variables with inconsistent numbers of samples: [2000, 5]

1 Like

I’m getting the same error.

Sounds like the recent updates to TTA - search this forum for details.

The latest github source code fixes all the issues I’ve hit. Lesson1 runs to completion without any errors.