Closed cshbupt closed 5 months ago
I found that the problem results from I did not install pufferlib for neuralmmo and cleanrl completely. Previously I use "pip install pufferlib[nmmo,cleanrl]" to install and encounter error: "extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers". Now I find that this is because the setuptool (version 68+) I use is too new. After I downgrade the setuptool to version 65.5.0, I can install pufferlib[nmmo,cleanrl] completely and PolicyRanker is there for use.
Fill out as much of the below as you can. A partial bug report is better than no bug report. After submitting, link your issue on our Discord #support channel
OS: Ubuntu 22.04
Description: I follow the NeuralMMO documentation and install the environment through source by "cd environment && pip install -e .[all]". Then, I go to the baselines folder and run "python train.py --local-mode true". However, I get the error:
Traceback (most recent call last): File "/home/nmmo/baselines/train.py", line 12, in
from reinforcement_learning import clean_pufferl, policy, config
File "/home/nmmo/baselines/reinforcement_learning/clean_pufferl.py", line 43, in
class CleanPuffeRL:
File "/home/nmmo/baselines/reinforcement_learning/clean_pufferl.py", line 68, in CleanPuffeRL
policy_ranker: pufferlib.policy_ranker.PolicyRanker = None
AttributeError: module 'pufferlib.policy_ranker' has no attribute 'PolicyRanker'
It seems that the latest pufferlib.policy_ranker has no PolicyRanker. I only see the class "Ranker" instead. Also, the "clean_pufferl.py" in baselines/reinforcement_learning also uses PolicySelector and OpenSkillRanker, which cannot be found. How to resolve it? Looking forward to the reply. Thanks!