File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,25 +28,12 @@ if [ $? -eq 0 ]
2828then
2929 echo " Successfully executed action script, optionally executing the model notebook and uploading the model file to Algorithmia."
3030
31- if ! [ -e $INPUT_ALGORITHMIA_ALGONAME .py ]
31+ if [ -d $INPUT_ALGORITHMIA_ALGONAME ]
3232 then
33- echo " $INPUT_ALGORITHMIA_ALGONAME .py does not exist. Checking if $INPUT_ALGORITHMIA_ALGONAME .ipynb exists."
34- if [ -e $INPUT_ALGORITHMIA_ALGONAME .ipynb ]
35- then
36- echo " Found $INPUT_ALGORITHMIA_ALGONAME .ipynb. Will convert this into .py before pushing it to Algorithmia."
37- jupyter nbconvert --to script $INPUT_ALGORITHMIA_ALGONAME .ipynb
38- else
39- echo " Neither $INPUT_ALGORITHMIA_ALGONAME .ipynb or $INPUT_ALGORITHMIA_ALGONAME .py exist."
40- fi
41- fi
42-
43- if [ -e $INPUT_ALGORITHMIA_ALGONAME .py ]
44- then
45- echo " Will copy and push $INPUT_ALGORITHMIA_ALGONAME .py to Algorithm repository."
46- cp -R " $INPUT_ALGORITHMIA_ALGONAME .py" $CI_ALGO_DIR /src/
47- cp -R requirements.txt $CI_ALGO_DIR /requirements.txt
33+ echo " Will copy and push the contents of $INPUT_ALGORITHMIA_ALGONAME directory to Algorithm repository."
34+ cp -a " $INPUT_ALGORITHMIA_ALGONAME " /. $CI_ALGO_DIR /
4835 else
49- echo " Will not copy any inference code to Algorithmia."
36+ echo " Could not locate the algorithm directory to push to Algorithmia."
5037 fi
5138
5239 cd $CI_ALGO_DIR
You can’t perform that action at this time.
0 commit comments