I'm using the scheduler for the first time, and can't get it to work properly. When I run the experiment below,
def build(self):
# Import core and scheduler
self.setattr_device("core")
self.setattr_device("scheduler")
def prepare(self):
self.delay = self.get_dataset("parameters.delay")
# Parameters for experiments
detection_time_us = 500
pmt_reps = 100
# Define bright pmt experiment and its inputs for the scheduler
self.expid_bright_ion = {
"file": "Z:\\Artiq\\Artiq_WS\\repository\\detection_check.py",
"class_name": "Detection",
"arguments": {"detection_time": detection_time_us,
"n_reps": pmt_reps,
"shutter935_open": True,
"use_camera": False,
"show_hist": False},
"log_level": self.scheduler.expid["log_level"],
# "repo_rev": "N/A"
}
@kernel
def run(self):
# Initialize core timeline
self.core.break_realtime()
delay(self.delay * us)
self.core.reset()
delay(self.delay * us)
# Run bright ion pmt detection experiment
self.scheduler.submit("main", expid=self.expid_bright_ion)
The experiment with the scheduler schedules does actually run successfully, but this experiment throws the following error:
root:Terminating with exception (RPCReturnValueError: type mismatch: cannot serialize 218628 as None (<function Scheduler.submit at 0x000002564A2A0CA0> has returned 218628))
Traceback (most recent call last):
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\master\worker_impl.py", line 300, in main
exp_inst.run()
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\language\core.py", line 54, in run_on_core
return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\coredevice\core.py", line 137, in run
self.comm.serve(embedding_map, symbolizer, demangler)
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\coredevice\comm_kernel.py", line 642, in serve
self._serve_rpc(embedding_map)
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\coredevice\comm_kernel.py", line 563, in _serve_rpc
self._send_rpc_value(bytearray(return_tags),
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\coredevice\comm_kernel.py", line 432, in _send_rpc_value
check(value is None,
File "C:\Users\iontrap\Anaconda3\envs\artiq6\lib\site-packages\artiq\coredevice\comm_kernel.py", line 418, in check
raise RPCReturnValueError(
artiq.coredevice.comm_kernel.RPCReturnValueError: type mismatch: cannot serialize 218628 as None (<function Scheduler.submit at 0x000002564A2A0CA0> has returned 218628)
218528 is the rid of the experiment being scheduled. Unfortunately, the traceback is rather opaque.