Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-651] MXNet Model Backwards Compatibility Checker #11626

Merged
merged 61 commits into from Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4ee8b21
Added MNIST-MLP-Module-API models to check model save and load_checkp…
piyushghai Jul 6, 2018
118850f
Added LENET with Conv2D operator training file
piyushghai Jul 6, 2018
27863fd
Added LENET with Conv2d operator inference file
piyushghai Jul 6, 2018
b3e9774
Added LanguageModelling with RNN training file
piyushghai Jul 7, 2018
c141701
Added LamguageModelling with RNN inference file
piyushghai Jul 7, 2018
35cbefb
Added hybridized LENET Gluon Model training file
piyushghai Jul 9, 2018
418f805
Added hybridized LENET gluon model inference file
piyushghai Jul 9, 2018
600efaf
Added license headers
piyushghai Jul 9, 2018
d73b9e2
Refactored the model and inference files and extracted out duplicate …
piyushghai Jul 9, 2018
3eeba08
Added runtime function for executing the MBCC files
piyushghai Jul 10, 2018
9c0157c
Added JenkinsFile for MBCC to be run as a nightly job
piyushghai Jul 10, 2018
3d43bcd
Added boto3 install for s3 uploads
piyushghai Jul 10, 2018
4b70e4a
Added README for MBCC
piyushghai Jul 10, 2018
08ad342
Added license header
piyushghai Jul 10, 2018
5d1c3fc
Added more common functions from lm_rnn_gluon_train and inference fil…
piyushghai Jul 10, 2018
cfe8dfc
Added scripts for training models on older versions of MXNet
piyushghai Jul 11, 2018
7c41488
Added check for preventing inference script from crashing in case no …
piyushghai Jul 11, 2018
50be5d8
Fixed indentation issue
piyushghai Jul 11, 2018
c3c9129
Replaced Penn Tree Bank Dataset with Sherlock Holmes Dataset
piyushghai Jul 11, 2018
3485352
Fixed indentation issue
piyushghai Jul 11, 2018
af9b86d
Removed training in models and added smaller models. Now we are simpl…
piyushghai Jul 12, 2018
79cfa46
Updated README
piyushghai Jul 12, 2018
4df779b
Fixed indentation error
piyushghai Jul 12, 2018
04465b0
Fixed indentation error
piyushghai Jul 12, 2018
2d5cf09
Removed code duplication in the training file
piyushghai Jul 13, 2018
7bfdf87
Added comments for runtime_functions script for training files
piyushghai Jul 16, 2018
c80ee31
Merged S3 Buckets for storing data and models into one
piyushghai Jul 16, 2018
e764d5a
Automated the process to fetch MXNet versions from git tags
piyushghai Jul 16, 2018
05ded05
Added defensive checks for the case where the data might not be found
piyushghai Jul 16, 2018
60c7be0
Fixed issue where we were performing inference on state model files
piyushghai Jul 16, 2018
9d4d099
Replaced print statements with logging ones
piyushghai Jul 18, 2018
d08ba5a
Merge branch 'master' into mbcc
piyushghai Jul 25, 2018
cebfb26
Removed boto install statements and move them into ubuntu_python docker
piyushghai Jul 25, 2018
f7a36eb
Separated training and uploading of models into separate files so tha…
piyushghai Jul 25, 2018
1f63941
Updated comments and README
piyushghai Jul 26, 2018
fbaf3e0
Fixed pylint warnings
piyushghai Jul 26, 2018
edd6816
Removed the venv for training process
piyushghai Jul 26, 2018
87103d4
Fixed indentation in the MBCC Jenkins file and also separated out tra…
piyushghai Jul 26, 2018
eb24e8e
Fixed indendation
piyushghai Jul 26, 2018
3525656
Fixed erroneous single quote
piyushghai Jul 26, 2018
25e7ec7
Added --user flag to check for Jenkins error
piyushghai Jul 26, 2018
00ee6e7
Removed unused methods
piyushghai Jul 26, 2018
a3a72b8
Added force flag in the pip command to install mxnet
piyushghai Jul 26, 2018
86e8882
Removed the force-re-install flag
piyushghai Jul 26, 2018
ddb672a
Changed exit 1 to exit 0
piyushghai Jul 26, 2018
9e77064
Added quotes around the shell command
piyushghai Jul 26, 2018
69843fb
added packlibs and unpack libs for MXNet builds
piyushghai Jul 26, 2018
fae44fe
Changed PythonPath from relative to absolute
piyushghai Jul 27, 2018
c099979
Created dedicated bucket with correct permission
marcoabreu Jul 30, 2018
ffcc637
Fix for python path in training
piyushghai Jul 30, 2018
7f7f6e3
Merge branch 'mbcc' of https://github.com/piyushghai/incubator-mxnet …
piyushghai Jul 30, 2018
33096c0
Changed bucket name to CI bucket
piyushghai Jul 30, 2018
8a085b5
Added set -ex to the upload shell script
piyushghai Jul 30, 2018
5207ab1
Now raising an exception if no models are found in the S3 bucket
piyushghai Jul 30, 2018
5e30f7a
Added regex to train models script
piyushghai Jul 30, 2018
e079d3c
Added check for performing inference only on models trained on same m…
piyushghai Jul 30, 2018
ceac705
Added set -ex flags to shell scripts
piyushghai Jul 30, 2018
16d320a
Added multi-version regex checks in training
piyushghai Jul 30, 2018
19495d6
Fixed typo in regex
piyushghai Jul 30, 2018
d8fa75d
Now we will train models for all the minor versions for a given major…
piyushghai Jul 30, 2018
ca01aa2
Added check for validating current_version
piyushghai Jul 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/nightly/model_backwards_compatibility_check/common.py
Expand Up @@ -125,11 +125,19 @@ def get_top_level_folders_in_bucket(s3client, bucket_name):
return folder_list
for obj in result['CommonPrefixes']:
folder_name = obj['Prefix'].strip(backslash)
# We only compare models from the same major versions. i.e. 1.x.x compared with latest 1.y.y etc
if str(folder_name).split('.')[0] != str(mxnet_version).split('.')[0]:
continue
# The top level folders contain MXNet Version # for trained models. Skipping the data folder here
if folder_name == data_folder:
continue
folder_list.append(obj['Prefix'].strip(backslash))

if len(folder_list) == 0:
logging.error('No trained models found in S3 bucket : %s for this file. '
'Please train the models and run inference again' % bucket_name)
raise Exception("No trained models found in S3 bucket : %s for this file. "
"Please train the models and run inference again" % bucket_name)
return folder_list


Expand Down
Expand Up @@ -38,14 +38,14 @@ cd tests/nightly/model_backwards_compatibility_check
echo `pwd`

## Fetch the latest release tags, filtering out 'rcs' and filtering out some other irrelevant ones
## This list is sorted in descending order chronologically. Keeping n = 5 for a precautionary check.
## This list is sorted in descending order chronologically.
## Sample output for the below git tag command is : 1.2.0 utils 1.1.0 1.0.0 0.12.1
## so from this sample we will pick up the top two : 1.2.0 and 1.1.0 and train models on them
## Now while performing inference the latest version could be 1.3.0, which will help in validating models trained
## on 1.1.0 and 1.2.0 by loading them on the latest version (1.3.0)
## Over a period of time, the model repository will grow since with every new release we
## upload models trained on newer versions as well through this script
previous_versions=($(git tag --sort=-creatordate | grep --invert-match rc | head -n 5))
previous_versions=($(git tag --sort=-creatordate | grep --invert-match rc))
count=0
for version in ${previous_versions[*]}
do
Expand All @@ -57,10 +57,10 @@ do
fi

## If MXNet major version starts with a number >=1. with a wildcard match for the minor version numbers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this handle different major versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex below filters out the versions. Also, since the git tag command is giving results in descending order chronologically, we get the latest set of tags. When I was running the git tag command, I found couple of tags with names such as "utils" which do not seem to be a release version IMO. So I added this regex to filter out release versions starting with a number.
I already have added comments for this before the for loop above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It handles here : d8fa75d.

if [[ $version = [1-9]* ]]
if [[ $version = [1-9].[0-9].[0-9] ]]
piyushghai marked this conversation as resolved.
Show resolved Hide resolved
then
count=$((count + 1))
# echo $version
#echo $version
install_mxnet $version
run_models
fi
Expand Down