Skip to content

Commit

Permalink
plt update ci, test=model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeref996 committed Dec 20, 2024
1 parent f1b66e4 commit bd48a54
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions framework/e2e/PaddleLT_new/support/dict_to_yml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/env python
# -*- coding: utf-8 -*-
# @author Zeref996
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
字典转换为yaml
"""

import yaml
import json


def dict_to_yaml(filename, data_str):
"""
dict to yml
"""
data_dict = json.loads(data_str)

with open(filename, "w", encoding="utf-8") as file:
yaml.dump(data_dict, file, default_flow_style=False, allow_unicode=True)


if __name__ == "__main__":
import argparse

parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--filename", type=str, default="None", help="导出文件名")
parser.add_argument("--data_str", type=str, default="None", help="字典字符串")
args = parser.parse_args()
dict_to_yaml(args.filename, args.data_str)
2 changes: 1 addition & 1 deletion framework/e2e/PaddleLT_new/support/gen_md5.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/env python
# -*- coding: utf-8 -*-
# @author DDDivano
# @author Zeref996
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
md5获取
Expand Down

0 comments on commit bd48a54

Please sign in to comment.