AI4Finance-Foundation / FinRL-Meta

FinRL­-Meta: Dynamic datasets and market environments for FinRL.
https://ai4finance.org
MIT License
1.29k stars 593 forks source link

Error in Demo_MultiCrypto_Trading.ipynb #86

Open bhaskatripathi opened 2 years ago

bhaskatripathi commented 2 years ago

I opened the file in Google Collab thinking that it should be straightforward to run once the libraries are installed. All libraries got installed but when I run the train method below, I get the error of _TypeError: init() missing 3 required positional arguments: 'start_date', 'end_date', and 'timeinterval'

train(start_date=TRAIN_START_DATE, end_date=TRAIN_END_DATE, ticker_list=TICKER_LIST, data_source='binance', time_interval='5m', technical_indicator_list=TECHNICAL_INDICATORS_LIST, drl_lib='elegantrl', env=env, model_name='ppo', current_working_dir='./test_ppo', erl_params=ERL_PARAMS, break_step=5e4, if_vix=False ) image

bhaskatripathi commented 2 years ago

Here is the link for collab: https://colab.research.google.com/drive/1oK6sBNYxYVAm_WrbaUIw9qQtfcNFO9Oj?usp=sharing

rayrui312 commented 2 years ago

Thanks for reporting errors. We will look into it these days.

benwaldner commented 2 years ago

Here a new error code on the imports on the Colab file Demo_MultiCrypto_Trading:


ModuleNotFoundError Traceback (most recent call last)

in () 2 from drl_agents.rllib_models import DRLAgent as DRLAgent_rllib 3 from drl_agents.stablebaselines3_models import DRLAgent as DRLAgent_sb3 ----> 4 from finrl_meta.data_processor import DataProcessor 5 6

1 frames

/FinRL-Meta/finrl_meta/data_processor.py in () 6 from finrl_meta.data_processors.processor_joinquant import JoinquantProcessor 7 from finrl_meta.data_processors.processor_tusharepro import TushareProProcessor as Tusharepro ----> 8 from finrl_meta.data_processors.processor_baostock import BaostockProcessor 9 import pandas as pd 10 import numpy as np

/FinRL-Meta/finrl_meta/data_processors/processor_baostock.py in () ----> 1 import baostock as bs 2 import pandas as pd 3 4 '''Reference: https://github.com/AI4Finance-LLC/FinRL''' 5

ModuleNotFoundError: No module named 'baostock'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

bhaskatripathi commented 2 years ago

Well to be honest my experience with this library is very bad even though the idea of combining everything in DRL is very good but they are using just too many third-party libraries. Personally, I would never push such unstable code on github. My two cents is to use stable baseline versions if you really want to go ahead and promote this library. Otherwise it is a huge waste of man hours.

benwaldner commented 2 years ago

"> Well to be honest my experience with this library is very bad even though the idea of combining everything in DRL is very good but they are using just too many third-party libraries. Personally, I would never push such unstable code on github. My two cents is to use stable baseline versions if you really want to go ahead and promote this library. Otherwise it is a huge waste of man hours."

I just posted it so I dont add a new issue. I think thats a very small bug regarding the "BaostockProcessor". Just fork the main libraries and use it as the last stable version after the dataprocessor import is fixed or look for an older fork to use it instead.

jjphung commented 2 years ago

In order to fix the baostock error, just run pip install baostock

benwaldner commented 2 years ago

In order to fix the baostock error, just run pip install baostock

It breaks afterwards with the two position arguments.

YangletLiu commented 2 years ago

At this moment, this repo is at the beginning stage. We are aiming for standarding our data processing workflow as a team…sharing the codes we use, while supporting FinRL. It is OK to have so many bugs, since it is not the target tool but a byproduct, as long as the codes are useful and are improving continuously.

bhaskatripathi commented 2 years ago

At this moment, this repo is at the beginning stage. We are aiming for standarding our data processing workflow as a team…sharing the codes we use, while supporting FinRL. It is OK to have so many bugs, since it is not the target tool but a byproduct, as long as the codes are useful and are improving continuously.

I do understand that you are standardizing Xiao and you guys are doing a great job. However, my request is that it will be of great help to if you guys can do some basic checks for the examples advertized. My intention is definitely not to bring anyone down but to improve your product by highlighting the curse of too many third-party libraries. All the best !

YangletLiu commented 2 years ago

At this moment, this repo is at the beginning stage. We are aiming for standarding our data processing workflow as a team…sharing the codes we use, while supporting FinRL. It is OK to have so many bugs, since it is not the target tool but a byproduct, as long as the codes are useful and are improving continuously.

I do understand that you are standardizing Xiao and you guys are doing a great job. However, my request is that it will be of great help to if you guys can do some basic checks for the examples advertized. My intention is definitely not to bring anyone down but to improve your product by highlighting the curse of too many third-party libraries. All the best !

Sure, no problem, thanks! We are refactoring FinRL.
Agree that tens of third-party libraries will cause many troubles. Because FinRL-Meta is accepting all the submitted codes, we are able to keep FinRL clean. Maybe soon we will refactor FinRL-meta, cleaning it up.

jjphung commented 2 years ago

I recommend some github pre-commit hooks, checks, or actions to help standardize things and make the dev teams' lives easier. In addition to streamlining code commits and reducing overhead, it will also help with overall code quality and consistency. 🙂

yuelng commented 2 years ago

can some one fix the error in https://github.com/AI4Finance-Foundation/FinRL-Meta/blob/master/Demo_MultiCrypto_Trading.ipynb the ipynb also show below error

TypeError: 'module' object is not callable

any reply will be appreciate!

zhumingpassional commented 2 years ago

fixed

Please see https://github.com/AI4Finance-Foundation/FinRL-Meta/blob/master/tutorials(notebook)/2-Advance/MultiCrypto_Trading.ipynb

mbessalle commented 2 years ago

@zhumingpassional the link is a 404