Skip to content

Commit

Permalink
feat: update mlflow version to support newer version of protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
khorshuheng committed Oct 3, 2023
1 parent 072325c commit c5fa123
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/batch-predictor/docker/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ ARG GOOGLE_APPLICATION_CREDENTIALS
RUN if [[ ! -z "$GOOGLE_APPLICATION_CREDENTIALS" ]]; then gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}; fi
RUN gsutil -m cp -r ${MODEL_URL} .
RUN /bin/bash -c ". activate ${CONDA_ENVIRONMENT} && \
sed -i 's/mlflow$/mlflow==1.23.0/' ${HOME}/model/conda.yaml && \
sed -i 's/\bmlflow[^[:space:]]*/mlflow==1.26.1/' ${HOME}/model/conda.yaml && \
conda env update --name ${CONDA_ENVIRONMENT} --file ${HOME}/model/conda.yaml && \
python ${HOME}/merlin-spark-app/main.py --dry-run-model ${HOME}/model"
2 changes: 1 addition & 1 deletion python/batch-predictor/merlinpyspark/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def spark_udf(spark, model_uri, features, result_type="double"):
archive_path = SparkModelCache.add_local_model(spark, local_model_path)

def predict(*args):
model = SparkModelCache.get_or_load(archive_path)
model, _ = SparkModelCache.get_or_load(archive_path)
schema = {features[i]: arg for i, arg in enumerate(args)}
pdf = None
for x in args:
Expand Down
6 changes: 2 additions & 4 deletions python/batch-predictor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
findspark
pyspark==3.0.1
mlflow>=1.2.0,<=1.23.0
mlflow>=1.26.1,<=2.0.0
cloudpickle==2.0.0
pyarrow>=0.14.1,<=9.0.0
protobuf>=3.0,<4.0.0
#TODO: Update merlin-sdk dep to: file:${SDK_PATH}#egg=merlin-sdk
merlin-sdk==0.33.0 # Pin to the version that supports Python 3.7.
file:${SDK_PATH}#egg=merlin-sdk
3 changes: 1 addition & 2 deletions python/sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"cookiecutter>=1.7.2",
"docker>=4.2.1",
"google-cloud-storage>=1.19.0",
"mlflow>=1.2.0,<=1.23.0", # for py3.11 due to proto -> "mlflow>=1.26.1",
"protobuf>=3.0.0,<4.0.0", # for py3.11 due to proto -> "protobuf>=4.0.0,<5.0dev",
"mlflow>=1.26.1,<2.0.0",
"PyPrind>=2.11.2",
"python_dateutil>=2.5.3",
"PyYAML>=5.4",
Expand Down

0 comments on commit c5fa123

Please sign in to comment.