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

Agent servers support running any type of agent #135

Merged

Conversation

pan-x-c
Copy link
Collaborator

@pan-x-c pan-x-c commented Apr 2, 2024

Description

Based on #94

  1. rename RpcServerSideWrapper into AgentPlatform
  2. Simplify the setup of agent platform. Only host and port are necessary. (custom_agents is required, if using agent class written by the user)
  3. AgentPlatform is completely decoupled from Agent. Multiple different types of agents can run on the same agent platform now.
  4. RpcAgentServer now starts in an async way
  5. Deprecated the launch_server parameter in to_dist method. When the host and port are not passed in, the server will be started automatically
  6. Support using to_dist=True to initialize any AgentBase subclass to convert the agent into its distributed version
  7. Support agent nesting
  8. Add a large scale simulation example
  9. Rewrite the distributed deployment tutorial

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

@pan-x-c pan-x-c added enhancement New feature or request feature labels Apr 2, 2024
@pan-x-c pan-x-c self-assigned this Apr 2, 2024
Copy link
Collaborator

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two issues in this modification:

  1. If it's appropriate to add a new entry for distributed agent. I know directly instantiate a distributed agent object will save time, but the in this way the local mode and distributed mode are mixed.
  2. If the new entry is necessary. Please move the initialization arguments to the constructor of AgentBase class, and add kwargs to the agent classses under the library agentscope.agents.

Copy link
Collaborator

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz see inline comments, others lgtm

examples/distributed_simulation/main.py Outdated Show resolved Hide resolved
src/agentscope/agents/agent.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DavdGao DavdGao merged commit c431015 into modelscope:main Apr 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants