-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inference report for both simulator and evb. (#1061)
* Add inference report for both simulator and evb. * Fix dump_infer and add default value for INFER_FILE. * Add missing tests/json2md.py
- Loading branch information
1 parent
0499b7c
commit 741919a
Showing
8 changed files
with
115 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ pytest-xdist | |
pyyaml | ||
pythonnet==3.0.1 | ||
clr_loader==0.2.4 | ||
toml==0.10.2 | ||
toml==0.10.2 | ||
pandas | ||
tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import argparse | ||
import json | ||
import pandas as pd | ||
|
||
|
||
def json2md(json_file): | ||
json_list = [] | ||
with open(json_file, 'r') as f: | ||
json_list = json.load(f) | ||
|
||
json_list = sorted(json_list, key=lambda d: d['case']) | ||
df = pd.DataFrame.from_records(json_list) | ||
md = df.to_markdown() | ||
md_file = json_file.split('/')[-1].split('.')[0] + '.md' | ||
|
||
with open(md_file, 'w') as f: | ||
f.write(md) | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(prog="json2md") | ||
parser.add_argument("--json", help='json file', type=str) | ||
args = parser.parse_args() | ||
json2md(args.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters