pycityagent 2.0.0a56__cp312-cp312-macosx_11_0_arm64.whl → 2.0.0a57__cp312-cp312-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycityagent/environment/simulator.py +4 -1
- pycityagent/simulation/agentgroup.py +1 -0
- pycityagent/simulation/simulation.py +9 -3
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/METADATA +1 -1
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/RECORD +9 -9
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a56.dist-info → pycityagent-2.0.0a57.dist-info}/top_level.txt +0 -0
@@ -52,6 +52,8 @@ class Simulator:
|
|
52
52
|
f.write(_map_pb.SerializeToString())
|
53
53
|
|
54
54
|
if "simulator" in config:
|
55
|
+
if config["simulator"] is None:
|
56
|
+
config["simulator"] = {}
|
55
57
|
if "server" not in config["simulator"]:
|
56
58
|
self._sim_env = sim_env = ControlSimEnv(
|
57
59
|
task_name=config["simulator"].get("task", "citysim"),
|
@@ -62,7 +64,7 @@ class Simulator:
|
|
62
64
|
min_step_time=config["simulator"].get("min_step_time", 1000),
|
63
65
|
sim_addr=config["simulator"].get("server", None),
|
64
66
|
)
|
65
|
-
|
67
|
+
self.server_addr = sim_env.sim_addr
|
66
68
|
# using local client
|
67
69
|
self._client = CityClient(sim_env.sim_addr, secure=False)
|
68
70
|
"""
|
@@ -75,6 +77,7 @@ class Simulator:
|
|
75
77
|
)
|
76
78
|
self._client = CityClient(config["simulator"]["server"], secure=False)
|
77
79
|
else:
|
80
|
+
self.server_addr = None
|
78
81
|
logger.warning(
|
79
82
|
"No simulator config found, no simulator client will be used"
|
80
83
|
)
|
@@ -87,6 +87,7 @@ class AgentGroup:
|
|
87
87
|
logger.info(f"-----Creating Mlflow client in AgentGroup {self._uuid} ...")
|
88
88
|
self.mlflow_client = MlflowClient(
|
89
89
|
config=_mlflow_config,
|
90
|
+
experiment_uuid=self.exp_id, # type:ignore
|
90
91
|
mlflow_run_name=f"{exp_name}_{1000*int(time.time())}",
|
91
92
|
experiment_name=exp_name,
|
92
93
|
run_id=mlflow_run_id,
|
@@ -84,18 +84,24 @@ class AgentSimulation:
|
|
84
84
|
self.exp_name = exp_name
|
85
85
|
self._simulator = Simulator(config["simulator_request"])
|
86
86
|
if enable_economy:
|
87
|
-
self.
|
87
|
+
self._economy_addr = economy_addr = self._simulator.server_addr
|
88
|
+
if economy_addr is None:
|
89
|
+
raise ValueError(
|
90
|
+
f"`simulator` not provided in `simulator_request`, thus unable to activate economy!"
|
91
|
+
)
|
88
92
|
_req_dict: dict = self.config["simulator_request"]
|
89
93
|
if "economy" in _req_dict:
|
94
|
+
if _req_dict["economy"] is None:
|
95
|
+
_req_dict["economy"] = {}
|
90
96
|
if "server" in _req_dict["economy"]:
|
91
97
|
raise ValueError(
|
92
98
|
f"Passing Economy Simulation address is not supported!"
|
93
99
|
)
|
94
100
|
else:
|
95
|
-
_req_dict["economy"]["server"] =
|
101
|
+
_req_dict["economy"]["server"] = economy_addr
|
96
102
|
else:
|
97
103
|
_req_dict["economy"] = {
|
98
|
-
"server":
|
104
|
+
"server": economy_addr,
|
99
105
|
}
|
100
106
|
self.agent_prefix = agent_prefix
|
101
107
|
self._groups: dict[str, AgentGroup] = {} # type:ignore
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a57
|
4
4
|
Summary: LLM-based city environment agent building library
|
5
5
|
Author-email: Yuwei Yan <pinkgranite86@gmail.com>, Junbo Yan <yanjb20thu@gmali.com>, Jun Zhang <zhangjun990222@gmali.com>
|
6
6
|
License: MIT License
|
@@ -22,9 +22,9 @@ pycityagent/memory/utils.py,sha256=oJWLdPeJy_jcdKcDTo9JAH9kDZhqjoQhhv_zT9qWC0w,8
|
|
22
22
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
23
23
|
pycityagent/memory/faiss_query.py,sha256=V3rIw6d1_xcpNqZBbAYz3qfjVNE7NfJ7xOS5SibPtVU,13180
|
24
24
|
pycityagent/memory/state.py,sha256=TYItiyDtehMEQaSBN7PpNrnNxdDM5jGppr9R9Ufv3kA,5134
|
25
|
-
pycityagent/simulation/simulation.py,sha256=
|
25
|
+
pycityagent/simulation/simulation.py,sha256=XOhHYx4zvDv6zgPBagY9Ao109wSZPSbdCH-amsw2pHo,33441
|
26
26
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
27
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
27
|
+
pycityagent/simulation/agentgroup.py,sha256=UnWUQ3Ev4qDQCOasb-EN08aUQi4SWHmM6aNSdBc850Q,31693
|
28
28
|
pycityagent/simulation/storage/pg.py,sha256=xRshSOGttW-p0re0fNBOjOpb-nQ5msIE2LsdT79_E_Y,8425
|
29
29
|
pycityagent/message/message_interceptor.py,sha256=w8XTyZStQtMjILpeAX3VMhAWcYAuaxCgSMwXQU1OryM,8951
|
30
30
|
pycityagent/message/__init__.py,sha256=f5QH7DKPqEAMyfSlBMnl3uouOKlsoel909STlIe7nUk,276
|
@@ -47,7 +47,7 @@ pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42n
|
|
47
47
|
pycityagent/workflow/block.py,sha256=4QufS8XnyP6SYp8g1gDODW-H0nAHA7lvivrPGUq1p-w,9922
|
48
48
|
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
49
49
|
pycityagent/environment/__init__.py,sha256=MyZBwsweDIHOKSX2iSZs748foNtaiyEcyg6sc747T2g,263
|
50
|
-
pycityagent/environment/simulator.py,sha256=
|
50
|
+
pycityagent/environment/simulator.py,sha256=d2meQZewFFSvUZa7BkgCHgOkhFf6G_TQyIz_QBFgDI0,12437
|
51
51
|
pycityagent/environment/message/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
pycityagent/environment/utils/port.py,sha256=3OM6kSUt3PxvDUOlgyiendBtETaWU8Mzk_8H0TzTmYg,295
|
53
53
|
pycityagent/environment/utils/grpc.py,sha256=6EJwKXXktIWb1NcUiJzIRmfrY0S03QAXXGcCDHqAT00,1998
|
@@ -97,9 +97,9 @@ pycityagent/cityagent/blocks/mobility_block.py,sha256=xWbARMfJ3-6fddrW3VOUKJrXfM
|
|
97
97
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
98
98
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
99
99
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
100
|
-
pycityagent-2.0.
|
101
|
-
pycityagent-2.0.
|
102
|
-
pycityagent-2.0.
|
103
|
-
pycityagent-2.0.
|
104
|
-
pycityagent-2.0.
|
105
|
-
pycityagent-2.0.
|
100
|
+
pycityagent-2.0.0a57.dist-info/RECORD,,
|
101
|
+
pycityagent-2.0.0a57.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
102
|
+
pycityagent-2.0.0a57.dist-info/WHEEL,sha256=VujM3ypTCyUW6hcTDdK2ej0ARVMxlU1Djlh_zWnDgqk,109
|
103
|
+
pycityagent-2.0.0a57.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
104
|
+
pycityagent-2.0.0a57.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
105
|
+
pycityagent-2.0.0a57.dist-info/METADATA,sha256=yn1syqalcmvcSdrXMOmcXa7Cj3-IHDE4AIL20UvDaEs,9110
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|