示例#1
0
    def save_indicators(self, file: PurePath):
        self.is_indicators_updated = False
        self.__indicators_file = file

        wildcards = {
            k: ind.to_dict()
            for k, ind in self.dot_indicators.items()
        }
        inds = {k: ind.to_dict() for k, ind in self.indicators.items()}
        with open(str(file), "w") as file:
            file.write(
                util.yaml_dump({
                    'wildcards': wildcards,
                    'indicators': inds
                }))
示例#2
0
文件: store.py 项目: Kaushalya/lab
    def save_artifactors(self, file: PurePath):
        self.__artifacts_file = file

        artifacts = {k: art.to_dict() for k, art in self.artifacts.items()}
        with open(str(file), "w") as file:
            file.write(util.yaml_dump(artifacts))
示例#3
0
文件: store.py 项目: Kaushalya/lab
    def save_indicators(self, file: PurePath):
        self.__indicators_file = file

        indicators = {k: ind.to_dict() for k, ind in self.indicators.items()}
        with open(str(file), "w") as file:
            file.write(util.yaml_dump(indicators))
示例#4
0
 def append_to_file(self, line, filename):
     makedirs(self.save_dir, exist_ok=True)
     file = PurePath(self.save_dir, filename + '.csv')
     with open(file, 'a', encoding='utf-8') as file:
         file.write(line)