Skip to content

Commit

Permalink
ONNX CI improvement (openvinotoolkit#3673)
Browse files Browse the repository at this point in the history
* Improve corner-case resistance

* small improvements
  • Loading branch information
rblaczkowski authored and mryzhov committed Jan 14, 2021
1 parent 769d762 commit ef50d78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ngraph/python/tests/test_onnx/model_zoo_preprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ function pull_and_postprocess_onnx_model_zoo() {
mkdir -p test_data_set_0
mv *.pb test_data_set_0/

# Save SHA of successfully post processed repository
git rev-parse HEAD > onnx_sha
}

function update_onnx_models() {
Expand All @@ -81,7 +83,7 @@ function update_onnx_models() {
pull_and_postprocess_onnx_model_zoo
else
# Check if ONNX Model Zoo directory consists of proper git repo
git_remote_url=`git -C $ONNX_MODELS_DIR config --local remote.origin.url 2> /dev/null 2>&1`
export git_remote_url=`git -C $ONNX_MODELS_DIR config --local remote.origin.url 2> /dev/null 2>&1`
printf "ONNX Model Zoo repository exists: %s\n" "$ONNX_MODELS_DIR"
if [[ $git_remote_url = "https://github.com/onnx/models.git" ]]; then
printf "The proper github repository detected: %s\n" "$git_remote_url"
Expand All @@ -92,7 +94,7 @@ function update_onnx_models() {
fi

cd "$ONNX_MODELS_DIR"
CURRENT_ONNX_MODELS_SHA=`git rev-parse HEAD`
export CURRENT_ONNX_MODELS_SHA=`head -n1 onnx_sha 2> /dev/null 2>&1`
if [[ $ONNX_SHA = $CURRENT_ONNX_MODELS_SHA ]] ; then
echo "ONNX Model Zoo repository is in the right state"
else
Expand Down

0 comments on commit ef50d78

Please sign in to comment.