Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #66 from jakubLangr/master
Browse files Browse the repository at this point in the history
fix for issue #60
  • Loading branch information
sgugger committed Feb 2, 2020
2 parents 3f28348 + a77cfba commit 7503c96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fastai2/callback/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def begin_fit(self):

items = [self.dls.valid_ds.items[i] for i in idxs]
test_tls = [tl._new(items, split_idx=1) for tl in self.dls.valid_ds.tls]
self.valid_dl = self.dls.valid_dl.new(Datasets(tls=test_tls), bs=self.n_preds)
self.valid_dl = self.dls.valid.new(Datasets(tls=test_tls), bs=self.n_preds)

def after_batch(self):
"Log hyper-parameters and training loss"
Expand Down Expand Up @@ -108,4 +108,4 @@ def wandb_process(x:TensorImage, y:(TensorCategory,TensorMultiCategory), samples
@typedispatch
def wandb_process(x:TensorText, y:(TensorCategory,TensorMultiCategory), samples, outs):
data = [[s[0], s[1], o[0]] for s,o in zip(samples,outs)]
return wandb.Table(data=data, columns=["Text", "Target", "Prediction"])
return wandb.Table(data=data, columns=["Text", "Target", "Prediction"])
2 changes: 1 addition & 1 deletion nbs/70_callback.wandb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"\n",
" items = [self.dls.valid_ds.items[i] for i in idxs]\n",
" test_tls = [tl._new(items, split_idx=1) for tl in self.dls.valid_ds.tls]\n",
" self.valid_dl = self.dls.valid_dl.new(Datasets(tls=test_tls), bs=self.n_preds)\n",
" self.valid_dl = self.dls.valid.new(Datasets(tls=test_tls), bs=self.n_preds)\n",
"\n",
" def after_batch(self):\n",
" \"Log hyper-parameters and training loss\"\n",
Expand Down

0 comments on commit 7503c96

Please sign in to comment.