joblibspark-fabric
An independently maintained fork of joblib-spark
that provides an Apache Spark backend for joblib. Releases are maintained in
thinkall/joblib-spark-fabric, independently of upstream.
The distribution name is joblibspark-fabric; the Python namespace remains
joblibspark, including register_spark() and the 'spark' backend name.
This is a community fork, not an official Microsoft distribution. The upstream Apache-2.0 license and attribution are retained; fork changes are recorded in CHANGES.rst.
Installation
Requirements: Python 3.11-3.14, joblib >1.0, and PySpark 3.5 through 4.3.0. Use a Python version supported by your PySpark release:
| PySpark | Python versions within this fork's support range | Spark Connect |
|---|---|---|
| 3.5.x | 3.11 | No |
| 4.0.x | 3.11-3.13 | Yes |
| 4.1.x, 4.2.x, 4.3.0 | 3.11-3.14 | Yes |
Older joblib releases are tested on older Python versions. Use a current joblib release on newer Python versions; the dependency range does not imply that every historical joblib release supports every Python version.
Do not install joblibspark and joblibspark-fabric together: both provide
the same import namespace. To migrate an existing environment:
python -m pip uninstall joblibspark
python -m pip install joblibspark-fabric
The base installation deliberately does not install or replace PySpark in managed environments such as Fabric. If PySpark is not already installed, use an extra:
python -m pip install "joblibspark-fabric[spark]"
# Spark Connect, including its pandas, Arrow, and gRPC dependencies:
python -m pip install "joblibspark-fabric[connect]"
Install scikit-learn separately if you use the examples below.
Examples
Run following example code in pyspark shell:
from joblib import parallel_backend
from sklearn.model_selection import cross_val_score
from sklearn import datasets
from sklearn import svm
from joblibspark import register_spark
register_spark() # register spark backend
iris = datasets.load_iris()
clf = svm.SVC(kernel='linear', C=1)
with parallel_backend('spark', n_jobs=3):
scores = cross_val_score(clf, iris.data, iris.target, cv=5)
print(scores)
Development and releases
python -m pip install -e ".[test,connect]" scikit-learn build twine
python -m pytest test
python -m pylint joblibspark
python -m build
python -m twine check dist/*
CI tests each supported Spark release line on Python 3.11, and Python 3.12-3.14
with Spark 4.3.0, in classic and supported Connect modes. Additional legacy-joblib
jobs cover Spark 3.5 classic and Spark 4.0 Connect. This is representative coverage,
not the full Cartesian product of the compatibility table. Integration tests use Java
17 for Spark 3.5 and Java 21 for Spark 4, and run local Spark clusters;
the simulated GPU resource tests require Linux.
To run Connect tests, set TEST_SPARK_CONNECT=true.
Releases publish to the separate joblibspark-fabric project on PyPI using
Trusted Publishing, without an upstream release or a stored API token:
- Enable GitHub Actions on the fork. Configure a PyPI pending publisher for
project
joblibspark-fabric, GitHub ownerthinkall, repositoryjoblib-spark-fabric, workflowrelease.yml, and environmentpypi. Configure approval protection for that GitHub environment. - Update
joblibspark.__version__andCHANGES.rst. - Publish a GitHub release with a matching tag, such as
v0.7.0. The release workflow checks the version, runs CI, builds the distributions, and publishes only after thepypienvironment is approved.
Limitations
joblibspark does not generally support run model inference and feature engineering in parallel.
For example:
from sklearn.feature_extraction import FeatureHasher
h = FeatureHasher(n_features=10)
with parallel_backend('spark', n_jobs=3):
# This won't run parallelly on spark, it will still run locally.
h.transform(...)
from sklearn import linear_model
regr = linear_model.LinearRegression()
regr.fit(X_train, y_train)
with parallel_backend('spark', n_jobs=3):
# This won't run parallelly on spark, it will still run locally.
regr.predict(diabetes_X_test)
Note: for sklearn.ensemble.RandomForestClassifier, there is a n_jobs parameter,
that means the algorithm support model training/inference in parallel,
but in its inference implementation, it bind the backend to built-in backends,
so the spark backend not work for this case.
Metadata
Release files for joblibspark-fabric 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| joblibspark_fabric-0.7.0.tar.gz | 20.1 kB | With provenance | Details for joblibspark_fabric-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| joblibspark_fabric-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for joblibspark_fabric-0.7.0-py3-none-any.whl |
Total release size: 34.4 kB
Release files / joblibspark_fabric-0.7.0.tar.gz
| Download URL | joblibspark_fabric-0.7.0.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ff421a2fb5c0f3b1ddbf7b660a10d6ff70b2e965d2b4aa56c78c147dcd15c90
|
|
BLAKE2b-256 checksum How to use checksums |
4e5eca703235161d2f69f6814d361eb027828d121d58acb0ae01ba018388def9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / joblibspark_fabric-0.7.0-py3-none-any.whl
| Download URL | joblibspark_fabric-0.7.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
044f53aa020f8553c72a328e8e21b784ec61510c97b25c510cc92260f7a13dd4
|
|
BLAKE2b-256 checksum How to use checksums |
8878f2510ac324120459f867b3515c0f5aba387ea927d2cf532b1f2f933f7b9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for joblibspark-fabric 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for joblibspark_fabric-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.