interpreting-rl-behavior / interpreting-rl-behavior.github.io

Code for the site https://interpreting-rl-behavior.github.io/
Creative Commons Attribution 4.0 International
0 stars 0 forks source link

Generate data from hx-PCA direction saliency functions and use them to interpret #26

Closed leesharkey closed 2 years ago

leesharkey commented 2 years ago

I've done this, so I'm closing it. It happens to be a lot of data because every direction requires a new gradient calc, which adds grads data for obs, env_hx, agent_hx. I think I'll upload a new recorded_informinit directory containing the grads if there's demand for it (let me know). Alternatively you could calculate a few locally if you only want them for development purposes (i.e. not for doing actual interpretation) by running the saliency_exps.py script. I used the args:

--distribution_mode=hard --agent_file="/home/lee/Documents/AI_ML_neur_projects/aisc_project/train-procgen-pytorch/logs/procgen/coinrun/trainhx_1Mlvls/seed_498_07-06-2021_23-26-27/model_80412672.pth" --model_file="/home/lee/Documents/AI_ML_neur_projects/aisc_project/train-procgen-pytorch/generative/results/coinrun_final_cont2/20210830_133531/model_epoch0_batch350000.pt" --batch_size=2 --num_sim_steps=28 --saliency_func_type hx_direction --sample_ids 0 to 200 --saliency_direction_idx 1