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
Describe the bug
Attempting to run the MarketFlow tutorial, the code throws an error after plot generation, during what seems like its attempt to write the data.
To Reproduce
Steps to reproduce the behavior:
~> mflow --train 2019-01-01
~> mflow --predict 2020-07-21
both train and predict flags seem to exit at the same place.
Expected behavior
I expected the code to finish and write out the file to the ./output/ directory
Desktop (please complete the following information):
OS: Linux Mint 18.3
Python: v3.7.7
Traceback
[07/20/20 21:06:02] INFO Writing feature map to ./model/feature_map_20200720.pkl
[07/20/20 21:06:02] INFO Loading data from ./input/test_20200720.csv
Traceback (most recent call last):
File "/home/michael/miniconda3/bin/mflow", line 8, in
sys.exit(main())
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/market_flow.py", line 430, in main
model = market_pipeline(model, market_specs)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/market_flow.py", line 292, in market_pipeline
run_analysis(a, lag_period, forecast_period, leaders, predict_history)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/analysis.py", line 270, in run_analysis
analysis.model = main_pipeline(model)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/main.py", line 426, in main_pipeline
model = training_pipeline(model)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/main.py", line 289, in training_pipeline
save_model(model, 'BEST', Partition.test)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/model.py", line 1315, in save_model
preds, probas = save_predictions(model, tag, partition)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/model.py", line 1208, in save_predictions
pd_indices = pf[pf.date >= predict_date].index.tolist()
File "/home/michael/miniconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5274, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'date'
The text was updated successfully, but these errors were encountered:
Hi,
I'm having the same issue and don't know how to run the tutorial example. Is there any solution to this bug?
Thanks
I've found that the issue was in model.yml file, on line 8, as it drops the date column, so you have to avoid deleting it and it will not show any error.
Describe the bug
Attempting to run the MarketFlow tutorial, the code throws an error after plot generation, during what seems like its attempt to write the data.
To Reproduce
Steps to reproduce the behavior:
both train and predict flags seem to exit at the same place.
Expected behavior
I expected the code to finish and write out the file to the ./output/ directory
Desktop (please complete the following information):
Traceback
[07/20/20 21:06:02] INFO Writing feature map to ./model/feature_map_20200720.pkl
[07/20/20 21:06:02] INFO Loading data from ./input/test_20200720.csv
Traceback (most recent call last):
File "/home/michael/miniconda3/bin/mflow", line 8, in
sys.exit(main())
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/market_flow.py", line 430, in main
model = market_pipeline(model, market_specs)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/market_flow.py", line 292, in market_pipeline
run_analysis(a, lag_period, forecast_period, leaders, predict_history)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/analysis.py", line 270, in run_analysis
analysis.model = main_pipeline(model)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/main.py", line 426, in main_pipeline
model = training_pipeline(model)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/main.py", line 289, in training_pipeline
save_model(model, 'BEST', Partition.test)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/model.py", line 1315, in save_model
preds, probas = save_predictions(model, tag, partition)
File "/home/michael/miniconda3/lib/python3.7/site-packages/alphapy/model.py", line 1208, in save_predictions
pd_indices = pf[pf.date >= predict_date].index.tolist()
File "/home/michael/miniconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5274, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'date'
The text was updated successfully, but these errors were encountered: