forked from M-Labs/artiq
1
0
Fork 0

worker: trust that h5py encodes strings

This commit is contained in:
Robert Jördens 2016-04-05 15:38:21 +08:00
parent 690eb8c304
commit 0b32d9946a
1 changed files with 2 additions and 8 deletions

View File

@ -145,12 +145,6 @@ def examine(device_mgr, dataset_mgr, file):
register_experiment(class_name, name, arginfo)
def string_to_hdf5(f, key, value):
dtype = "S{}".format(len(value))
dataset = f.create_dataset(key, (), dtype)
dataset[()] = value.encode()
def setup_diagnostics(experiment_file, repository_path):
def render_diagnostic(self, diagnostic):
message = "While compiling {}\n".format(experiment_file) + \
@ -228,9 +222,9 @@ def main():
elif action == "write_results":
with get_hdf5_output(start_time, rid, exp.__name__) as f:
dataset_mgr.write_hdf5(f)
string_to_hdf5(f, "version", artiq_version)
f["artiq_version"] = artiq_version
if "repo_rev" in expid:
string_to_hdf5(f, "repo_rev", expid["repo_rev"])
f["repo_rev"] = expid["repo_rev"]
put_object({"action": "completed"})
elif action == "examine":
examine(ExamineDeviceMgr, ParentDatasetDB, obj["file"])