Skip to content

Commit 820d56b

Browse files
kaustubhsardarrahul003
authored andcommitted
fixed configure branch issue (aws#71)
1 parent 31009f0 commit 820d56b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

config/buildspec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ phases:
2222
- cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
2323
- if [ $framework = "tensorflow" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_tf && git checkout $TF_BRANCH && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd .. ; fi
2424
- if [ $framework = "mxnet" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_mxnet && git checkout $MXNET_BRANCH && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd .. ; fi
25+
- if [ $framework = "pytorch" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_tf && git checkout $TF_BRANCH && cd tornasole_pytorch && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd .. ; fi
2526
- cd $CODEBUILD_SRC_DIR_tornasole_rules && git checkout $RULES_BRANCH && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
2627
- cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $CURRENT_COMMIT_PATH && cp ./dist/*.whl $CURRENT_COMMIT_PATH && cd ..
2728
- cd $CODEBUILD_SRC_DIR_tornasole_rules && git checkout $RULES_BRANCH && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $RULES_PATH && cp ./dist/*.whl $RULES_PATH && cd ..
2829
- if [ $framework = "tensorflow" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_tf && git checkout $TF_BRANCH && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $TF_PATH && cp ./dist/*.whl $TF_PATH && cd .. ; fi
2930
- if [ $framework = "mxnet" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_mxnet && git checkout $MXNET_BRANCH && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $MXNET_PATH && cp ./dist/*.whl $MXNET_PATH && cd .. ; fi
31+
- if [ $framework = "pytorch" ] ; then cd $CODEBUILD_SRC_DIR_tornasole_tf && git checkout $TF_BRANCH && cd tornasole_pytorch && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $TF_PATH && cp ./dist/*.whl $TF_PATH && cd .. ; fi
3032
- if [ "$CODEBUILD_GIT_BRANCH" = "master" ] && [ "$CODEBUILD_WEBHOOK_EVENT" = "PUSH" ] ; then aws s3 cp $CODEBUILD_SRC_DIR/wheels s3://tornasolecodebuildtest/ --recursive ; fi
3133

3234
post_build:

config/get-branch.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ tf_repo="tornasole_tf"
66
mxnet_repo="tornasole_mxnet"
77

88

9-
if [ -z "${CODEBUILD_BUILD_IMAGE##*tensorflow*}" ] ; then export framework="tensorflow"; else export framework="mxnet" ; fi
109

10+
if [ -z "${CODEBUILD_BUILD_IMAGE##*tensorflow*}" ] ; then export framework="tensorflow";
11+
elif [ -z "${CODEBUILD_BUILD_IMAGE##*mxnet*}" ] ; then export framework="mxnet";
12+
elif [ -z "${CODEBUILD_BUILD_IMAGE##*pytorch*}" ] ; then export framework="pytorch";
13+
fi
1114

1215
export CODEBUILD_GIT_BRANCH="$(git symbolic-ref HEAD --short 2>/dev/null)"
1316
if [ "$CODEBUILD_GIT_BRANCH" = "" ] ; then
@@ -39,7 +42,7 @@ RULES_BRANCH=$BRANCH ;
3942
MXNET_BRANCH=$BRANCH ;
4043

4144

42-
if [ "$CODEBUILD_GIT_BRANCH" != "alpha" ] && [ "$CODEBUILD_GIT_BRANCH" != "master" ] ; then
45+
if [ "$CODEBUILD_GIT_BRANCH" != "alpha" ] && [ "$CODEBUILD_GIT_BRANCH" != "master" ] && [ "$CODEBUILD_WEBHOOK_EVENT" != "PUSH" ] ; then
4346
file="config/configure_branch_for_test.txt"
4447
while IFS=: read -r repo_name default_or_branchname
4548
do

config/tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ elif [ "$framework" = "mxnet" ]
1313
then
1414
echo "Launching testing job using $framework framework"
1515

16+
elif [ "$framework" = "pytorch" ]
17+
then
18+
echo "Launching testing job using $framework framework"
19+
20+
1621
else
1722
echo "$framework framework not supported!!!"
1823
exit 1

0 commit comments

Comments
 (0)