intel-analytics / analytics-zoo

Distributed Tensorflow, Keras and PyTorch on Apache Spark/Flink & Ray
https://analytics-zoo.readthedocs.io/
Apache License 2.0
17 stars 4 forks source link

Error of Network Traffic Model Forecasting #130

Open MengleiZhang opened 3 years ago

MengleiZhang commented 3 years ago

I got the following error when running the following example: network_traffic_model_forecasting.ipynb. However, when I tried the older version of this file (before the update on Aug 10), there was no error. Can you check?

I installed the analytics-zoo using pip install analytics-zoo.


forecaster = LSTMForecaster(past_seq_len=x_train.shape[1], input_feature_num=x_train.shape[-1], output_feature_num=y_train.shape[-1], hidden_dim=16, layer_num=2, lr=0.001)

TypeError Traceback (most recent call last) /tmp/ipykernel_3636247/1497806761.py in 8 hidden_dim=16, 9 layer_num=2, ---> 10 lr=0.001)

TypeError: init() got an unexpected keyword argument 'past_seq_len'

TheaperDeng commented 3 years ago

Hi,

We updated our API and had some improvement on forecaster since last release and the notebook on master branch reflect the changes. There are two options to make things work.

1. (recommended) upgrade the analytics-zoo to our weekly-built version by

pip install --pre --upgrade analytics-zoo[automl]

and continue using the notebooks on master branch

related latest doc:

user guide: https://analytics-zoo.readthedocs.io/en/latest/doc/Chronos/Overview/chronos.html

api doc: https://analytics-zoo.readthedocs.io/en/latest/doc/PythonAPI/Chronos/index.html

2. Continue using analytics-zoo 0.11.0 released version and notebooks on tag 0.11.0: https://github.com/intel-analytics/analytics-zoo/blob/v0.11.0/pyzoo/zoo/chronos/use-case/network_traffic/network_traffic_model_forecasting.ipynb

related 0.11.0 doc:

user guide: https://analytics-zoo.readthedocs.io/en/v0.11.0/doc/Chronos/Overview/chronos.html

api doc: https://analytics-zoo.readthedocs.io/en/v0.11.0/doc/PythonAPI/Chronos/index.html

MengleiZhang commented 3 years ago

Method 1 works. Thank you.

Shubhamshrimali commented 3 years ago

image

Hi I tried the above method but still not able install

TheaperDeng commented 3 years ago

image

Hi I tried the above method but still not able install

Oh I just found you are using windows, it seems that we only release whl for linux and macos... @Shubhamshrimali

if you are using linux/macos/wsl

image

The command seems to work just fine.

Some possible fixes are:

Shubhamshrimali commented 3 years ago

I am able to install other file like tensorflow. so i can say there is no network issue image

unset the 3rd party mirror source you may set for pip and use the default source :- i freshly build my system so i don't have any 3rd party mirror source

download the whl directly and install by pip install .[automl] :-- image

This is windows machine

TheaperDeng commented 3 years ago

yeah I believe the issue is caused by platform conflict. analytics-zoo is tested throughly on mac and linux(or wsl on windows). Sadly we have not supported windows yet. The easiest way might be using WSL in windows. @Shubhamshrimali

For more details: https://analytics-zoo.readthedocs.io/en/latest/doc/UserGuide/python.html https://analytics-zoo.readthedocs.io/en/latest/doc/Chronos/Overview/chronos.html

for wsl: https://docs.microsoft.com/en-us/windows/wsl/setup/environment