QuLab 2.9.8__cp312-cp312-win_amd64.whl → 2.9.9__cp312-cp312-win_amd64.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.
- qulab/executor/analyze.py +31 -7
- qulab/executor/storage.py +1 -1
- qulab/fun.cp312-win_amd64.pyd +0 -0
- qulab/version.py +1 -1
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/METADATA +1 -1
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/RECORD +10 -10
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/WHEEL +0 -0
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/entry_points.txt +0 -0
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/licenses/LICENSE +0 -0
- {qulab-2.9.8.dist-info → qulab-2.9.9.dist-info}/top_level.txt +0 -0
qulab/executor/analyze.py
CHANGED
@@ -18,8 +18,13 @@ report, history = get_report_{server_port}("tcp://{server_address}:{server_port}
|
|
18
18
|
"""
|
19
19
|
|
20
20
|
analysis_code = """
|
21
|
+
# report.state = 'OK'
|
21
22
|
# report.parameters = {}
|
22
23
|
# report.oracle = {}
|
24
|
+
# report.other_infomation = {}
|
25
|
+
|
26
|
+
report.parameters
|
27
|
+
|
23
28
|
"""
|
24
29
|
|
25
30
|
|
@@ -86,11 +91,16 @@ class ServerThread(threading.Thread):
|
|
86
91
|
|
87
92
|
|
88
93
|
# 进入分析流程,启动服务并打印等待提示
|
89
|
-
def get_result_or_wait_until_timeout(
|
94
|
+
def get_result_or_wait_until_timeout(report: Report, history: Report | None,
|
90
95
|
timeout: float) -> Report:
|
91
|
-
server = ServerThread(
|
96
|
+
server = ServerThread((report, history), timeout)
|
92
97
|
server.start()
|
93
98
|
|
99
|
+
parameters = report.parameters
|
100
|
+
oracle = report.oracle
|
101
|
+
other_infomation = report.other_infomation
|
102
|
+
state = report.state
|
103
|
+
|
94
104
|
# 格式化代码模板
|
95
105
|
code = clip_template.format(server_address="127.0.0.1",
|
96
106
|
server_port=server.port,
|
@@ -116,12 +126,20 @@ def get_result_or_wait_until_timeout(data: tuple[Report, Report | None],
|
|
116
126
|
break
|
117
127
|
|
118
128
|
result = server.wait_for_result()
|
119
|
-
|
129
|
+
if result is None:
|
130
|
+
return (state, parameters, oracle, other_infomation, code)
|
131
|
+
else:
|
132
|
+
return result
|
120
133
|
|
121
134
|
|
122
135
|
def manual_analysis(report: Report, history=None, timeout=3600):
|
123
136
|
try:
|
124
|
-
|
137
|
+
(state, parameters, oracle, other_infomation,
|
138
|
+
code) = get_result_or_wait_until_timeout(report, history, timeout)
|
139
|
+
report.parameters = parameters
|
140
|
+
report.oracle = oracle
|
141
|
+
report.state = state
|
142
|
+
report.other_infomation = other_infomation
|
125
143
|
except Exception as e:
|
126
144
|
pass
|
127
145
|
return report
|
@@ -152,13 +170,19 @@ def submit_report(report: Report, address: str):
|
|
152
170
|
ipy = IPython.get_ipython()
|
153
171
|
if ipy is None:
|
154
172
|
raise RuntimeError("请在 Jupyter Notebook 中运行此函数。")
|
155
|
-
|
156
|
-
|
173
|
+
|
174
|
+
code = ipy.user_ns['In'][-2]
|
175
|
+
|
176
|
+
parameters = report.parameters
|
177
|
+
oracle = report.oracle
|
178
|
+
other_infomation = report.other_infomation
|
179
|
+
state = report.state
|
157
180
|
|
158
181
|
context = zmq.Context()
|
159
182
|
sock = context.socket(zmq.REQ)
|
160
183
|
sock.connect(address)
|
161
184
|
# 提交处理后的结果
|
162
|
-
sock.send(pickle.dumps(
|
185
|
+
sock.send(pickle.dumps(
|
186
|
+
(state, parameters, oracle, other_infomation, code)))
|
163
187
|
ack = sock.recv()
|
164
188
|
print("结果已提交。")
|
qulab/executor/storage.py
CHANGED
@@ -65,7 +65,7 @@ class Report():
|
|
65
65
|
|
66
66
|
def __getstate__(self):
|
67
67
|
state = self.__dict__.copy()
|
68
|
-
state.pop('base_path')
|
68
|
+
state.pop('base_path', None)
|
69
69
|
for k in ['path', 'previous_path', 'config_path', 'script_path']:
|
70
70
|
if state[k] is not None:
|
71
71
|
state[k] = str(state[k])
|
qulab/fun.cp312-win_amd64.pyd
CHANGED
Binary file
|
qulab/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.9.
|
1
|
+
__version__ = "2.9.9"
|
@@ -1,19 +1,19 @@
|
|
1
1
|
qulab/__init__.py,sha256=ulapyzt9DsDgT68EEbzuhniofHb512pNTFc-Sxfrr8Y,375
|
2
2
|
qulab/__main__.py,sha256=FL4YsGZL1jEtmcPc5WbleArzhOHLMsWl7OH3O-1d1ss,72
|
3
3
|
qulab/dicttree.py,sha256=ZoSJVWK4VMqfzj42gPb_n5RqLlM6K1Me0WmLIfLEYf8,14195
|
4
|
-
qulab/fun.cp312-win_amd64.pyd,sha256=
|
4
|
+
qulab/fun.cp312-win_amd64.pyd,sha256=0qVm2aOk9QdRNjF-fATe5A-csnsTNafYyW8Ym15HfTw,32256
|
5
5
|
qulab/typing.py,sha256=PRtwbCHWY2ROKK8GHq4Bo8llXrIGo6xC73DrQf7S9os,71
|
6
6
|
qulab/utils.py,sha256=65N2Xj7kqRsQ4epoLNY6tL-i5ts6Wk8YuJYee3Te6zI,3077
|
7
|
-
qulab/version.py,sha256=
|
7
|
+
qulab/version.py,sha256=gB2GONub0WyICh4-SbXI8ce5oNADu2_gH_-ZqWOveM0,21
|
8
8
|
qulab/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
qulab/cli/commands.py,sha256=ZTs32yQjvwPIsFjXYWNr4KqEvly0NISIqyh--96qCAY,627
|
10
10
|
qulab/cli/config.py,sha256=7h3k0K8FYHhI6LVWt8BoDdKrX2ApFDBAUAUuXhHwst4,3799
|
11
11
|
qulab/executor/__init__.py,sha256=LosPzOMaljSZY1thy_Fxtbrgq7uubJszMABEB7oM7tU,101
|
12
|
-
qulab/executor/analyze.py,sha256=
|
12
|
+
qulab/executor/analyze.py,sha256=VoSthE2RTarY6Wj3QFKh4FqReMYL7djSAyuitgHs5K0,5837
|
13
13
|
qulab/executor/cli.py,sha256=xceK6XNLnNpAVtqvs0_wOAuG0sgS9jg1iTFYmxVUMWY,11795
|
14
14
|
qulab/executor/load.py,sha256=qI-3b3xvsjZMCthRO3hlzHA0BZI-tH9Y_L0XLBcyWV8,18657
|
15
15
|
qulab/executor/schedule.py,sha256=XRimchHYCgnMAOtCvNLjwMv9IkcTAyBAUCHKQs5RBRw,18745
|
16
|
-
qulab/executor/storage.py,sha256=
|
16
|
+
qulab/executor/storage.py,sha256=8K73KGLAVgchJdtd4rKHXkr1CQOJORWH-Gi57w8IYsw,21081
|
17
17
|
qulab/executor/template.py,sha256=dKQM3IlADdTi9qp0fnOYjyycRNEl7KeSCBZhwbmP8bQ,10828
|
18
18
|
qulab/executor/transform.py,sha256=rk4CLIKVjGRaFzi5FVSgadUxAKKVLSopEHZCaAzDwDg,3435
|
19
19
|
qulab/executor/utils.py,sha256=l_b0y2kMwYKyyXeFtoblPYwKNU-wiFQ9PMo9QlWl9wE,6213
|
@@ -98,9 +98,9 @@ qulab/visualization/plot_seq.py,sha256=Uo1-dB1YE9IN_A9tuaOs9ZG3S5dKDQ_l98iD2Wbxp
|
|
98
98
|
qulab/visualization/qdat.py,sha256=HubXFu4nfcA7iUzghJGle1C86G6221hicLR0b-GqhKQ,5887
|
99
99
|
qulab/visualization/rot3d.py,sha256=jGHJcqj1lEWBUV-W4GUGONGacqjrYvuFoFCwPse5h1Y,757
|
100
100
|
qulab/visualization/widgets.py,sha256=HcYwdhDtLreJiYaZuN3LfofjJmZcLwjMfP5aasebgDo,3266
|
101
|
-
qulab-2.9.
|
102
|
-
qulab-2.9.
|
103
|
-
qulab-2.9.
|
104
|
-
qulab-2.9.
|
105
|
-
qulab-2.9.
|
106
|
-
qulab-2.9.
|
101
|
+
qulab-2.9.9.dist-info/licenses/LICENSE,sha256=b4NRQ-GFVpJMT7RuExW3NwhfbrYsX7AcdB7Gudok-fs,1086
|
102
|
+
qulab-2.9.9.dist-info/METADATA,sha256=UyXZQG4kRUuwLlEQLdRW06Ww-XIwahMxJ9c2V3Jk8es,3859
|
103
|
+
qulab-2.9.9.dist-info/WHEEL,sha256=ovhA9_Ei_7ok2fAych90j-feDV4goiAxbO7REePtvw0,101
|
104
|
+
qulab-2.9.9.dist-info/entry_points.txt,sha256=b0v1GXOwmxY-nCCsPN_rHZZvY9CtTbWqrGj8u1m8yHo,45
|
105
|
+
qulab-2.9.9.dist-info/top_level.txt,sha256=3T886LbAsbvjonu_TDdmgxKYUn939BVTRPxPl9r4cEg,6
|
106
|
+
qulab-2.9.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|