I noticed that the version of pandas available to the pyspark SWAP notebooks is 0.19.2, which was released back in December 2016. Pandas is a fast moving project, so it would be nice to have a more modern version available when working with pyspark.
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Ottomata | T222253 Upgrade Spark to 2.4.x | |||
| Resolved | Ottomata | T222301 Upgrade pandas in spark SWAP notebooks |
Event Timeline
The 0.19.2 version is the one shipped with Debian Stretch: https://packages.debian.org/search?keywords=python3-pandas
When we'll upgrade to Debian Buster (not scheduled yet) we'll jump to 0.23, but upgrading before that it would require us to package our own version of python3-pandas and we usually try to avoid it (since it then requires extra burden on our side to maintain the package etc..). If it is really needed for a project we can surely make an exception, let us know :)
I see, for Python packages I usually use pip instead of Debian since python tends to move much faster than Debian. Of course, I'm just managing this for myself and not supporting a whole organization :), But I'm also curious about why you use Debian for this.
Mainly because of security upgrades, and because of stability in versioning across dependencies, etc.. We allow users to have their venv with pip to use the latest and greatest, and we try to "backport" packages like pyarrow when something more recent is needed on the Hadoop workers. The main problem as you were correctly saying is that we need to trade between ease of maintenance/upgrade vs being up to date with the latest upstream, that is not super easy :)
Having said this, Andrew is planning to work on the Spark 2.4.2 upgrade and he will take a look if pandas could be upgraded as well :)
Having said this, Andrew is planning to work on the Spark 2.4.2 upgrade and he will take a look if pandas could be upgraded as well :)
Sweet! Thank you I appreciate it!
I understand your answer and it makes sense. I wonder if there's a way to have user-level venvs or local versions of packages on the spark worker nodes? I would be surprised if it is elegant, but seems like it might be a common enough problem...
It would be a security problem since keeping track of dependencies for those venvs would require a lot of effort or some automation that we currently don't have.. I'd prefer to wait for common use cases (and pandas seems to be a good one) and then see if we can package it and deploy it. I don't want to give the impression that we want to push back, but on our side we always need to put security first :)
Ok I see. A hostile dependency could be a big problem. I'm not looking to argue, just sincerely curious. I get involved managing a sort of ad-hoc spark setup on the UW cluster, so maybe I can learn something useful :)
We are also open to suggestions, it is a new thing for everybody, so please feel free to create tasks and follow up with us, we don't think you are looking to argue, on the contrary!
Oh @Groceryheist! It is possible to run distributed pyspark jobs with custom virtualenvs. I've never done it, but @EBernhardson knows how. I think he has some documentation, but I can't find it.
Sorry to take so long, been out recently. I documented my process on wikitech in my user space but would be happy to answer any questions.