pycityagent 2.0.0a54__cp39-cp39-macosx_11_0_arm64.whl → 2.0.0a55__cp39-cp39-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycityagent/metrics/mlflow_client.py +4 -0
- pycityagent/simulation/simulation.py +8 -5
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/METADATA +1 -1
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/RECORD +8 -8
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a54.dist-info → pycityagent-2.0.0a55.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,7 @@ logger = logging.getLogger("mlflow")
|
|
20
20
|
|
21
21
|
def init_mlflow_connection(
|
22
22
|
config: dict,
|
23
|
+
experiment_uuid: str,
|
23
24
|
mlflow_run_name: Optional[str] = None,
|
24
25
|
experiment_name: Optional[str] = None,
|
25
26
|
experiment_description: Optional[str] = None,
|
@@ -43,6 +44,7 @@ def init_mlflow_connection(
|
|
43
44
|
experiment_tags = {}
|
44
45
|
if experiment_description is not None:
|
45
46
|
experiment_tags["mlflow.note.content"] = experiment_description
|
47
|
+
experiment_tags["experiment_id"] = experiment_uuid
|
46
48
|
|
47
49
|
uri = config["mlflow_uri"]
|
48
50
|
client = mlflow.MlflowClient(tracking_uri=uri)
|
@@ -75,6 +77,7 @@ class MlflowClient:
|
|
75
77
|
def __init__(
|
76
78
|
self,
|
77
79
|
config: dict,
|
80
|
+
experiment_uuid: str,
|
78
81
|
mlflow_run_name: Optional[str] = None,
|
79
82
|
experiment_name: Optional[str] = None,
|
80
83
|
experiment_description: Optional[str] = None,
|
@@ -89,6 +92,7 @@ class MlflowClient:
|
|
89
92
|
self._run_uuid,
|
90
93
|
) = init_mlflow_connection(
|
91
94
|
config=config,
|
95
|
+
experiment_uuid=experiment_uuid,
|
92
96
|
mlflow_run_name=mlflow_run_name,
|
93
97
|
experiment_name=experiment_name,
|
94
98
|
experiment_description=experiment_description,
|
@@ -129,15 +129,17 @@ class AgentSimulation:
|
|
129
129
|
|
130
130
|
# mlflow
|
131
131
|
_mlflow_config: dict[str, Any] = config.get("metric_request", {}).get("mlflow")
|
132
|
-
mlflow_run_id, _ = init_mlflow_connection(
|
133
|
-
config=_mlflow_config,
|
134
|
-
mlflow_run_name=f"EXP_{self.exp_name}_{1000*int(time.time())}",
|
135
|
-
experiment_name=self.exp_name,
|
136
|
-
)
|
137
132
|
if _mlflow_config:
|
138
133
|
logger.info(f"-----Creating Mlflow client...")
|
134
|
+
mlflow_run_id, _ = init_mlflow_connection(
|
135
|
+
config=_mlflow_config,
|
136
|
+
experiment_uuid=self.exp_id,
|
137
|
+
mlflow_run_name=f"EXP_{self.exp_name}_{1000*int(time.time())}",
|
138
|
+
experiment_name=self.exp_name,
|
139
|
+
)
|
139
140
|
self.mlflow_client = MlflowClient(
|
140
141
|
config=_mlflow_config,
|
142
|
+
experiment_uuid=self.exp_id,
|
141
143
|
mlflow_run_name=f"EXP_{exp_name}_{1000*int(time.time())}",
|
142
144
|
experiment_name=exp_name,
|
143
145
|
run_id=mlflow_run_id,
|
@@ -526,6 +528,7 @@ class AgentSimulation:
|
|
526
528
|
_mlflow_config = self.config.get("metric_request", {}).get("mlflow")
|
527
529
|
if _mlflow_config:
|
528
530
|
mlflow_run_id, _ = init_mlflow_connection(
|
531
|
+
experiment_uuid=self.exp_id,
|
529
532
|
config=_mlflow_config,
|
530
533
|
mlflow_run_name=f"{self.exp_name}_{1000*int(time.time())}",
|
531
534
|
experiment_name=self.exp_name,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a55
|
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,7 +1,13 @@
|
|
1
|
+
pycityagent-2.0.0a55.dist-info/RECORD,,
|
2
|
+
pycityagent-2.0.0a55.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
3
|
+
pycityagent-2.0.0a55.dist-info/WHEEL,sha256=md3JO_ifs5j508p3TDNMgtQVtnQblpGEt_Wo4W56l8Y,107
|
4
|
+
pycityagent-2.0.0a55.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
5
|
+
pycityagent-2.0.0a55.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
6
|
+
pycityagent-2.0.0a55.dist-info/METADATA,sha256=NI-t0FkdHsFWQ4aFpPz0i7Jg0qOS16AGo2IOiMwYG44,9110
|
1
7
|
pycityagent/pycityagent-sim,sha256=1Nu-QYC0AuZyVWciGNa2XkYsUntbwAS15Bo7l-y6eok,35449490
|
2
8
|
pycityagent/__init__.py,sha256=PUKWTXc-xdMG7px8oTNclodsILUgypANj2Z647sY63k,808
|
3
9
|
pycityagent/pycityagent-ui,sha256=cHZjqtrQ4Fh4qtRahFNCNbT2DNHLmUexiDAa-72Z3RQ,40333378
|
4
|
-
pycityagent/metrics/mlflow_client.py,sha256=
|
10
|
+
pycityagent/metrics/mlflow_client.py,sha256=bTrqYsRfNfjJd6l91hU8vN7JXzJC7DHiM2XbkhMuXIU,4613
|
5
11
|
pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzcqc,128
|
6
12
|
pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
13
|
pycityagent/economy/__init__.py,sha256=aonY4WHnx-6EGJ4WKrx4S-2jAkYNLtqUA04jp6q8B7w,75
|
@@ -22,7 +28,7 @@ pycityagent/memory/utils.py,sha256=oJWLdPeJy_jcdKcDTo9JAH9kDZhqjoQhhv_zT9qWC0w,8
|
|
22
28
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
23
29
|
pycityagent/memory/faiss_query.py,sha256=V3rIw6d1_xcpNqZBbAYz3qfjVNE7NfJ7xOS5SibPtVU,13180
|
24
30
|
pycityagent/memory/state.py,sha256=TYItiyDtehMEQaSBN7PpNrnNxdDM5jGppr9R9Ufv3kA,5134
|
25
|
-
pycityagent/simulation/simulation.py,sha256=
|
31
|
+
pycityagent/simulation/simulation.py,sha256=hoWOXcc5bqt-_S2MiYrtg2YWuw3A-KlBG9D_kFzk-fU,32936
|
26
32
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
27
33
|
pycityagent/simulation/agentgroup.py,sha256=ANTQA2OFQpuNZBz2VRhy60pTPUM1lXHFJLzFgK1SvxQ,31633
|
28
34
|
pycityagent/simulation/storage/pg.py,sha256=xRshSOGttW-p0re0fNBOjOpb-nQ5msIE2LsdT79_E_Y,8425
|
@@ -97,9 +103,3 @@ pycityagent/cityagent/blocks/mobility_block.py,sha256=xWbARMfJ3-6fddrW3VOUKJrXfM
|
|
97
103
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
98
104
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
99
105
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
100
|
-
pycityagent-2.0.0a54.dist-info/RECORD,,
|
101
|
-
pycityagent-2.0.0a54.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
102
|
-
pycityagent-2.0.0a54.dist-info/WHEEL,sha256=md3JO_ifs5j508p3TDNMgtQVtnQblpGEt_Wo4W56l8Y,107
|
103
|
-
pycityagent-2.0.0a54.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
104
|
-
pycityagent-2.0.0a54.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
105
|
-
pycityagent-2.0.0a54.dist-info/METADATA,sha256=rziSp1wXuaGcNbO3WTqNx6s7JqARZxLvFeNLvsChKUo,9110
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|