Open elliottower opened 1 year ago
I'm having a similar issue with VizDoom. If I run the RLlib VizDoom example with PPO, it is fine, but if I want to run DQN it tells me that the VizDoom environment doesn't exist.
I'm having a similar issue with VizDoom. If I run the RLlib VizDoom example with PPO, it is fine, but if I want to run DQN it tells me that the VizDoom environment doesn't exist.
Interesting to hear it can depend on the model, maybe I’ll try out some different models and see if that’s the issue. DQN is the case where I’m getting errors as well. Very weird that a model would have any bearing on environment loading though.
What happened + What you expected to happen
I'm having trouble loading a trained model using the PettingZoo env leduc_holdem_v4 (I'm working on updating the PettingZoo RLlib tutorials). I was able to train successfully using the train script below (reproduction scripts), and I tested training with the env registered as
leduc_holdem
as well asleduc_holdem_v4
in both files, neither worked. Running a very similar example with pistonball_v6 I registered the env as pistonball_v6 and it worked perfectly fine loading the model (will paste that code below as well).Here's the error I keep getting, I believe t's not a Gymnasium or PettingZoo error as I am able to load the environments fine. When I do a separate file only registering the PettingZoo env I get no errors, so I think it has to do with the process of loading the model with Algorithm.from_checkpoint(). Previously there was a way to specify the env when loading a checkpoint, but it looks like you can't do that anymore (I'm assuming it does that automatically from the registered environment, which worked for pistonball but not this for some reason). The only other difference between these two examples is pistonball registers the env first as a ParallelPettingZooEnv, and then in the rendering file it registers it as a regular PettingZooEnv, whereas with leduc_holdem it registers them both as PettingZooEnv.
As a side note, the pistonball script doesn't run locally with ray unless you change RLlib's ParallelPettingZooEnv file as specified in this issue: https://github.com/Farama-Foundation/PettingZoo/issues/889 (removing the return_info argument which is now deprecated).
Versions / Dependencies
Gymnasium==0.26.3 numpy==1.23.5 Pillow==9.3.0 torch==1.13.1 SuperSuit==3.6.0 ray[rllib]==2.3.0 rlcard==1.1.0 PettingZoo==1.22.3 Pillow==9.4.0 tensorflow-probability==0.19.0
Reproduction script
rllib_leduc_holdem.py: (train script)
render_rllib_leduc_holdem.py: (load script)
For context on the working example with pistonball, here is rllib_pistonball.py:
And render_rllib_pistonball.py (load script):
Issue Severity
High: It blocks me from completing my task.