Update BaseEnvironment.py

Addition of action_space_type.
This commit is contained in:
Shane 2024-05-24 21:10:06 +10:00 committed by GitHub
parent 2c740059d7
commit 07fba3abb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,6 +60,7 @@ class BaseEnvironment(gym.Env):
can_short: bool = False,
pair: str = "",
df_raw: DataFrame = DataFrame(),
action_space_type: str = "Discrete"
):
"""
Initializes the training/eval environment.
@ -93,6 +94,7 @@ class BaseEnvironment(gym.Env):
self.tensorboard_metrics: dict = {}
self.can_short: bool = can_short
self.live: bool = live
self.action_space_type: str = action_space_type
if not self.live and self.add_state_info:
raise OperationalException(
"`add_state_info` is not available in backtesting. Change "