AttributeError: 'numpy.ndarray' object has no attribute 'columns'
pankajmdan opened this issue Β· comments
model.fit not working
I was using this library for thepast 4-5 days , every thing was working fine but now suddently getting an error in fitting the model
model.fit(traindata=train, ts_column='Date', target='production', cv=3)
ERROR :
Start of Fit.....
Target variable given as = production
Start of loading of data.....
Inputs: ts_column = Date, sep = ,, target = ['production']
Using given input: pandas dataframe...
Date column exists in given train data...
train data shape = (173, 14)
Alert: Could not detect strf_time_format of Date. Provide strf_time format during "setup" for better results.
Running Augmented Dickey-Fuller test with paramters:
maxlag: 31 regression: c autolag: BIC
AttributeError Traceback (most recent call last)
in ()
----> 1 model.fit(traindata=train, ts_column='Date', target='production', cv=3)
2 frames
/root/.local/lib/python3.7/site-packages/auto_ts/utils/eda.py in check_each_var_for_stationarity(time_df, autolag, verbose)
319 alpha = 0.05
320 all_vars = 1
--> 321 copy_cols = time_df.columns.tolist()
322 for each_var in copy_cols:
323 timeseries = time_df[each_var].values
AttributeError: 'numpy.ndarray' object has no attribute 'columns'
Sorry for the error. Can you Please try the updated version 0.66 which you can upgrade via:
pip install git+git://github.com/AutoViML/Auto_TS
Sorry for the error. Can you Please try the updated version 0.66 which you can upgrade via:
pip install git+git://github.com/AutoViML/Auto_TS
Thank you! i have been trying in google colab but some how this version is not getting installed
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting git+git://github.com/AutoViML/Auto_TS
Cloning git://github.com/AutoViML/Auto_TS to /tmp/pip-req-build-038ouc6r
Running command git clone -q git://github.com/AutoViML/Auto_TS /tmp/pip-req-build-038ouc6r
fatal: unable to connect to github.com:
github.com[0: 140.82.114.4]: errno=Connection timed out
WARNING: Discarding git+git://github.com/AutoViML/Auto_TS. Command errored out with exit status 128: git clone -q git://github.com/AutoViML/Auto_TS /tmp/pip-req-build-038ouc6r Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://github.com/AutoViML/Auto_TS /tmp/pip-req-build-038ouc6r Check the logs for full command output.
Earlier i was using
!pip3 install git+https://github.com/AutoViML/Auto_TS.git --user and the library was working fine for the past 3-4 days
today only i face this issue ...request your help here :-)
Hi @pankajmdan π Can you provide access to the dataset so I can trouble shoot it? Or can you provide me a list of calling statements to see where the error is? That way I can upload it to pypi and you can install it via pip install auto_ts --upgrade
what do you think? (you can attach your dataset and notebook as a zip file here)
AutoVimal
Is it possible to revert to this morning status for 4-5 days more ?
You should be able to use the existing version on the pypi web site without having to use Github version. Have you tried?
pip install auto_ts
and see how that works?
Hi @pankajmdan π
The latest uploaded Github version of auto_ts works well. Check the notebook here
https://colab.research.google.com/drive/1wFOMA7VDggr0ll0JUq0nNen1PYBMsuqQ?usp=sharing
Thanks again
Yes essentially tried all and than only have written to you
Only working version seemed to be the github version which has also stopped ....
pip install auto_ts ...............
It runs for the VAR model only and not the best / FB Prophet
did all the updates .. have installed all again.
on Local PC
Running Facebook Prophet Model...
Fit-Predict data (shape=(173, 15)) with Confidence Interval = 0.95...
Starting Prophet Fit
Adding monthly seasonality to Prophet with period=12, fourier_order=12 and prior_scale=0.10
Starting Prophet Cross Validation
Max. iterations using expanding window cross validation = 3
Fold Number: 1 --> Train Shape: 158 Test Shape: 5
KeyError Traceback (most recent call last)
KeyError: 'metric_file' Issue #1670 on Github
On colab It is the Loader error
TypeError Traceback (most recent call last)
in ()
5 from datetime import datetime
6 #import auto_ts as AT
----> 7 from auto_ts import auto_timeseries as ATS
8 from auto_ts import auto_timeseries
9
5 frames
/usr/local/lib/python3.7/dist-packages/distributed/config.py in ()
18
19 with open(fn) as f:
---> 20 defaults = yaml.load(f)
21
22 dask.config.update_defaults(defaults)
TypeError: load() missing 1 required positional argument: 'Loader'
I got a similar error on Colab. You need to restart the kernel after installing auto-ts via pip3. Try it.
Thank you so much , It seems to work π
Though i was running the same code with kernel restart .. just that now the VAR model on this dataset has disappeared
Hi @pankajmdan π
I removed the VAR model from the "best" selection since it is taking too long even for tiny datasets. From now on, you must run the fit method again with "VAR" as its own model setting. I am sorry.
Super, Thank you so much .. Really appreciate your response
One more bit : Spend 2 days now but unable to get the fitted values of any Model e.g Prophet, VAR
Can i check that ? .....forecast is pretty clear
BR//Pankaj
By any chance you intend to include VAR as well in the near term to have a cohenrent view ?
Thanks again
I will put back VAR since people seem to like it. However beware that it takes a long time for large datasets. You can try again with installing from Github as follows
pip install git+git://github.com/AutoViML/Auto_TS
AutoViML