You may want to look into the data stored by the Episode object.
You can access the data stored by this object in on_episode_step and on_episode_end in a callback that inherits from DefaultCallbacks. See this for an example.
Thank you @bmanczak for your help.
The problem is that this data is stored inside the model and that is the data I want to print out.
Is there any way to access the model from Episode? I had a quick look to Episode definition in:
Hey @mg64ve , could you post a short repro script here so we can run something and debug?
I’m not sure I understand what you are trying to print out. The key “obs_prev_actions” in the input dicts does not exist in RLlib. “prev_actions” and “prev_rewards” will be available if you set:
Hi @sven1977 you are right I made some confusion with variables. But concept is the same.
I have prepared the following example:
It is taken from the official FrameStacking example. The concept is that I want to print some variable in the model class. In this case it is input_dict[“prev_n_obs”].
This notebook fails with error:
AttributeError: 'Episode' object has no attribute 'input_dict'
The input_dict is not a member of of the policy it if a parameter of the forward function. The most straight forward way if you just want to see what they look would be to add a print statement in the code there or add a breakpoint and debug interactively.