Sliceline
Sliceline is a Python library for fast slice finding for Machine Learning model debugging.
It is an implementation of SliceLine: Fast, Linear-Algebra-based Slice Finding for ML Model Debugging, from Svetlana Sagadeeva and Matthias Boehm of Graz University of Technology.
👉 Getting started
Given an input dataset X and a model error vector errors, SliceLine finds the top slices in X that identify where a ML model performs significantly worse.
You can use sliceline as follows:
from sliceline.slicefinder import Slicefinder
slice_finder = Slicefinder()
slice_finder.fit(X, errors)
print(slice_finder.top_slices_)
X_trans = slice_finder.transform(X)
We invite you to check the demo notebooks for a more thorough tutorial:
Implementing Sliceline on Titanic dataset
Implementing Sliceline on California housing dataset
🛠 Installation
Sliceline is intended to work with Python 3.10 or above. Installation can be done with pip:
pip install sliceline
There are wheels available for Linux, MacOS, and Windows, which means that you most probably won’t have to build Sliceline from source.
You can install the latest development version from GitHub as so:
pip install git+https://github.com/DataDome/sliceline --upgrade
Or, through SSH:
pip install git+ssh://git@github.com/datadome/sliceline.git --upgrade
⚡ Performance Optimization
Sliceline includes optional Numba JIT compilation for 5-50x performance improvements on scoring operations.
Quick Installation:
# With optimization support
pip install sliceline[optimized]
Benefits:
5-6x faster scoring operations
1.4-4.5x faster overall fit() performance
Up to 17% memory reduction on large datasets
Automatic fallback to pure NumPy if Numba not available
Disabling Numba:
If you need to disable Numba JIT (e.g., in restricted environments), set the environment variable:
export NUMBA_DISABLE_JIT=1
Docker / Read-only Filesystems:
Numba requires a writable cache directory. In Docker containers or read-only filesystems, set NUMBA_CACHE_DIR to a writable path:
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
If the cache directory is not writable, Sliceline will automatically fall back to pure NumPy.
Verify Optimization:
from sliceline import is_numba_available
print("Numba available:", is_numba_available())
See the performance benchmarks for detailed metrics.
🔗 Useful links
👐 Contributing
Feel free to contribute in any way you like, we’re always open to new ideas and approaches.
Open a discussion if you have any question or enquiry whatsoever. It’s more useful to ask your question in public rather than sending us a private email. It’s also encouraged to open a discussion before contributing, so that everyone is aligned and unnecessary work is avoided.
Feel welcome to open an issue if you think you’ve spotted a bug or a performance issue.
Please check out the contribution guidelines if you want to bring modifications to the code base.
📝 License
Sliceline is free and open-source software licensed under the 3-clause BSD license.
Metadata
Release files for sliceline 0.3.1
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 |
|---|---|---|---|---|
| sliceline-0.3.1.tar.gz | 65.8 kB | With provenance | Details for sliceline-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sliceline-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for sliceline-0.3.1-py3-none-any.whl |
Total release size: 88.2 kB
Release files / sliceline-0.3.1.tar.gz
| Download URL | sliceline-0.3.1.tar.gz |
|---|---|
| Size | 65.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bc43cf876fa9f607ee48f923ab107833c312e47b516d3d74b454ed2be96eaf3
|
|
BLAKE2b-256 checksum How to use checksums |
4da8269c35f18cacc9e611eef159733acfefab4e31e9f0cbee9c490e8acbed64
|
| 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 23, 2026.
Transparency logRelease files / sliceline-0.3.1-py3-none-any.whl
| Download URL | sliceline-0.3.1-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e031911d182b9ea529bef11a5851408c33f4ead5b02f121126e2573f8a07dfb
|
|
BLAKE2b-256 checksum How to use checksums |
9891da6d42690541bce9366a995dcaa641e1033bd47c905c6b269a577c9a13a6
|
| 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 23, 2026.
Transparency logSecurity for sliceline 0.3.1
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 sliceline-0.3.1.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 23, 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.