language: check_unprocessed_arguments after constructing experiment

Signed-off-by: Nico Pulido-Mateo <pulido@iqo.uni-hannover.de>
This commit is contained in:
Nico Pulido 2022-11-23 15:34:21 +01:00 committed by Sebastien Bourdeauducq
parent 75d75cc13c
commit d7240c17fc
3 changed files with 6 additions and 1 deletions

View File

@ -53,6 +53,8 @@ def main():
arguments = parse_arguments(args.arguments)
argument_mgr = ProcessArgumentManager(arguments)
exp_inst = exp((device_mgr, dataset_mgr, argument_mgr, {}))
argument_mgr.check_unprocessed_arguments()
if not hasattr(exp.run, "artiq_embedded"):
raise ValueError("Experiment entry point must be a kernel")

View File

@ -184,7 +184,9 @@ def _build_experiment(device_mgr, dataset_mgr, args):
"arguments": arguments
}
device_mgr.virtual_devices["scheduler"].expid = expid
return get_experiment(module, args.class_name)(managers)
exp_inst = get_experiment(module, args.class_name)(managers)
argument_mgr.check_unprocessed_arguments()
return exp_inst
def run(with_file=False):

View File

@ -333,6 +333,7 @@ def main():
os.chdir(dirname)
argument_mgr = ProcessArgumentManager(expid["arguments"])
exp_inst = exp((device_mgr, dataset_mgr, argument_mgr, {}))
argument_mgr.check_unprocessed_arguments()
put_completed()
elif action == "prepare":
exp_inst.prepare()