QuLab 2.1.3__tar.gz → 2.2.0__tar.gz
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-2.1.3 → qulab-2.2.0}/PKG-INFO +1 -1
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/PKG-INFO +1 -1
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/scan.py +26 -4
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/server.py +6 -3
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/space.py +6 -6
- qulab-2.2.0/qulab/version.py +1 -0
- qulab-2.1.3/qulab/version.py +0 -1
- {qulab-2.1.3 → qulab-2.2.0}/LICENSE +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/MANIFEST.in +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/SOURCES.txt +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/dependency_links.txt +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/entry_points.txt +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/requires.txt +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/QuLab.egg-info/top_level.txt +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/README.md +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/pyproject.toml +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/__main__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/__main__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/config.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/dataset.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/event_queue.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/mainwindow.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/monitor.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/ploter.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/qt_compat.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/monitor/toolbar.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/curd.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/expression.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/models.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/optimize.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/query.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/record.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/scan/utils.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/__main__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/backend/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/backend/redis.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/base_dataset.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/chunk.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/dataset.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/file.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/base.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/config.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/file.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/ipy.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/models.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/record.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/report.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/models/tag.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/storage/storage.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/chat.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/device/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/device/basedevice.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/device/loader.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/device/utils.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/drivers/FakeInstrument.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/drivers/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/ipy_events.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/bencoder.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/cli.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/dhcp.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/dhcpd.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/kad.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/kcp.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/net/nginx.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/progress.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/client.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/exceptions.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/msgpack.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/msgpack.pyi +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/rpc.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/serialize.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/server.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/socket.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/utils.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/worker.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/sys/rpc/zmq_socket.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/__init__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/__main__.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/_autoplot.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/plot_layout.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/plot_seq.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/qdat.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/qulab/visualization/widgets.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/setup.cfg +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/setup.py +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/src/qulab.h +0 -0
- {qulab-2.1.3 → qulab-2.2.0}/tests/test_scan.py +0 -0
|
@@ -332,7 +332,17 @@ class Scan():
|
|
|
332
332
|
async def _emit(self, current_level, step, position, variables: dict[str,
|
|
333
333
|
Any]):
|
|
334
334
|
for key, value in list(variables.items()):
|
|
335
|
-
if
|
|
335
|
+
if key.startswith('**'):
|
|
336
|
+
if isinstance(value, dict):
|
|
337
|
+
variables.update(value)
|
|
338
|
+
del variables[key]
|
|
339
|
+
elif inspect.isawaitable(value):
|
|
340
|
+
d = await value
|
|
341
|
+
assert isinstance(
|
|
342
|
+
d, dict), f"Should promise a dict for `**` symbol."
|
|
343
|
+
variables.update(d)
|
|
344
|
+
del variables[key]
|
|
345
|
+
elif inspect.isawaitable(value) and not self.hiden(key):
|
|
336
346
|
variables[key] = await value
|
|
337
347
|
if self._sock is not None:
|
|
338
348
|
await self._sock.send_pyobj({
|
|
@@ -355,15 +365,15 @@ class Scan():
|
|
|
355
365
|
|
|
356
366
|
def emit(self, current_level, step, position, variables: dict[str, Any]):
|
|
357
367
|
self._msg_queue.put_nowait(
|
|
358
|
-
|
|
359
|
-
self._emit(current_level, step, position, variables.copy())))
|
|
368
|
+
self._emit(current_level, step, position, variables.copy()))
|
|
360
369
|
|
|
361
370
|
def hide(self, name: str):
|
|
362
371
|
self.description['hiden'].append(name)
|
|
363
372
|
self._hide_pattern_re = re.compile('|'.join(self.description['hiden']))
|
|
364
373
|
|
|
365
374
|
def hiden(self, name: str) -> bool:
|
|
366
|
-
return bool(
|
|
375
|
+
return bool(
|
|
376
|
+
self._hide_pattern_re.match(name)) and not name.startswith('**')
|
|
367
377
|
|
|
368
378
|
async def _filter(self, variables: dict[str, Any], level: int = 0):
|
|
369
379
|
try:
|
|
@@ -972,9 +982,21 @@ async def _iter_level(variables,
|
|
|
972
982
|
|
|
973
983
|
variables.update(await call_many_functions(order, getters, variables))
|
|
974
984
|
|
|
985
|
+
if opts:
|
|
986
|
+
for key in list(variables.keys()):
|
|
987
|
+
if key.startswith('**'):
|
|
988
|
+
d = variables[key]
|
|
989
|
+
if inspect.isawaitable(d):
|
|
990
|
+
d = await d
|
|
991
|
+
assert isinstance(
|
|
992
|
+
d, dict), f"Should promise a dict for `**` symbol."
|
|
993
|
+
variables.update(d)
|
|
994
|
+
del variables[key]
|
|
995
|
+
|
|
975
996
|
for name, opt in opts.items():
|
|
976
997
|
opt_cfg = optimizers[name]
|
|
977
998
|
args = [variables[n] for n in opt_cfg.dimensions.keys()]
|
|
999
|
+
|
|
978
1000
|
if name not in variables:
|
|
979
1001
|
raise ValueError(f'{name} not in variables.')
|
|
980
1002
|
fun = variables[name]
|
|
@@ -204,15 +204,18 @@ async def handle(session: Session, request: Request, datapath: Path):
|
|
|
204
204
|
else:
|
|
205
205
|
await reply(request, None)
|
|
206
206
|
case 'config_get':
|
|
207
|
-
config = get_config(session,
|
|
207
|
+
config = get_config(session,
|
|
208
|
+
msg['config_id'],
|
|
209
|
+
base=datapath / 'objects')
|
|
208
210
|
session.commit()
|
|
209
211
|
await reply(request, config)
|
|
210
212
|
case 'config_update':
|
|
211
213
|
config = create_config(session,
|
|
212
214
|
msg['update'],
|
|
213
|
-
base=datapath,
|
|
215
|
+
base=datapath / 'objects',
|
|
214
216
|
filename='/'.join(
|
|
215
|
-
random_path(datapath
|
|
217
|
+
random_path(datapath /
|
|
218
|
+
'objects').parts[-4:]))
|
|
216
219
|
session.commit()
|
|
217
220
|
await reply(request, config.id)
|
|
218
221
|
case 'submit':
|
|
@@ -23,11 +23,11 @@ class Space():
|
|
|
23
23
|
return len(self.toarray())
|
|
24
24
|
|
|
25
25
|
@classmethod
|
|
26
|
-
def fromarray(cls,
|
|
27
|
-
if isinstance(
|
|
28
|
-
return
|
|
29
|
-
if isinstance(
|
|
30
|
-
array = np.array(
|
|
26
|
+
def fromarray(cls, space):
|
|
27
|
+
if isinstance(space, Space):
|
|
28
|
+
return space
|
|
29
|
+
if isinstance(space, (list, tuple)):
|
|
30
|
+
array = np.array(space)
|
|
31
31
|
try:
|
|
32
32
|
a = np.linspace(array[0], array[-1], len(array), dtype=array.dtype)
|
|
33
33
|
if np.allclose(a, array):
|
|
@@ -81,7 +81,7 @@ class Space():
|
|
|
81
81
|
dtype=array.dtype)
|
|
82
82
|
except:
|
|
83
83
|
pass
|
|
84
|
-
return
|
|
84
|
+
return space
|
|
85
85
|
|
|
86
86
|
def toarray(self):
|
|
87
87
|
return getattr(np, self.function)(*self.args, **self.kwds)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.0"
|
qulab-2.1.3/qulab/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|