def dump_task_run_info(self, task_run):

        info = {
            "task_run":
            TaskRunInfoSchema().dump(build_task_run_info(task_run)).data,
            "task_def": (TaskDefinitionInfoSchema().dump(
                task_to_task_def(task_run.run.context, task_run.task)).data),
            "run":
            RunInfoSchema().dump(task_run.run).data,
        }
        # old implementation, replace with "dbnd_tracking" request

        meta_data_file = task_run.meta_files.get_meta_data_file()
        with meta_data_file.open("w") as yaml_file:
            yaml.dump(info, yaml_file, default_flow_style=False)
Exemple #2
0
    def get_run_info(self):

        from dbnd.api.serialization.run import RunInfoSchema

        with self.meta.get_meta_data_file().open("r") as yaml_file:
            return RunInfoSchema().load(**yaml.load(yaml_file))
 def get_run_info(self):
     with self.meta.get_meta_data_file().open("r") as yaml_file:
         return RunInfoSchema().load(**yaml.load(yaml_file))