-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate MLeap tests and unpin pyspark #4243
Conversation
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
# setting this env variable is needed when using Spark with Arrow >= 0.15.0 | ||
# because of a change in Arrow IPC format | ||
# https://spark.apache.org/docs/latest/sql-pyspark-pandas-with-arrow.html# \ | ||
# compatibiliy-setting-for-pyarrow--0150-and-spark-23x-24x | ||
os.environ["ARROW_PRE_0_15_IPC_FORMAT"] = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes the following error in spark 3.x:
E RuntimeError: Arrow legacy IPC format is not supported in PySpark, please unset ARROW_PRE_0_15_IPC_FORMAT
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
with pytest.raises(Py4JJavaError): | ||
with pytest.raises(pyspark.sql.utils.PythonException): | ||
res = data.withColumn("res1", udf("a", "b")).select("res1").toPandas() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line doesn't raise Py4JJavaError
in pyspark 3.x.
> raise converted from None
E pyspark.sql.utils.PythonException:
E An exception was thrown from the Python worker. Please see the stack trace below.
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@@ -40,7 +40,7 @@ onnxruntime | |||
# mleap format via ``mlflow.spark.log_model``, ``mlflow.spark.save_model`` | |||
mleap | |||
# Required by mlflow.spark | |||
pyspark==2.4.0 | |||
pyspark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyspark>=2.4.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to set the minimum version.
|
||
# MLeap doesn't support spark 3.x (https://github.com/combust/mleap#mleapspark-version) | ||
pip install pyspark==2.4.5 | ||
pytest --verbose tests/spark/test_mleap_model_export.py --large |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a separate CI action for mleap ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need it for now.
* unpin pyspark Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * install pyspark 2.4.5 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Separate mleap tests Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Remove ARROW_PRE_0_15_IPC_FORMAT Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * lint Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix tests Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * remove blankline Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Fix error test Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * remove unused import Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Signed-off-by: Yiqing Wang <yiqing@wangemail.com>
* unpin pyspark Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * install pyspark 2.4.5 Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Separate mleap tests Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Remove ARROW_PRE_0_15_IPC_FORMAT Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * lint Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * fix tests Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * remove blankline Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * Fix error test Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> * remove unused import Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
What changes are proposed in this pull request?
Separate MLeap tests and unpin pyspark to use the latest version
How is this patch tested?
Existing tests
Release Notes
Is this a user-facing change?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/projects
: MLproject format, project running backendsarea/scoring
: Local serving, model deployment tools, spark UDFsarea/server-infra
: MLflow server, JavaScript dev serverarea/tracking
: Tracking Service, tracking client APIs, autologgingInterface
area/uiux
: Front-end, user experience, JavaScript, plottingarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportLanguage
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesIntegrations
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrationsHow should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes