Skip to content

Commit bfad58d

Browse files
committed
Add detail of sample statistics for different model category and call it in ci.
1 parent d1b2a69 commit bfad58d

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/Validate-GPU.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,19 @@ jobs:
7878
- name: Run check
7979
env:
8080
work_dir: ${{ github.workspace }}
81+
if: steps.check-bypass.outputs.can-skip != 'true'
8182
run: |
8283
docker exec -t ${{ env.container_name }} /bin/bash -c '
8384
source ${{ github.workspace }}/../../../proxy
8485
bash ${work_dir}/tools/ci/check_validate.sh
8586
'
8687
88+
- name: Sample statistics
89+
if: always()
90+
run: |
91+
set +e
92+
python ${{ github.workspace }}/count_sample.py
93+
8794
- name: Terminate and delete the container
8895
if: always()
8996
run: |

tools/count_sample.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
filename = os.path.abspath(__file__)
66
root_dir = os.path.dirname(os.path.dirname(filename))
77
samples_dir = os.path.join(root_dir, "samples")
8+
model_categories = os.listdir(samples_dir)
89

910
graph_net_count = 0
10-
for root, dirs, files in os.walk(samples_dir):
11-
for file in files:
12-
if file == "graph_net.json":
11+
graph_net_dict = {}
12+
for category in model_categories:
13+
graph_net_dict[category] = 0
14+
category_dir = os.path.join(samples_dir, category)
15+
for root, dirs, files in os.walk(category_dir):
16+
if "graph_net.json" in files:
1317
graph_net_count += 1
18+
graph_net_dict[category] += 1
19+
1420
print(f"Number of graph_net.json files: {graph_net_count}")
21+
for name, number in graph_net_dict.items():
22+
print(f"- {name:24}: {number}")
23+
print()

0 commit comments

Comments
 (0)