Skip to content

Commit 0ae1a35

Browse files
nlathiaNeal Lathia
andauthored
Add support for PySpark MLLib models (#215)
* Create PySpark manager * Fix date * Remove docs * Add java and shebangs * Add pyspark model tests * Add other model types * Add pyspark example * Fix paths in unit tests * Cast posix path to str * Fix paths * Fix test * Freeze dependencies (versions are in tests) * Loosen flake8 requirements * Loosen flake8 requirements * Fix version in test * Run black * Loosen pandas requirement Co-authored-by: Neal Lathia <neallathia@gmail.com>
1 parent a69a917 commit 0ae1a35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+732
-450
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
Added support for any s3-compatible object storage that you can access via [MinIO](https://min.io/): `ModelStore.from_minio()`.
88

9+
Added support for [Spark ML Lib](https://spark.apache.org/) models.
10+
911
You can move model stores that you created in one file system directory to another one (e.g., making it a mounted volume in a container) and `modelstore` will continue to work ([#209](https://github.com/operatorai/modelstore/pull/209), thanks [@hauks96](https://github.com/operatorai/modelstore/issues/189)).
1012

1113
**🐛 Bug fixes & general updates**

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pip install modelstore
5858
* [Scikit Learn](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/sklearn_example.py)
5959
* [Skorch](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/skorch_example.py)
6060
* [Shap](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/shap_example.py)
61+
* [Spark ML Lib](https://spark.apache.org/)
6162
* [Tensorflow](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/tensorflow_example.py)
6263
* [Transformers](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/transformers_example.py)
6364
* [XGBoost](https://github.com/operatorai/modelstore/blob/main/examples/examples-by-ml-library/libraries/xgboost_example.py)

bin/_build_library

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
VIRTUALENV_NAME=$(pyenv local)

bin/_cleanup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
echo "\n 🧼 Removing pycache files"
23
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
34

bin/_config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
#export PYTHON_VERSION=3.7.13
23
export PYTHON_VERSION=3.8.12
34
#export PYTHON_VERSION=3.9.9

bin/_release_prod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
echo "\n ⏱ Uploading library to pypi..."

bin/_release_test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
echo "\n ⏱ Uploading library to testpypi..."

bin/_remove_pyenv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
source $(dirname $0)/_config

bin/_setup_brew

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
echo "\n ⏱ Running brew update and installing libomp"
@@ -16,4 +17,7 @@ export CXX=g++-11
1617
# https://github.com/dmlc/xgboost/issues/7039
1718
brew install rajivshah3/libomp-tap/libomp@11.1.0
1819

20+
# To use pyspark
21+
brew install java
22+
1923
echo "\n ✅ Done."

bin/_setup_pyenv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -e
23

34
source $(dirname $0)/_config

0 commit comments

Comments
 (0)