apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.77k stars 6.8k forks source link

multivariate time series example #14115

Closed mahmoodn closed 5 years ago

mahmoodn commented 5 years ago

For the multivariate time series example, I changed the default electricity.txt to exchange_rate.txt, however I get the following error

$ python lstnet.py --gpus=0 --batch-size=20 --num-filters=20 --num-epochs=1
lstnet.py:82: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
  x = feature_df.as_matrix()
[13:33:50] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)

Metrics: Epoch 1, Training {'RAE': 0.20321928, 'RSE': 0.19795567, 'CORR': 0.68863547}
Metrics: Epoch 1, Validation {'RAE': 0.21487446, 'RSE': 0.24589065, 'CORR': 0.49501655}
Traceback (most recent call last):
  File "lstnet.py", line 242, in <module>
    train(symbol, train_iter, val_iter, data_names, label_names)
  File "lstnet.py", line 216, in train
    module.save_checkpoint(prefix=os.path.join("../models/", args.model_prefix), epoch=epoch, save_optimizer_states=False)
  File "/home/mahmood/mx/mxnet/python/mxnet/module/module.py", line 178, in save_checkpoint
    self._symbol.save('%s-symbol.json'%prefix)
  File "/home/mahmood/mx/mxnet/python/mxnet/symbol/symbol.py", line 1216, in save
    check_call(_LIB.MXSymbolSaveToFile(self.handle, c_str(fname)))
  File "/home/mahmood/mx/mxnet/python/mxnet/base.py", line 252, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [13:34:22] src/io/local_filesys.cc:199: Check failed: allow_null  LocalFileSystem::Open "../models/electricity_model-symbol.json": No such file or directory

Stack trace returned 10 entries:
[bt] (0) /home/mahmood/mx/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::StackTrace[abi:cxx11]()+0x169) [0x7f86df663659]
[bt] (1) /home/mahmood/mx/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::io::LocalFileSystem::Open(dmlc::io::URI const&, char const*, bool)+0x653) [0x7f86e29052e3]
[bt] (2) /home/mahmood/mx/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::Stream::Create(char const*, char const*, bool)+0x211) [0x7f86e28f74f1]
[bt] (3) /home/mahmood/mx/mxnet/python/mxnet/../../lib/libmxnet.so(MXSymbolSaveToFile+0x59) [0x7f86e27d2f99]
[bt] (4) /home/mahmood/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f870096eec0]
[bt] (5) /home/mahmood/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f870096e87d]
[bt] (6) /home/mahmood/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f872b429eee]
[bt] (7) /home/mahmood/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x13924) [0x7f872b42a924]
[bt] (8) python(_PyObject_FastCallKeywords+0x4ab) [0x559eff13265b]
[bt] (9) python(_PyEval_EvalFrameDefault+0x532e) [0x559eff18e40e]

What should I do?

mxnet-label-bot commented 5 years ago

Hey, this is the MXNet Label Bot. Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it. Here are my recommended labels: Example

lanking520 commented 5 years ago
../models/electricity_model-symbol.json

The problems is model not found. Please either rename your model file name to this one or make change in the code to load your new model name.

ThomasDelteil commented 5 years ago

@mahmoodn, Please re-open if you are still working on the issue. Thanks!