Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLlib] TypeError with latest Pettingzoo version (unexpected keyword argument 'return_info') #35394

Closed
george-skal opened this issue May 16, 2023 · 1 comment
Assignees
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks rllib RLlib related issues rllib-env rllib env related issues

Comments

@george-skal
Copy link

george-skal commented May 16, 2023

What happened + What you expected to happen

Hi, I am running a parameter sharing waterworld example and also MPE examples with latest Pettingzoo and Supersuit and I cannot use older versions, since there are bug fixes on Simple Spread. I get the the same TypeError on all. On windows:

TypeError: reset() got an unexpected keyword argument 'return_info'

and on Ubuntu:

TypeError: OrderEnforcingWrapper.reset() got an unexpected keyword argument 'return_info'

Please find attched the error file.
error.txt

Thanks,
George

Versions / Dependencies

Ray 2.4.0
Pettingzoo 1.23.0
Supersuit 3.8.0
Pytorch 1.13.1

Reproduction script

from ray import air, tune
from ray.rllib.algorithms.ppo import PPOConfig
from ray.tune.registry import register_env
from ray.rllib.env.wrappers.pettingzoo_env import PettingZooEnv
from pettingzoo.sisl import waterworld_v4

if __name__ == "__main__":
    def env_creator(args):
        return PettingZooEnv(waterworld_v4.env(n_pursuers=5, n_evaders=5, n_coop=2))


    env = env_creator({})
    register_env("waterworld", env_creator)

    obs_space = env.observation_space
    act_spc = env.action_space

    policies = {"shared_policy_1": (None, obs_space, act_spc, {})
                }


    def policy_mapping_fn(agent_id, episode, worker, **kwargs):
        return "shared_policy_1"


    config = (
        PPOConfig()
            .environment("waterworld")
            .resources(num_gpus=1, num_cpus_for_local_worker=2)
            .rollouts(num_rollout_workers=4)  # default = 2 (I should try it)
            .framework("torch")
            .multi_agent(
            policies=policies,
            policy_mapping_fn=policy_mapping_fn,
        )
    )

    tune.Tuner(
        "PPO",
        run_config=air.RunConfig(
            name="PPO shared waterworld_v4 ncoop=2 test trial 1",
            stop={"training_iteration": 1500},
            checkpoint_config=air.CheckpointConfig(
                checkpoint_frequency=10,
            ),
        ),
        param_space=config.to_dict(),
    ).fit()

Issue Severity

High: It blocks me from completing my task.

@george-skal george-skal added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels May 16, 2023
@Rohan138 Rohan138 added P1 Issue that should be fixed within a few weeks rllib RLlib related issues rllib-env rllib env related issues and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels May 19, 2023
@Rohan138 Rohan138 self-assigned this May 19, 2023
@Rohan138
Copy link
Contributor

Rohan138 commented May 19, 2023

Currently RLlib is pinned to gymnasium==0.26.3 and is only compatible to the corresponding pettingzoo and supersuit versions; this will be fixed by #34696. Duplicate of #32889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks rllib RLlib related issues rllib-env rllib env related issues
Projects
None yet
Development

No branches or pull requests

2 participants