facebookresearch / facebookresearch/ReAgent
Impossible to use CNN with image observation space
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 529
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to run the example "discrete_dqn_maxq_asteroids_v0.json" in "ml/rl/test/gym". First i had the issue that there where 3 missing parameters in the json file, in particular they where "num_input_channels", "input_height" and "input_width". After I added them and run again I had this traceback:
Traceback (most recent call last):
File "ml/rl/test/gym/run_gym.py", line 912, in
`main(args[1:])`
File "ml/rl/test/gym/run_gym.py", line 707, in main
`args.path_to_pickled_transitions,`
File "ml/rl/test/gym/run_gym.py", line 769, in run_gym
`trainer = warm_trainer if warm_trainer else create_trainer(params, env)`
File "ml/rl/test/gym/run_gym.py", line 822, in create_trainer
`discrete_trainer_params, env.normalization, use_gpu`
File "/home/valerio/ReAgent/ml/rl/workflow/transitional.py", line 79, in create_dqn_trainer_from_params
`state_dim=get_num_output_features(normalization_parameters),`
File "/home/valerio/ReAgent/ml/rl/preprocessing/normalization.py", line 183, in get_num_output_features
`normalization_parameters.values(),`
AttributeError: 'NoneType' object has no attribute 'values'
The problem seems to rely in the function "normalization" in "open_ai_gym_environment.py" that returns None if the observation turns out to be an image.
Contributor guide
Research direction
Start by running ml/rl/test/gym/run_gym.py with ml/rl/test/gym/discrete_dqn_maxq_asteroids_v0.json and review the traceback. Inspect normalization in open_ai_gym_environment.py, then follow its result into ml/rl/preprocessing/normalization.py and workflow/transitional.py. Done means the CNN image-observation example no longer fails because normalization is None.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100