File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,13 @@ phases:
22
22
- cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
23
23
- 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
24
24
- 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
25
26
- cd $CODEBUILD_SRC_DIR_tornasole_rules && git checkout $RULES_BRANCH && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
26
27
- cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p $CURRENT_COMMIT_PATH && cp ./dist/*.whl $CURRENT_COMMIT_PATH && cd ..
27
28
- 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 ..
28
29
- 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
29
30
- 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
30
32
- if [ "$CODEBUILD_GIT_BRANCH" = "master" ] && [ "$CODEBUILD_WEBHOOK_EVENT" = "PUSH" ] ; then aws s3 cp $CODEBUILD_SRC_DIR/wheels s3://tornasolecodebuildtest/ --recursive ; fi
31
33
32
34
post_build :
Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ tf_repo="tornasole_tf"
6
6
mxnet_repo=" tornasole_mxnet"
7
7
8
8
9
- if [ -z " ${CODEBUILD_BUILD_IMAGE##* tensorflow* } " ] ; then export framework=" tensorflow" ; else export framework=" mxnet" ; fi
10
9
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
11
14
12
15
export CODEBUILD_GIT_BRANCH=" $( git symbolic-ref HEAD --short 2> /dev/null) "
13
16
if [ " $CODEBUILD_GIT_BRANCH " = " " ] ; then
@@ -39,7 +42,7 @@ RULES_BRANCH=$BRANCH ;
39
42
MXNET_BRANCH=$BRANCH ;
40
43
41
44
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
43
46
file=" config/configure_branch_for_test.txt"
44
47
while IFS=: read -r repo_name default_or_branchname
45
48
do
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ elif [ "$framework" = "mxnet" ]
13
13
then
14
14
echo " Launching testing job using $framework framework"
15
15
16
+ elif [ " $framework " = " pytorch" ]
17
+ then
18
+ echo " Launching testing job using $framework framework"
19
+
20
+
16
21
else
17
22
echo " $framework framework not supported!!!"
18
23
exit 1
You can’t perform that action at this time.
0 commit comments