tensortrade-org / tensortrade

An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.
https://discord.gg/ZZ7BGWh
Apache License 2.0
4.52k stars 1.02k forks source link

ModuleNotFoundError: No module named 'stochastic.noise' #288

Closed orshemtov closed 3 years ago

orshemtov commented 3 years ago

System information MacOS Python 3.8 TensorTrade 1.0.1b0

Describe the current behavior When trying to import tensortrade.stochastic, I'm getting a ModuleNotFoundError

import tensortrade.stochastic as sp

Error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-15-5a67fa7e1657> in <module>
      1 import random
      2 
----> 3 import tensortrade.stochastic as sp

/opt/anaconda3/lib/python3.8/site-packages/tensortrade/__init__.py in <module>
     11 )
     12 from . import env
---> 13 from . import stochastic
     14 from . import agents
     15 

/opt/anaconda3/lib/python3.8/site-packages/tensortrade/stochastic/__init__.py in <module>
      3 if importlib.util.find_spec("stochastic") is not None:
      4 
----> 5     from .utils import *
      6 
      7     from .processes.cox import cox

/opt/anaconda3/lib/python3.8/site-packages/tensortrade/stochastic/utils/__init__.py in <module>
----> 1 from .helpers import *
      2 from .parameters import *

/opt/anaconda3/lib/python3.8/site-packages/tensortrade/stochastic/utils/helpers.py in <module>
     20 import pandas as pd
     21 
---> 22 from stochastic.noise import GaussianNoise
     23 
     24 from tensortrade.stochastic.utils.parameters import ModelParameters, default

ModuleNotFoundError: No module named 'stochastic.noise'

Describe the expected behavior The import should go well and I should have access to the stochastic processes folder.

Code to reproduce the issue
Simply the code above

Other info / logs
I think the error resides in the fact that there is a class called GaussianNoise imported from a 3rd party package called "stochastic", and there are attempts to import from a duplicate name here:

tensortrade/stochastic/utils/init.py tensortrade/stochastic/utils/helpers.py

avnishranwa7 commented 3 years ago

There is no python file "noise" in "processes" folder.

rhamnett commented 3 years ago

@Quaniful - Please ensure you are using the master version of TT. This import works fine for me. Re-open if any further iss.

pip uninstall -y tensortrade 
# # Install TT from git master
pip install git+https://github.com/tensortrade-org/tensortrade.git