DI-engine icon indicating copy to clipboard operation
DI-engine copied to clipboard

pettingzoo报错,并且只支持‘simple_spread_v2’。请问什么时候支持其他的呢

Open 670555467 opened this issue 1 year ago • 6 comments

  • [ ] I have marked all applicable categories:
    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc
  • [ ] I have searched through the issue tracker and pr tracker
  • [ ] I have mentioned version numbers, operating system and environment, where applicable:
    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

670555467 avatar Oct 08 '24 13:10 670555467

并且这里面都有对应的main文件,只有config文件

670555467 avatar Oct 08 '24 14:10 670555467

  • [ ] I have marked all applicable categories:

    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc

  • [ ] I have searched through the issue tracker and pr tracker

  • [ ] I have mentioned version numbers, operating system and environment, where applicable:

    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

请问你运行的具体是哪一个 config 文件呢?而且这里的 config 文件都是可以直接运行的呀,比如 QMIX 的 demo,这里就调用了默认的serial_pipeline入口函数来运行整个程序。

对于环境支持问题,你需要使用 petting zoo 的具体什么其他环境呢,我们可以近期安排更新支持一下。

PaParaZz1 avatar Oct 10 '24 05:10 PaParaZz1

  • [ ] I have marked all applicable categories:

    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc

  • [ ] I have searched through the issue tracker and pr tracker

  • [ ] I have mentioned version numbers, operating system and environment, where applicable:

    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

请问你运行的具体是哪一个 config 文件呢?而且这里的 config 文件都是可以直接运行的呀,比如 QMIX 的 demo,这里就调用了默认的serial_pipeline入口函数来运行整个程序。

对于环境支持问题,你需要使用 petting zoo 的具体什么其他环境呢,我们可以近期安排更新支持一下。

你好,感谢回复!现在可以运行了,就是想问下多智能体算法能否支持智能体的观测维度和动作维度都不一致的情况呢,大概需要多久完成呢,谢谢

670555467 avatar Oct 12 '24 12:10 670555467

  • [ ] I have marked all applicable categories:

    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc

  • [ ] I have searched through the issue tracker and pr tracker

  • [ ] I have mentioned version numbers, operating system and environment, where applicable:

    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

请问你运行的具体是哪一个 config 文件呢?而且这里的 config 文件都是可以直接运行的呀,比如 QMIX 的 demo,这里就调用了默认的serial_pipeline入口函数来运行整个程序。

对于环境支持问题,你需要使用 petting zoo 的具体什么其他环境呢,我们可以近期安排更新支持一下。

另外,我感觉提供一个新环境的例子对新手比较友好。

670555467 avatar Oct 12 '24 13:10 670555467

  • [ ] I have marked all applicable categories:

    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc

  • [ ] I have searched through the issue tracker and pr tracker

  • [ ] I have mentioned version numbers, operating system and environment, where applicable:

    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

请问你运行的具体是哪一个 config 文件呢?而且这里的 config 文件都是可以直接运行的呀,比如 QMIX 的 demo,这里就调用了默认的serial_pipeline入口函数来运行整个程序。 对于环境支持问题,你需要使用 petting zoo 的具体什么其他环境呢,我们可以近期安排更新支持一下。

你好,感谢回复!现在可以运行了,就是想问下多智能体算法能否支持智能体的观测维度和动作维度都不一致的情况呢,大概需要多久完成呢,谢谢

整体框架是支持的,需要一些小的修改,具体思路有两种

  1. 把各个智能体的 obs 和 act 都padding到最大维度,然后对应添加一个mask变量,在环境中修改相关代码即可,obs返回三部分{'padded_obs': xxx, 'obs_mask': xxx, 'act_mask': xxx}
  2. 环境直接返回原始的不一致的obs(以dict形式,每个key是智能体的id),修改神经网络部分(即model),自定义建模不同维度的逻辑。策略和整个训练 pipeline 部分不用做什么修改。

PaParaZz1 avatar Oct 17 '24 08:10 PaParaZz1

  • [ ] I have marked all applicable categories:

    • [ ] exception-raising bug
    • [ ] RL algorithm bug
    • [ ] system worker bug
    • [ ] system utils bug
    • [ ] code design/refactor
    • [ ] documentation request
    • [ ] new feature request
  • [ ] I have visited the readme and doc

  • [ ] I have searched through the issue tracker and pr tracker

  • [ ] I have mentioned version numbers, operating system and environment, where applicable:

    import ding, torch, sys
    print(ding.__version__, torch.__version__, sys.version, sys.platform)
    

运行会提示下面的错误:KeyError: 'not support buildable-object type: subprocess'

请问你运行的具体是哪一个 config 文件呢?而且这里的 config 文件都是可以直接运行的呀,比如 QMIX 的 demo,这里就调用了默认的serial_pipeline入口函数来运行整个程序。 对于环境支持问题,你需要使用 petting zoo 的具体什么其他环境呢,我们可以近期安排更新支持一下。

另外,我感觉提供一个新环境的例子对新手比较友好。

这部分内容是有的:

  • 首先,关于如何添加新环境的最佳实践文档
  • 其次,dizoo 中有非常多的环境示例,你可以找找靠类似你正在研究问题的环境,以其为模板来定制你的环境

如果你有其他问题和需求,可以继续在 issue 中提问,如有必要我们可以新增更多的例子

PaParaZz1 avatar Oct 17 '24 08:10 PaParaZz1

新支持环境的例子已经在这个 PR 中完成(#833),使用 DI-engine 中的 QMIX 算法能够取得很好的收敛效果。

PaParaZz1 avatar Nov 25 '24 06:11 PaParaZz1