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 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
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ function LOG {
88
99LOG " [INFO] Start validate samples changed by pull request ..."
1010
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"
1213export PYTHONPATH=${GRAPH_NET_EXTRACT_WORKSPACE} :$PYTHONPATH
1314
1415[ -z " $CUDA_VISIBLE_DEVICES " ] && CUDA_VISIBLE_DEVICES=" 0"
@@ -17,6 +18,7 @@ function prepare_env() {
1718 git config --global --add safe.directory " *"
1819 num_changed_samples=$( git diff --name-only develop | grep -E " samples/(.*\.py|.*\.json)" | wc -l)
1920 if [ ${num_changed_samples} -eq 0 ]; then
21+ python ${GRAPH_NET_ROOT} /tools/count_sample.py
2022 LOG " [INFO] This pull request doesn't change any samples, skip the CI."
2123 exit 0
2224 fi
@@ -73,6 +75,7 @@ function main() {
7375 check_validation_info=$( check_validation)
7476 check_validation_code=$?
7577 summary_problems $check_validation_code " $check_validation_info "
78+ python ${GRAPH_NET_ROOT} /tools/count_sample.py
7679 LOG " [INFO] check_validation run success and no error!"
7780}
7881
Original file line number Diff line number Diff line change 55filename = os .path .abspath (__file__ )
66root_dir = os .path .dirname (os .path .dirname (filename ))
77samples_dir = os .path .join (root_dir , "samples" )
8+ model_categories = os .listdir (samples_dir )
89
910graph_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+
1421print (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