You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running the demo notebook unmodified on Ubuntu 20.04 machine with one GPU, everything is pip installed properly, but I keep getting this error below no matter what I do. It works in Colab but not locally. Why? How can I fix this?
| load data: .//StockTradingEnv_trading_data.df
| YahooDownloader: finish processing date list
| GPU id: 0, cwd: ./AgentPPO/StockTradingEnv-v2_0
Loaded act: ./AgentPPO/StockTradingEnv-v2_0
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in init_dict(data, index, columns, dtype)
285 arr if not is_datetime64tz_dtype(arr) else arr.copy() for arr in arrays
286 ]
--> 287 return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
288
289
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype, verify_integrity)
78 # figure out the index, if necessary
79 if index is None:
---> 80 index = extract_index(arrays)
81 else:
82 index = ensure_index(index)
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in extract_index(data)
399 lengths = list(set(raw_lengths))
400 if len(lengths) > 1:
--> 401 raise ValueError("arrays must all be same length")
402
403 if have_dicts:
ValueError: arrays must all be same length
The text was updated successfully, but these errors were encountered:
I'm running the demo notebook unmodified on Ubuntu 20.04 machine with one GPU, everything is pip installed properly, but I keep getting this error below no matter what I do. It works in Colab but not locally. Why? How can I fix this?
| load data: .//StockTradingEnv_trading_data.df
| YahooDownloader: finish processing date list
| GPU id: 0, cwd: ./AgentPPO/StockTradingEnv-v2_0
Loaded act: ./AgentPPO/StockTradingEnv-v2_0
ValueError Traceback (most recent call last)
in
6 args.init_before_training()
7
----> 8 prediction = args.env.trade_prediction(args, torch)
~/Dropbox/Code/work/stocks_boredhumans/Elegant-FinRL/elegant_finrl/env.py in trade_prediction(self, args, _torch)
266 # print(len(self.date_list))
267 # print(self.date_list)
--> 268 df_account_value = pd.DataFrame({'date':self.date_list,'account_value':episode_returns})
269 return df_account_value
270
/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py in init(self, data, index, columns, dtype, copy)
527
528 elif isinstance(data, dict):
--> 529 mgr = init_dict(data, index, columns, dtype=dtype)
530 elif isinstance(data, ma.MaskedArray):
531 import numpy.ma.mrecords as mrecords
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in init_dict(data, index, columns, dtype)
285 arr if not is_datetime64tz_dtype(arr) else arr.copy() for arr in arrays
286 ]
--> 287 return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
288
289
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype, verify_integrity)
78 # figure out the index, if necessary
79 if index is None:
---> 80 index = extract_index(arrays)
81 else:
82 index = ensure_index(index)
/usr/local/lib/python3.8/dist-packages/pandas/core/internals/construction.py in extract_index(data)
399 lengths = list(set(raw_lengths))
400 if len(lengths) > 1:
--> 401 raise ValueError("arrays must all be same length")
402
403 if have_dicts:
ValueError: arrays must all be same length
The text was updated successfully, but these errors were encountered: