I would like to expose additional parameters from the simulation environment, similar to the reward function parameters in the standard deepracer setup. Is there an easy way to achieve this, for example, by putting all the reward function parameters into the info part of the rl_coach_obs?
If the functionality is not there, could you please point me to a suitable place in the codebase of the docker container where I could add the parameters? I assume that that this would be somewhere in /opt/amazon/install/sagemaker_rl_agent/lib/python3.6/site-packages/markov/ .
I understand that this data would only be available during training and not during evaluation.
You’ll have to do a few steps as we didn’t work on making the interface easily accessible.
You can replace this file in the docker with any file you want. It should contain a valid reward function. /opt/ml/code/custom_files/agent/customer_reward_function.py
Then rebuild the release docker after adding your custom file and then run the original entrypoint file like so.
FROM aicrowd/base-images:deepracer_round2_release
COPY ./customer_reward_function.py /opt/ml/code/custom_files/agent/
ENTRYPOINT ["/opt/ml/code/entrypoint.sh"]
changing customer_reward_function.py would simply change the
reward. However, I would like to expose the actual params to the code
running outside of the docker container.
Consider the minimal example below
env = gym.make('deepracer_gym:deepracer-v0')
obs = env.reset()
for i in range(500):
observation, reward, done, info = env.step(np.random.randint(5))
I would like to get the full params dictionary, like x and y position
of the car and its heading. Currently, info is empty.