tsai icon indicating copy to clipboard operation
tsai copied to clipboard

TypeError: 'module' object is not callable

Open aappaappoo opened this issue 3 years ago • 1 comments

from tsai.models.InceptionTimePlus import InceptionTimePlus import numpy as np from tsai.data.external import get_UCR_data, check_data from tsai.data.preprocessing import TSStandardize, TSNan2Value from tsai.data.core import TSCategorize, get_ts_dls from tsai.learner import ts_learner from tsai.models.InceptionTimePlus import InceptionTimePlus from tsai.callback import MVP

dsid = 'MoteStrain' X, y, splits = get_UCR_data(dsid, split_data=False) check_data(X, y, splits, False) X[X<-1] = np.nan # T

tfms = [None, [TSCategorize()]] batch_tfms = [TSStandardize(by_var=True)] unlabeled_dls = get_ts_dls(X, splits=splits, tfms=tfms, batch_tfms=batch_tfms) learn = ts_learner(unlabeled_dls, InceptionTimePlus, cbs=[MVP(fname=f'{dsid}', window_size=(.5, 1))]) # trained on variable window size learn.fit_one_cycle(1, 3e-3)

The error code is as follows: image

aappaappoo avatar May 21 '22 11:05 aappaappoo

In the error, it says that you are calling a module in this line:

learn = ts_learner(unlabeled_dls, InceptionTimePlus, cbs=[MVP(fname=f'{dsid}', window_size=(.5, 1))]) # trained on variable window size

There are only 2 objects you are calling (ts_learner and MVP). One of them is a module instead of an object because it's incorrectly imported. I'll let you figure out which one it is.

oguiza avatar May 22 '22 02:05 oguiza

I'll close this issue due to the lack of response.

oguiza avatar Aug 18 '22 10:08 oguiza