BBN-Q / Auspex

Automated system for python-based experiments
Apache License 2.0
31 stars 14 forks source link

Save settings as YAML #114

Closed gribeill closed 6 years ago

gribeill commented 7 years ago

Settings in WriteToHDF5 are saved as JSON as opposed to YAML.

matthewware commented 7 years ago

@grahamrow @gribeill from what I can tell WritetoHDF5 just copies json files to a new folder? Was there ever functionality to write the setting to h5 files?

dieris commented 7 years ago

No, it's always been in json. I think we still want to save as yml (now), so that we can easily recover/reload past settings.

matthewware commented 7 years ago

Okay, I was thinking moving forward we could just do both. Based on discussions with @grahamrow I'm just going to implement saving to the h5 and to a file.

dieris commented 7 years ago

That's even better

grahamrow commented 7 years ago

@matthewware take a look in src/auspex/config.py for YAML dumping inspiration. First thing to try might be writing a dumper (a la yaml_dump) that doesn't bother calling add_representer for Include objects? Depends on how flexible the dumper is. Next I'd try modifying what the Dumper returns.

dieris commented 6 years ago

The h5 saving is working https://github.com/BBN-Q/Auspex/pull/134. But the yml copies are now limited to the main config file (measure.yml). Should we search the file for an !include string and load those files? Or can we reuse the yaml_dump code to find those files?

dieris commented 6 years ago

Closed by #134 . It can be improved by saving the settings as the original yml files for better lookup.