AI4Finance-Foundation / AI4Finance-Foundation/Deep-Reinforcement-Learning-for-Stock-Trading-DDPG-Algorithm-NIPS-2018

cannot import name 'FlattenDictWrapper' from 'gym.wrappers'

Abierto
#2 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
102
Forks
38
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am trying to use this code but after installing gym, baselines and other libraries with their latest versions, when I tried to run this program, it seemed that "baselines" is using "FlattenDictWrapper" from "gym.wrappers" where it is not able to find it in latest version. I tried switching to some older versions of gym and baselines but not able to resolve it. Can anyone guide into this.

Error: While importing 'run', an ImportError was raised:

Traceback (most recent call last):
File "C:\Data\Projects\venv\lib\site-packages\flask\cli.py", line 260, in locate_app
__import__(module_name)
File "C:\Users\common\Downloads\Deep-Reinforcement-Learning-for-Stock-Trading-DDPG-Algorithm-NIPS-2018-master\run.py", line 10, in
from baselines.common.cmd_util import common_arg_parser, parse_unknown_args, make_vec_env
File "C:\Data\Projects\venv\lib\site-packages\baselines\common\cmd_util.py", line 7, in
from gym.wrappers import FlattenDictWrapper
ImportError: cannot import name 'FlattenDictWrapper' from 'gym.wrappers' (C:\Users\common\Downloads\Deep-Reinforcement-Learning-for-Stock-Trading-DDPG-Algorithm-NIPS-2018-master\gym\wrappers\__init__.py)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start with run.py and trace the import through baselines.common.cmd_util into gym/wrappers/__init__.py, reproducing the reported ImportError with the dependency versions described. Compare the installed gym and baselines APIs; the issue is done when the project’s entry point imports successfully with a documented compatible dependency setup.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
fintech-quant, machine-learning
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.