pycityagent 2.0.0a97__cp39-cp39-macosx_11_0_arm64.whl → 2.0.0a98__cp39-cp39-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycityagent/agent/agent_base.py +2 -2
- pycityagent/simulation/agentgroup.py +3 -5
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/METADATA +1 -1
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/RECORD +8 -8
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a97.dist-info → pycityagent-2.0.0a98.dist-info}/top_level.txt +0 -0
pycityagent/agent/agent_base.py
CHANGED
@@ -245,12 +245,12 @@ class Agent(ABC):
|
|
245
245
|
config = json.load(f)
|
246
246
|
return cls.import_block_config(config)
|
247
247
|
|
248
|
-
def load_from_config(self, config: dict[str,
|
248
|
+
def load_from_config(self, config: dict[str, Any]) -> None:
|
249
249
|
"""
|
250
250
|
Update the current Agent instance's Block hierarchy using the provided configuration.
|
251
251
|
|
252
252
|
- **Args**:
|
253
|
-
- `config` (`dict[str,
|
253
|
+
- `config` (`dict[str, Any]`): A dictionary containing the configuration for updating the agent and its blocks.
|
254
254
|
|
255
255
|
- **Returns**:
|
256
256
|
- `None`
|
@@ -47,7 +47,7 @@ class AgentGroup:
|
|
47
47
|
mlflow_run_id: str,
|
48
48
|
embedding_model: Embeddings,
|
49
49
|
logging_level: int,
|
50
|
-
agent_config_file: Optional[dict[type[Agent],
|
50
|
+
agent_config_file: Optional[dict[type[Agent], Any]] = None,
|
51
51
|
llm_semaphore: int = 200,
|
52
52
|
environment: Optional[dict] = None,
|
53
53
|
):
|
@@ -76,7 +76,7 @@ class AgentGroup:
|
|
76
76
|
- `mlflow_run_id` (str): Run identifier for MLflow tracking.
|
77
77
|
- `embedding_model` (Embeddings): Model used for generating embeddings.
|
78
78
|
- `logging_level` (int): Logging level for the agent group.
|
79
|
-
- `agent_config_file` (Optional[Dict[Type[Agent],
|
79
|
+
- `agent_config_file` (Optional[Dict[Type[Agent], Any]], optional): File paths for loading agent configurations. Defaults to None.
|
80
80
|
- `environment` (Optional[Dict[str, str]], optional): Environment variables for the simulator. Defaults to None.
|
81
81
|
"""
|
82
82
|
logger.setLevel(logging_level)
|
@@ -105,8 +105,6 @@ class AgentGroup:
|
|
105
105
|
"status": self.avro_path / f"status.avro",
|
106
106
|
"survey": self.avro_path / f"survey.avro",
|
107
107
|
}
|
108
|
-
if self.enable_pgsql:
|
109
|
-
pass
|
110
108
|
# Mlflow
|
111
109
|
metric_config = config.prop_metric_request
|
112
110
|
if metric_config is not None and metric_config.mlflow is not None:
|
@@ -147,7 +145,7 @@ class AgentGroup:
|
|
147
145
|
# prepare Simulator
|
148
146
|
logger.info(f"-----Initializing Simulator in AgentGroup {self._uuid} ...")
|
149
147
|
self.simulator = Simulator(config)
|
150
|
-
self.simulator.set_environment(environment)
|
148
|
+
self.simulator.set_environment(environment if environment else {})
|
151
149
|
self.simulator.set_map(map_ref)
|
152
150
|
self.projector = pyproj.Proj(
|
153
151
|
ray.get(self.simulator.map.get_projector.remote()) # type:ignore
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a98
|
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
|
@@ -1,9 +1,3 @@
|
|
1
|
-
pycityagent-2.0.0a97.dist-info/RECORD,,
|
2
|
-
pycityagent-2.0.0a97.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
3
|
-
pycityagent-2.0.0a97.dist-info/WHEEL,sha256=md3JO_ifs5j508p3TDNMgtQVtnQblpGEt_Wo4W56l8Y,107
|
4
|
-
pycityagent-2.0.0a97.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
5
|
-
pycityagent-2.0.0a97.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
6
|
-
pycityagent-2.0.0a97.dist-info/METADATA,sha256=M8Yf50T1rDcPjB8_SoCuFSONew2E-mMI-D-Y2aomCbo,8657
|
7
1
|
pycityagent/pycityagent-sim,sha256=_xsIrY1raLYagebaymahAZc2YSustRmQM2jm1B4p27U,36972738
|
8
2
|
pycityagent/__init__.py,sha256=PUKWTXc-xdMG7px8oTNclodsILUgypANj2Z647sY63k,808
|
9
3
|
pycityagent/pycityagent-ui,sha256=Ur95yZygIaZ5l_CDqP9394M5GQ66iV5PkcNPYFWqzvk,41225346
|
@@ -26,7 +20,7 @@ pycityagent/memory/faiss_query.py,sha256=KPeyzIjD0dzkxr-TlOeCiIlkdh1WAyyipCAXUEt
|
|
26
20
|
pycityagent/memory/state.py,sha256=JFCBuK1AS-HqscvdGS9ATF9AUU8t29_2leDY_6iO2_4,5158
|
27
21
|
pycityagent/simulation/simulation.py,sha256=YPRzB7wCL-K85W3hgvBWukefyEgZXZCi4egH6rZa6XA,47099
|
28
22
|
pycityagent/simulation/__init__.py,sha256=u1WpgwVxPboXWMxrUQKMXJNmTKQYAeCaqZv9HmSxESY,118
|
29
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
23
|
+
pycityagent/simulation/agentgroup.py,sha256=lCz1Ruuz1TtuwzCnRVSPROey7FaXObiQmvNpv3lnzZw,36790
|
30
24
|
pycityagent/simulation/storage/pg.py,sha256=xRshSOGttW-p0re0fNBOjOpb-nQ5msIE2LsdT79_E_Y,8425
|
31
25
|
pycityagent/message/message_interceptor.py,sha256=Z7I1vqs4BrKadPAtQi-nfbkgboBAflXDSIcbIpDAxB8,17777
|
32
26
|
pycityagent/message/__init__.py,sha256=f5QH7DKPqEAMyfSlBMnl3uouOKlsoel909STlIe7nUk,276
|
@@ -41,7 +35,7 @@ pycityagent/utils/parsers/__init__.py,sha256=AN2xgiPxszWK4rpX7zrqRsqNwfGF3WnCA5-
|
|
41
35
|
pycityagent/utils/parsers/code_block_parser.py,sha256=jy6wHx9zypvJTWneCKuUaLQL19d4yLK6C_awc7y8A-k,1179
|
42
36
|
pycityagent/utils/parsers/parser_base.py,sha256=ZbqRcqOBL9hfHVZSltQSQmJnWrtuJS9aYeOJU-FlJ0E,1725
|
43
37
|
pycityagent/utils/parsers/json_parser.py,sha256=sakKohUuMcUH2toR85CAG_37D02ZoAn6LlzLgftUjmo,2923
|
44
|
-
pycityagent/agent/agent_base.py,sha256=
|
38
|
+
pycityagent/agent/agent_base.py,sha256=jYatA3gxdJTRRqvtcKBABD7NywwhlV18qUDnUiw8qRM,39238
|
45
39
|
pycityagent/agent/__init__.py,sha256=U20yKu9QwSqAx_PHk5JwipfODkDfxONtumVfnsKjWFg,180
|
46
40
|
pycityagent/agent/agent.py,sha256=zJs09Tzz53av59SzmrlJj6Yd-XId6voCYaxguLbbq3s,18991
|
47
41
|
pycityagent/cli/wrapper.py,sha256=bAwmfWTXbGld-uiMnIMhKp22IVRQjhLUToknyUDk9rQ,1147
|
@@ -99,3 +93,9 @@ pycityagent/cityagent/blocks/mobility_block.py,sha256=bUoExMdxlMzbnWHe1hx6bkR2Jj
|
|
99
93
|
pycityagent/survey/models.py,sha256=g3xni4GcA1Py3vlGt6z4ltutjgQ4G0uINYAM8vKRJAw,5225
|
100
94
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
101
95
|
pycityagent/survey/manager.py,sha256=QZEApC6tKe-g1waDa_O4Eg4CFkyL8KWa7tUGZnT_7WI,3397
|
96
|
+
pycityagent-2.0.0a98.dist-info/RECORD,,
|
97
|
+
pycityagent-2.0.0a98.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
98
|
+
pycityagent-2.0.0a98.dist-info/WHEEL,sha256=md3JO_ifs5j508p3TDNMgtQVtnQblpGEt_Wo4W56l8Y,107
|
99
|
+
pycityagent-2.0.0a98.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
100
|
+
pycityagent-2.0.0a98.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
101
|
+
pycityagent-2.0.0a98.dist-info/METADATA,sha256=n8hlDfjXb8yJTLVUOsIdUc2XpEYSc8yyO8lfJ3aL8XU,8657
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|