Skip to content

Commit

Permalink
sync with elyra main library
Browse files Browse the repository at this point in the history
  • Loading branch information
Romeo Kienzer committed Aug 10, 2021
1 parent ada4162 commit e34071e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 11 additions & 1 deletion component-library/input/input-hmp.ipynb
Expand Up @@ -14,7 +14,17 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install pyspark==2.4.4"
"%%bash\n",
"export version=`python --version |awk '{print $2}' |awk -F\".\" '{print $1$2}'`\n",
"\n",
"if [ $version == '36' ]; then\n",
" pip install pyspark==2.4.8 wget==3.2 pyspark2pmml==0.5.1\n",
"elif [ $version == '38' ]; then\n",
" pip install pyspark==3.1.2 wget==3.2 pyspark2pmml==0.5.1\n",
"else\n",
" echo 'Currently only python 3.6 and 3.8 is supported, in case you need a different version please open an issue at https://github.com/elyra-ai/component-library/issues'\n",
" exit -1\n",
"fi"
]
},
{
Expand Down
7 changes: 4 additions & 3 deletions component-library/train/spark-train-lr.ipynb
Expand Up @@ -48,7 +48,8 @@
"from pyspark.ml.feature import StringIndexer\n",
"from pyspark.ml.feature import VectorAssembler\n",
"from pyspark.ml.feature import MinMaxScaler\n",
"import sys"
"import sys\n",
"import wget"
]
},
{
Expand All @@ -61,8 +62,8 @@
" url = ('https://github.com/jpmml/jpmml-sparkml/releases/download/1.7.2/'\n",
" 'jpmml-sparkml-executable-1.7.2.jar')\n",
" wget.download(url)\n",
" shutil.copy('jpmml-sparkml-executable-1.7.2.jar', site.getsitepackages()[0]\n",
" '/pyspark/jars/')\n",
" shutil.copy('jpmml-sparkml-executable-1.7.2.jar',\n",
" site.getsitepackages()[0] + '/pyspark/jars/')\n",
"elif sys.version[0:3] == '3.6':\n",
" url = ('https://github.com/jpmml/jpmml-sparkml/releases/download/1.5.12/' \n",
" 'jpmml-sparkml-executable-1.5.12.jar')\n",
Expand Down

0 comments on commit e34071e

Please sign in to comment.