mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-19 06:11:15 +00:00
fix action_masks typing list
This commit is contained in:
@@ -2,7 +2,7 @@ import logging
|
|||||||
import random
|
import random
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Optional, Type, Union
|
from typing import List, Optional, Type, Union
|
||||||
|
|
||||||
import gymnasium as gym
|
import gymnasium as gym
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -141,7 +141,7 @@ class BaseEnvironment(gym.Env):
|
|||||||
Unique to the environment action count. Must be inherited.
|
Unique to the environment action count. Must be inherited.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def action_masks(self) -> list[bool]:
|
def action_masks(self) -> List[bool]:
|
||||||
return [self._is_valid(action.value) for action in self.actions]
|
return [self._is_valid(action.value) for action in self.actions]
|
||||||
|
|
||||||
def seed(self, seed: int = 1):
|
def seed(self, seed: int = 1):
|
||||||
|
|||||||
Reference in New Issue
Block a user