How to disable flattened Dict or Tuple observation in ComplexInputNetwork

I got the same error, its because of the discrete obs_space. I changed it to box aswell and that helped. The reason is that discrete(7) will be preprocessed with the “OneHotPreprocessor” to 7 values, and a box value is just flattend (if its more than 1-dimensional) and stays 1.

For @sven1977 or someone from ray:
The problem is in modelv2.py in “def _unpack_obs(line 385)”, bc the given “obs” variable doesn’t contain the right preprocessed obs_space. As i saw it, during my debugging, discrete values were only counted by 1(in catalogy.py, “get_action_shape”, used in “get_action_placeholder” line 303f) not by their one-hot encoded number.