Skip to content

Python module cannot find spark package #23

Description

@alpenkar

I'm attempting to use this library to run pytests on sparkML code using the SynapseML package from microsoft. My code runs fine when using spark-submit, however after including the following in my pytest.ini, I still receive a ModuleNotFound error when trying to run my pytests. relevant code is below:

pytest.ini

[pytest]
spark_options =
    spark.app.name: fw-active-ml-core-pytest-spark-tests
    spark.executor.instances: 1
    spark.jars.packages: com.microsoft.azure:synapseml_2.12:0.9.5

failing code

from synapse.ml.lightgbm import LightGBMRegressor as sparkLightGBMRegressor

error

ImportError while importing test module '/Users/alpenkar/Documents/Code/fw-active-ml-core/tests/unit/test_pipeline_library_flow_operations.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/unit/test_pipeline_library_flow_operations.py:12: in <module>
    from fw_active_ml_core.pipeline import PipelineLibrary as pl
fw_active_ml_core/pipeline/PipelineLibrary.py:14: in <module>
    from fw_active_ml_core.pipeline.PipelineLibraryMLOperations import *
fw_active_ml_core/pipeline/PipelineLibraryMLOperations.py:49: in <module>
    from synapse.ml.lightgbm import LightGBMRegressor as sparkLightGBMRegressor
E   ModuleNotFoundError: No module named 'synapse'

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions