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

Enable editable scenarios #7

Merged
merged 19 commits into from
Aug 20, 2024
Merged

Enable editable scenarios #7

merged 19 commits into from
Aug 20, 2024

Conversation

bugsz
Copy link
Collaborator

@bugsz bugsz commented Aug 13, 2024

The same as #6, but in a new branch name.
The first commit addresses #3, and the following commits address #4

Btw whether the scenario is editable does not relate to the omniscient? (i.e. we can still only show partial information while making the scenario editable?)

@bugsz bugsz requested a review from XuhuiZhou August 13, 2024 19:14
@XuhuiZhou
Copy link
Member

Good point! This is just a feature that I am suggesting. Cuz once people want to edit things, that usually implies they want full control. This is basically making things easier to handle.

Copy link
Member

@XuhuiZhou XuhuiZhou left a comment

Choose a reason for hiding this comment

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

image
Some meta-comments:

  • Instead of listing the "create your own scenario" on the side bar. Create a button on the above to with text like "editable", once it is selected, all the things become editable and goals become omniscient
  • Put scenario in a single row, besides just listing the codename, include a few tokens of the scenario, so people could have a preview of the scenario before choing them
  • Allow choose models for each agent, include a special human model, which would require human input. If all models are not humans, then we do normal sotopia simulation.

@XuhuiZhou
Copy link
Member

@bugsz thanks for the update, some new feedback
Screenshot 2024-08-14 at 12 14 49 PM

@bugsz
Copy link
Collaborator Author

bugsz commented Aug 15, 2024

Still in progress..
Currently support the flexible choice of agents (including human-human and model-model interaction)

@bugsz
Copy link
Collaborator Author

bugsz commented Aug 16, 2024

A bit strange behavior on my end:
Now I can edit the scenario and agent bg. I can see the change reflected in the environment (and also in LLMAgent.inbox). But I did not see the conversation change as expected (for example, I make one agent to be giselle does not want to talk but the conversation is still long. @XuhuiZhou Is it possible for you to see what's happening?

@XuhuiZhou
Copy link
Member

A bit strange behavior on my end: Now I can edit the scenario and agent bg. I can see the change reflected in the environment (and also in LLMAgent.inbox). But I did not see the conversation change as expected (for example, I make one agent to be giselle does not want to talk but the conversation is still long. @XuhuiZhou Is it possible for you to see what's happening?
Try debugging by outputting the agent prompt?

@bugsz bugsz requested a review from XuhuiZhou August 19, 2024 18:05
Copy link
Member

@XuhuiZhou XuhuiZhou left a comment

Choose a reason for hiding this comment

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

Thanks for the efforts, I left some comments but for the sake of moving fast. I will let you decide what to merge.

set_from_env_agent_profile_combo(env_agent_combo=env_agent_combo, reset_msgs=False)


from sotopia.database import EpisodeLog
Copy link
Member

Choose a reason for hiding this comment

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

move this to the top

rewards=rewards,
rewards_prompt="",
)
from socialstream.rendering_utils import render_messages
Copy link
Member

Choose a reason for hiding this comment

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

move this?

message_list = [message.replace("**", "") for message in message_list]
return "\n".join(message_list)

# print(epilog.render_for_humans())
Copy link
Member

Choose a reason for hiding this comment

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

remove this

return agent_profile_to_secret_info(profile, display_name=display_name)


def _agent_profile_to_friendabove_self(
Copy link
Member

Choose a reason for hiding this comment

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

why we are re-writing this?

return agent_to_render


def render_messages(
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be in the rendering folder?

Copy link
Member

Choose a reason for hiding this comment

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

qq, isn't chat_omniscient kind of replicating a lot of features in chat.py? Can we combine them?

@XuhuiZhou
Copy link
Member

XuhuiZhou commented Aug 20, 2024

Also, I notice that we use the callback functions. Any chance you can update the readme to introduce/explain that concept?
@bugsz

@bugsz
Copy link
Collaborator Author

bugsz commented Aug 20, 2024

@XuhuiZhou I think ready to merge!

@XuhuiZhou XuhuiZhou merged commit 0acec4f into main Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants