File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 78
78
- name : Run check
79
79
env :
80
80
work_dir : ${{ github.workspace }}
81
+ if : steps.check-bypass.outputs.can-skip != 'true'
81
82
run : |
82
83
docker exec -t ${{ env.container_name }} /bin/bash -c '
83
84
source ${{ github.workspace }}/../../../proxy
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ function LOG {
8
8
9
9
LOG " [INFO] Start validate samples changed by pull request ..."
10
10
11
- export GRAPH_NET_EXTRACT_WORKSPACE=$( cd $( dirname $0 ) /../.. && pwd)
11
+ export GRAPH_NET_ROOT=$( cd $( dirname $0 ) /../.. && pwd)
12
+ export GRAPH_NET_EXTRACT_WORKSPACE=" ${GRAPH_NET_ROOT} /samples"
12
13
export PYTHONPATH=${GRAPH_NET_EXTRACT_WORKSPACE} :$PYTHONPATH
13
14
14
15
[ -z " $CUDA_VISIBLE_DEVICES " ] && CUDA_VISIBLE_DEVICES=" 0"
@@ -17,6 +18,7 @@ function prepare_env() {
17
18
git config --global --add safe.directory " *"
18
19
num_changed_samples=$( git diff --name-only develop | grep -E " samples/(.*\.py|.*\.json)" | wc -l)
19
20
if [ ${num_changed_samples} -eq 0 ]; then
21
+ python ${GRAPH_NET_ROOT} /tools/count_sample.py
20
22
LOG " [INFO] This pull request doesn't change any samples, skip the CI."
21
23
exit 0
22
24
fi
@@ -73,6 +75,7 @@ function main() {
73
75
check_validation_info=$( check_validation)
74
76
check_validation_code=$?
75
77
summary_problems $check_validation_code " $check_validation_info "
78
+ python ${GRAPH_NET_ROOT} /tools/count_sample.py
76
79
LOG " [INFO] check_validation run success and no error!"
77
80
}
78
81
Original file line number Diff line number Diff line change 5
5
filename = os .path .abspath (__file__ )
6
6
root_dir = os .path .dirname (os .path .dirname (filename ))
7
7
samples_dir = os .path .join (root_dir , "samples" )
8
+ model_categories = os .listdir (samples_dir )
8
9
9
10
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" :
13
- graph_net_count += 1
11
+ graph_net_dict = {}
12
+ for category in model_categories :
13
+ category_dir = os .path .join (samples_dir , category )
14
+ if os .path .isdir (category_dir ):
15
+ graph_net_dict [category ] = 0
16
+ for root , dirs , files in os .walk (category_dir ):
17
+ if "graph_net.json" in files :
18
+ graph_net_count += 1
19
+ graph_net_dict [category ] += 1
20
+
14
21
print (f"Number of graph_net.json files: { graph_net_count } " )
22
+ for name , number in graph_net_dict .items ():
23
+ print (f"- { name :24} : { number } " )
24
+ print ()
You can’t perform that action at this time.
0 commit comments