FinRL-Meta icon indicating copy to clipboard operation
FinRL-Meta copied to clipboard

Error in Demo_MultiCrypto_Trading.ipynb

Open bhaskatripathi opened this issue 3 years ago • 14 comments

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 'time_interval'

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 avatar Feb 11 '22 00:02 bhaskatripathi

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

bhaskatripathi avatar Feb 11 '22 01:02 bhaskatripathi

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

rayrui312 avatar Feb 11 '22 13:02 rayrui312

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.

benwaldner avatar Feb 13 '22 17:02 benwaldner

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.

bhaskatripathi avatar Feb 13 '22 18:02 bhaskatripathi

"> 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.

benwaldner avatar Feb 13 '22 18:02 benwaldner

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

jjphung avatar Feb 15 '22 09:02 jjphung

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

It breaks afterwards with the two position arguments.

benwaldner avatar Feb 15 '22 12:02 benwaldner

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.

YangletLiu avatar Feb 26 '22 18:02 YangletLiu

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 !

bhaskatripathi avatar Feb 26 '22 19:02 bhaskatripathi

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.

YangletLiu avatar Feb 26 '22 20:02 YangletLiu

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. 🙂

jjphung avatar Feb 27 '22 11:02 jjphung

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!

yuelng avatar Mar 13 '22 15:03 yuelng

fixed

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

zhumingpassional avatar Apr 10 '22 14:04 zhumingpassional

@zhumingpassional the link is a 404

mbessalle avatar Nov 10 '22 06:11 mbessalle