TypeError: _cuda() got an unexpected keyword argument ‘non_blocking’

I’m currently working through Fast.AI lesson one on a paperspace machine. I have pulled the latest fastai repo, and have updated the Python / Anaconda libraries as shown herehttps://github.com/reshamas/fastai_deeplearn_part1/blob/master/tools/paperspace.md

In the section Our first model: quick start

I am running into the following error when running this code snippet.

rch=resnet34
data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, sz))
learn = ConvLearner.pretrained(arch, data, precompute=True)
learn.fit(0.01, 3)

Error Below:

0%| | 0/360 [00:00<?, ?it/s]

TypeError Traceback (most recent call last)
in
1 arch=resnet34
2 data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, sz))
----> 3 learn = ConvLearner.pretrained(arch, data, precompute=True)
4 learn.fit(0.01, 3)

~/fastai/courses/dl1/fastai/conv_learner.py in pretrained(cls, f, data, ps, xtra_fc, xtra_cut, custom_head, precompute, pretrained, **kwargs)
112 models = ConvnetBuilder(f, data.c, data.is_multi, data.is_reg,
113 ps=ps, xtra_fc=xtra_fc, xtra_cut=xtra_cut, custom_head=custom_head, pretrained=pretrained)
–> 114 return cls(data, models, precompute, **kwargs)
115
116 @classmethod

~/fastai/courses/dl1/fastai/conv_learner.py in init (self, data, models, precompute, **kwargs)
98 if hasattr(data, ‘is_multi’) and not data.is_reg and self.metrics is None:
99 self.metrics = [accuracy_thresh(0.5)] if self.data.is_multi else [accuracy]
–> 100 if precompute: self.save_fc1()
101 self.freeze()
102 self.precompute = precompute

~/fastai/courses/dl1/fastai/conv_learner.py in save_fc1(self)
177 m=self.models.top_model
178 if len(self.activations[0])!=len(self.data.trn_ds):
–> 179 predict_to_bcolz(m, self.data.fix_dl, act)
180 if len(self.activations[1])!=len(self.data.val_ds):
181 predict_to_bcolz(m, self.data.val_dl, val_act)

~/fastai/courses/dl1/fastai/model.py in predict_to_bcolz(m, gen, arr, workers)
16 m.eval()
17 for x,*_ in tqdm(gen):
—> 18 y = to_np(m(VV(x)).data)
19 with lock:
20 arr.append(y)

~/fastai/courses/dl1/fastai/core.py in VV(x)
67 def VV(x):
68 ‘’‘creates a single or a list of pytorch tensors, depending on input x. ‘’’
—> 69 return map_over(x, VV_)
70
71 def to_np(v):

~/fastai/courses/dl1/fastai/core.py in map_over(x, f)
6 def is_listy(x): return isinstance(x, (list,tuple))
7 def is_iter(x): return isinstance(x, collections.Iterable)
----> 8 def map_over(x, f): return [f(o) for o in x] if is_listy(x) else f(x)
9 def map_none(x, f): return None if x is None else f(x)
10 def delistify(x): return x[0] if is_listy(x) else x

~/fastai/courses/dl1/fastai/core.py in VV_(x)
63 def VV_(x):
64 ‘’‘creates a volatile tensor, which does not require gradients. ‘’’
—> 65 return create_variable(x, True)
66
67 def VV(x):

~/fastai/courses/dl1/fastai/core.py in create_variable(x, volatile, requires_grad)
51 if type (x) != Variable:
52 if IS_TORCH_04: x = Variable(T(x), requires_grad=requires_grad)
—> 53 else: x = Variable(T(x), requires_grad=requires_grad, volatile=volatile)
54 return x
55

~/fastai/courses/dl1/fastai/core.py in T(a, half, cuda)
39 a = to_half(a) if half else torch.FloatTensor(a)
40 else: raise NotImplementedError(a.dtype)
—> 41 if cuda: a = to_gpu(a, non_blocking=True)
42 return a
43

~/fastai/courses/dl1/fastai/core.py in to_gpu(x, *args, **kwargs)
88 def to_gpu(x, *args, **kwargs):
89 ‘’‘puts pytorch variable to gpu, if cuda is available and USE_GPU is set to true. ‘’’
—> 90 return x.cuda(*args, **kwargs) if USE_GPU else x
91
92 def noop(*args, **kwargs): return

TypeError: _cuda() got an unexpected keyword argument ‘non_blocking’

replace non_blocking with async, non_blocking for PyTorch since version 0.4.0. CUDA syntax error