wassname / rl-portfolio-management

Attempting to replicate "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem" https://arxiv.org/abs/1706.10059 (and an openai gym environment)
544 stars 179 forks source link

Issues running Notebook due to Tensorforce changes #12

Closed dnhkng closed 6 years ago

dnhkng commented 6 years ago

Hi,

Nice work on this project! I much prefer Jupyter to what the paper's authors have used.

I've just installed the dependencies, and have hit some errors:

# sanity check out environment is working state = environment.reset() state, reward, done=environment.execute(env.action_space.sample()) state.shape

gives me:


AttributeError Traceback (most recent call last)

in () 1 # sanity check out environment is working 2 state = environment.reset() ----> 3 state, reward, done=environment.execute(env.action_space.sample()) 4 state.shape ~\Anaconda3\lib\site-packages\tensorforce\contrib\openai_gym.py in execute(self, actions) 67 68 def execute(self, actions): ---> 69 if self.visualize: 70 self.gym.render() 71 # if the actions is not unique, that is, if the actions is a dict AttributeError: 'TFOpenAIGymCust' object has no attribute 'visualize'

Skipping this cell and going further, I hit the next roadblock. from tensorforce import Configuration

I have read on Tensorforce repo issues that the entire Configuration object has been scrapped (https://github.com/reinforceio/tensorforce/issues/132), so this breaks the current code here.

wassname commented 6 years ago

I included the tensorforce version I used in the requirements.txt, yeah I need to update it to the latest version

WQtong commented 6 years ago

Hi, have you updated the notebook? I struggled with the "Configuration" part. I tried to read the updates on tensorforce documentation but failed on exploration.

Great thanks for any updates for this project!

wassname commented 6 years ago

Yup the latest commit updates to to 0.3.5.2. When you run into version errors, make sure you install the right version from requirements.txt file.