-
Notifications
You must be signed in to change notification settings - Fork 2.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
PySparkTask fix for bytes / str type error and import error #2168
Conversation
…g brace in pattern.
@ntim, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jthi3rry, @ehdr and @steenzout to be potential reviewers. |
… the run directory and add the run directory to the PYTHON_PATH.
Fixes #1576 by coping the python file in which the class of the job instance is defined to the run path to which the instance is pickled. Then in the pyspark_runner.py included the run path to the PYTHON_PATH at run time. |
Would it possible to unittest this? Even if you can't run a spark task (that would be ideal) you could ensure xyz is pickle-able? |
I am now able to run spark tasks with luigi, I will look into the existing spark unit tests. |
@Tarrasch added some simple checks to see if the unpickling of the task instance works |
@ntim, cool just double-check, the test-case failed before this patch right? |
Seems there also flake 8 error: https://travis-ci.org/spotify/luigi/jobs/249591300 |
Ah sorry, forgot to uncomment an assertion, tests are all green now. |
@Tarrasch can you please merge? |
Description
With master, the following exception occurs when e.g. executing the "pyspark_wc.py" example:
Motivation and Context
Resolves the issue with python 3.6 and python 2.7
Have you tested this? If so, how?
This stage can now be successful executed given the pyspark_wc.py file is put in the PYTHON_PATH (see #1576)
Resolves #1988