Closed williamsdoug closed 3 years ago
Failing notebook tsai/tutorial_nbs/00c_Time_Series_data_preparation.ipynb
Fails in cell 43:
Code: X, y = df2xy(df, feat_col='feature', target_col='target', data_cols=slice(2, -1)) splits = get_splits(y, valid_size=.2, stratify=True, random_state=23, shuffle=True) tfms = [None, [Categorize()]] dsets = TSDatasets(X, y, tfms=tfms, splits=splits) dsets
TypeError Traceback (most recent call last)
Failing notebook tsai/tutorial_nbs/02_ROCKET_a_new_SOTA_classifier.ipynb
Error in Cell 19
Code: n_tests = 10 _acc = [] for i in range(n_tests): model = create_mlp_head(20_000, dls.c, fc_dropout=0.) model.apply(lin_zero_init) learn = Learner(dls, model, metrics=accuracy) learn.fit_one_cycle(50, lr_max=1e-3) _acc.append(learn.recorder.values[-1][-1]) if i < n_tests -1: clear_output() else: learn.plot_metrics() print(f'accuracy: {np.mean(_acc):.5f} +/- {np.std(_acc):.5f}')
TypeError Traceback (most recent call last)
Thanks @williamsdoug for taking this initiative! I'm afraid some of the tutorial nbs are a bit out of date, so I'll go ahead and fix these issues as soon as I can. I'm ok with this single issue for all tutorial nbs. I hope it doesn't become too cluttered.
Failing notebook tsai/tutorial_nbs/06_TS_to_image_classification_dev.ipynb
Error in cells 9, 24, 31
Cell 9 Contents: model = create_model(xresnet34, dls=dls, pretrained=True) learn = Learner(dls, model, metrics=accuracy) start = time.time() learn.fit_one_cycle(epochs, lr_max=1e-3) print(f"\ntraining time: {time.strftime('%H:%M:%S', time.gmtime(time.time() - start))}") learn.plot_metrics()
AssertionError Traceback (most recent call last)
Failing notebook tsai/tutorial_nbs/08_Self_Supervised_TSBERT.ipynb
Error in cells 9, 10
Cell 9 contents: learn.TSBERT.show_preds(sharey=True)
NameError Traceback (most recent call last)
tsai/tutorial_nbs03_Time_Series_Transforms.ipynb: This notebook only fails on my local system, but runs correctly on Google Colab. Most likely some form of complex package compatibility issue. Including in case the fix is obvious or if others encounter similar errors:
Local configuration (fails): tsai : 0.2.14 fastai : 2.2.5 fastcore : 1.3.19 torch : 1.7.0 tmatplotlib: 3.3.2
Colab configuration (works): tsai : 0.2.14 fastai : 2.2.5 fastcore : 1.3.19 torch : 1.7.0+cu101 matplotlib : 3.2.2
Failing cells: 4, 6, 10
Cell 4 contents: for i in range(100): plt.plot(TSTimeNoise(.5)(xb, split_idx=0)[0].T, color='gainsboro', alpha=.1) plt.plot(xb[0].T) plt.show()
TypeError Traceback (most recent call last)
In the case of notebook tsai/tutorial_nbs03_Time_Series_Transforms.ipynb, the error can be avoided by inserting 'xb = xb.cpu()' at the start of cell 4
Revised cell 4 contents: xb = xb.cpu() for i in range(100): plt.plot(TSTimeNoise(.5)(xb, split_idx=0)[0].T, color='gainsboro', alpha=.1) plt.plot(xb[0].T) plt.show()
I believe all of the issues reported above are now fixed using the following configuration:
Colab Configuration: tsai : 0.2.15 fastai : 2.2.5 fastcore : 1.3.19 torch : 1.7.0+cu101
I've released a new version in pip (0.2.15).
I’ll close this issue now, but feel free to reopen it if necessary.
Reran all tutorial notebooks. 06_TS_to_image_classification fails, but all others now work. Will open separate issue.
I've been using the notebooks in tsai/tutorial_nbs/ as a form of tsai installation verification. For each notebook that fails on my local system, I have reproduced the error on Google Colab in both the stable and unstable configuration. Since a number of notebooks fail, I will create a unique reply to this issue for each failing notebook. Note: None of these failing notebooks are blockers for me, but I thought it would be good have these errors logged for future debug purposes.
Colab Configuration - Stable: tsai : 0.2.14 fastai : 2.2.5 fastcore : 1.3.19 torch : 1.7.0+cu101
Colab Configuration - Unstable (master): tsai : 0.2.15 fastai : 2.2.5 fastcore : 1.3.19 torch : 1.7.0+cu101