Skip to content

Commit

Permalink
support lower redis version and link to fit tiger needs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwaekfjlk committed Nov 21, 2023
1 parent 64f7cf9 commit 2074a15
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions data_generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ Since the redis-server cannot directly input json data, it requires loading a Re
docker run -p 6379:6379 --name redis-stack redis/redis-stack:latest

Link: <https://github.com/RedisJSON/RedisJSON>



### Redis Version Issue

The default version for redis could be 7.2.x. However, to deploy it on tiger, we need to use the 6.2.x version of redis. Therefore, the command line could be:

`docker run -p 6379:6379 --name redis-stack-old redis/redis-stack:6.2.6-v10` instead of using latest.
4 changes: 2 additions & 2 deletions data_generate/step2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python step2_push_agent_relationship_env_to_db.py ./env_filtered.csv environment
python step2_push_agent_relationship_env_to_db.py ./env_filtered_scenario_unique_social_goal_reasonable_different_from_testset_part1.csv environment
python step2_push_agent_relationship_env_to_db.py ./AgentProfile.csv agent
python step2_push_agent_relationship_env_to_db.py ./RelationshipProfile.csv relationship
python step2_push_agent_relationship_env_to_db.py ./env_filtered.csv agentenvcombo
python step2_push_agent_relationship_env_to_db.py ./env_filtered_scenario_unique_social_goal_reasonable_different_from_testset_part1.csv agentenvcombo
5 changes: 4 additions & 1 deletion data_generate/step2_push_agent_relationship_env_to_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from sotopia.messages import AgentAction, Observation
from sotopia.agents import LLMAgent

agent_env_combo_num = 0


def add_agent_to_database(**kwargs: dict[str, Any]) -> None:
Expand Down Expand Up @@ -91,7 +92,9 @@ def sample_env_agent_combo_and_push_to_db(env_id: str) -> None:
)
except:
return
print(len(env_agent_combo_list))
global agent_env_combo_num
agent_env_combo_num += len(env_agent_combo_list)
print(agent_env_combo_num)
for env, agent in env_agent_combo_list:
EnvAgentComboStorage(
env_id=env.profile.pk,
Expand Down

0 comments on commit 2074a15

Please sign in to comment.