-
I'm trying to create a custom tf-agents environment for trading. When I try to validate it by calling utils.validate_py_environment(environment, episodes=1), I'm getting a ValueError 'time_step' doesn't match 'time_step_spec' . I've been trying to spot the difference for a while now but I can't seem to find it. Am I missing something? Observation Action Spec `self._action_spec = array_spec.BoundedArraySpec( #representation of the enviroment: price + open position state The Error Message `--------------------------------------------------------------------------- /usr/local/lib/python3.7/dist-packages/tf_agents/environments/utils.py in ValueError: Given time_step: TimeStep( does not match expected time_step_spec: TimeStep( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The observation is a vector not just a scalar. |
Beta Was this translation helpful? Give feedback.
observation': array([584.95, 582.3 , 581.7 , 582.6 , 582.9 , 584.65], dtype=float32),
vs
'observation': BoundedArraySpec(shape=(), dtype=dtype('float32'),
The observation is a vector not just a scalar.