Skip to content
Snippets Groups Projects

Support for saving metadata fragments & merging into calibration_metadata.yml

Merged Thomas Kluyver requested to merge feat/metadata-fragments into master
1 unresolved thread
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
+ 2
1
@@ -871,8 +871,9 @@ class CalibrationMetadata(dict):
@@ -871,8 +871,9 @@ class CalibrationMetadata(dict):
Avoids a risk of corrupting the main file by writing in parallel.
Avoids a risk of corrupting the main file by writing in parallel.
"""
"""
 
prefix = f"metadata_frag_j{os.environ.get('SLURM_JOB_ID', '')}_"
with NamedTemporaryFile("w", dir=self._yaml_fn.parent,
with NamedTemporaryFile("w", dir=self._yaml_fn.parent,
prefix='metadata_frag_', suffix='.yml', delete=False) as fd:
prefix=prefix, suffix='.yml', delete=False) as fd:
yaml.safe_dump(data, fd)
yaml.safe_dump(data, fd)
def gather_fragments(self):
def gather_fragments(self):
Loading