jbloomAus/DecisionTransformerInterpretability

Error while sampling from new trajectories generated by LSTM model

jbloomAus opened this issue · 1 comments

https://wandb.ai/arena-ldn/PPO-MiniGrid/artifacts/trajectory/4eb3c096-8836-4d0f-973a-67685b89d0f0.gz/12e1daaebfd9c806051f

python -m src.run_decision_transformer \
    --exp_name MiniGrid-MemoryS7FixedStart-v0 \
    --trajectory_path trajectories/4eb3c096-8836-4d0f-973a-67685b89d0f0.gz \
    --d_model 128 \
    --n_heads 2 \
    --d_mlp 256 \
    --n_layers 1 \
    --learning_rate 0.0001 \
    --batch_size 128 \
    --train_epochs 5 \
    --test_epochs 1 \
    --n_ctx 23 \
    --pct_traj 1 \
    --weight_decay 0.001 \
    --seed 1 \
    --wandb_project_name DecisionTransformerInterpretability \
    --test_frequency 1000 \
    --eval_frequency 1000 \
    --eval_episodes 10 \
    --initial_rtg -1 \
    --initial_rtg 0 \
    --initial_rtg 1 \
    --prob_go_from_end 0.1 \
    --eval_max_time_steps 1000 \
    --track True
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/josephbloom/GithubRepositories/DecisionTransformerInterpretability/src/run_decision_transformer.py", line 55, in <module>
    run_decision_transformer(
  File "/Users/josephbloom/GithubRepositories/DecisionTransformerInterpretability/src/decision_transformer/runner.py", line 114, in run_decision_transformer
    model = train(
  File "/Users/josephbloom/GithubRepositories/DecisionTransformerInterpretability/src/decision_transformer/train.py", line 142, in train
    evaluate_dt_agent(
  File "/Users/josephbloom/GithubRepositories/DecisionTransformerInterpretability/src/decision_transformer/train.py", line 342, in evaluate_dt_agent
    new_obs, new_reward, terminated, truncated, info = env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/vector/vector_env.py", line 203, in step
    return self.step_wait()
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/vector/sync_vector_env.py", line 149, in step_wait
    ) = env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/wrappers/record_video.py", line 155, in step
    ) = self.env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/core.py", line 408, in step
    return self.env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/wrappers/record_episode_statistics.py", line 89, in step
    ) = self.env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/wrappers/order_enforcing.py", line 56, in step
    return self.env.step(action)
  File "/Users/josephbloom/miniforge3/envs/decision_transformer_interpretability/lib/python3.10/site-packages/gymnasium/wrappers/env_checker.py", line 49, in step
    return self.env.step(action)
  File "/Users/josephbloom/GithubRepositories/DecisionTransformerInterpretability/src/environments/memory.py", line 167, in step
    if action == Actions.pickup:
RuntimeError: Boolean value of Tensor with more than one value is ambiguous

We introduced some bugs in a merge. They are fixed now.