-
Notifications
You must be signed in to change notification settings - Fork 113
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
feature(zjow): add agent class to support LightZero's HuggingFace Model Zoo #163
Conversation
gradient_logger=False, video_logger=False, plot_logger=False, action_logger=False, return_logger=False | ||
), | ||
), | ||
create_config=dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的config是专门用于新写的 muzero class的config吗?以后所有的config相当于都需要再这里重写一份,应该可以写一个转换函数,把LZ原来的config转换成这里需要格式的config,然后就可以避免冗余代码了吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我不太推荐写个转换函数,最好是代码里写的就是Agent load的,这样比较直接。(以后如果不用这一些config了,删了就算废弃了,不会牵扯到其它组件。)(如果写转换函数的话,我对未来的兼容性承诺保持怀疑。而且不易读。)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的哈
from lzero.mcts import MuZeroGameBuffer | ||
|
||
|
||
class MuZeroAgent: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里MuZeroAgent 应该是支持我们LZ原来的所有Muzero系列算法吧?感觉之后只需要为AlphaZero再单写一个AlphaZeroAgent应该就可以了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以使用GPT4和这里的提示词 https://aicarrier.feishu.cn/wiki/N4bqwLRO5iyQcAkb4HCcflbgnpR 【优化注释格式】 为整个class添加详细的overview格式的注释哈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“这里MuZeroAgent 应该是支持我们LZ原来的所有Muzero系列算法吧?”
是的。
lzero/agent/muzero.py
Outdated
""" | ||
Overview: | ||
Agent class for execution MuZero algorithms. It includes train, deploy, batch_evaluate methods. | ||
Interface: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加一下说明,这个agent类主要是为了方便用于 HuggingFace Model Zoo for LightZero 相关的 "train, deploy"这些操作?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经加好了哈
This pull request adds class Agent for LightZero, which enables training or deploying as an agent. It allows model checkpoints to be push to or pull from Huggingface by using Huggingface_ding.