You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# In version 0.4.11 of tianshou, the code:
# logits, hidden = self.actor(batch.obs, state=state, info=batch.info)
# was changed in PR787,
# which causes pytest errors(AttributeError: 'dict' object has no attribute 'info') in CI,
# so we restricted the version of tianshou.
# References:
# https://github.com/thu-ml/tianshou/releases
"tianshou<=0.4.10",
"gym>=0.24", # If you do not put gym at the end, gym will degrade causing pytest results to fail.
🐛 Bug Description
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
Screenshot
Environment
TypeError Traceback (most recent call last)
Cell In[20], line 4
2 from pathlib import Path
3 from typing import cast
----> 4 from qlib.rl.trainer import Checkpoint, train
7 NSTEPS = 10
9 trainer_kwargs = {
10 "max_iters": 10,
11 "finite_env_type": "dummy",
(...)
18 ],
19 }
File ~.conda\envs\TradeMaster\lib\site-packages\qlib\rl\trainer_init_.py:6
1 # Copyright (c) Microsoft Corporation.
2 # Licensed under the MIT License.
4 """Train, test, inference utilities."""
----> 6 from .api import backtest, train
7 from .callbacks import Checkpoint, EarlyStopping, MetricsWriter
8 from .trainer import Trainer
File ~.conda\envs\TradeMaster\lib\site-packages\qlib\rl\trainer\api.py:13
11 from qlib.rl.reward import Reward
12 from qlib.rl.simulator import InitialStateType, Simulator
---> 13 from qlib.rl.utils import FiniteEnvType, LogWriter
15 from .trainer import Trainer
16 from .vessel import TrainingVessel
File ~.conda\envs\TradeMaster\lib\site-packages\qlib\rl\utils_init_.py:5
1 # Copyright (c) Microsoft Corporation.
2 # Licensed under the MIT License.
4 from .data_queue import DataQueue
----> 5 from .env_wrapper import EnvWrapper, EnvWrapperStatus
6 from .finite_env import FiniteEnvType, vectorize_env
7 from .log import ConsoleWriter, CsvWriter, LogBuffer, LogCollector, LogLevel, LogWriter
File ~.conda\envs\TradeMaster\lib\site-packages\qlib\rl\utils\env_wrapper.py:52
47 action_history: list
48 reward_history: list
51 class EnvWrapper(
---> 52 gym.Env[ObsType, PolicyActType],
53 Generic[InitialStateType, StateType, ActType, ObsType, PolicyActType],
54 ):
55 """Qlib-based RL environment, subclassing
gym.Env
.56 A wrapper of components, including simulator, state-interpreter, action-interpreter, reward.
57
(...)
90 Can be none when no trajectory is available.
91 """
93 simulator: Simulator[InitialStateType, StateType, ActType]
TypeError: 'type' object is not subscriptable
Note: User could run
cd scripts && python collect_info.py all
under project directory to get system informationand paste them here directly.
Windows
,Linux
,MacOS
):Additional Notes
The text was updated successfully, but these errors were encountered: