Make scikit-learn an optional dependency
Open
@amol- is already working on this.
Since Jul 28, 2026.
- Dominant language
- Python
- Stars
- 120
- Forks
- 9
- Avg merge
- 11d 6m
- Merged PRs (30d)
- 2
Description
Goal
Turn scikit-learn (and skl2onnx) into an optional dependency, mirroring how PyTorch support works: users who only need parse_pytorch_model can install orbital without pulling scikit-learn/skl2onnx.
Done when:
- A PyTorch-only install does not include scikit-learn/skl2onnx.
import orbitalworks without scikit-learn installed; callingparse_pipeline(or other sklearn-only entry points) without it raises a clearImportErrorpointing to the extra to install (e.g.pip install orbital[sklearn]).- Decide and document what a bare
pip install orbitalprovides (keep sklearn for backward compatibility vs. fully optional extras for both frameworks).
Why
PyTorch users currently pay for dependencies they never use: scikit-learn, skl2onnx, and packaging are unconditional core deps. Symmetric treatment of both frameworks keeps installs lean and the dependency story coherent.
References
pyproject.toml(dependencies:scikit-learn,skl2onnx,packaging— the latter noted as required by skl2onnx converters)src/orbital/ast.py(module-levelskl2onnx/sklearn.pipelineimports,parse_pipeline)src/orbital/types.py(wrapsskl2onnx.common.data_types— types are shared by all parse paths, so this import is the hard knot)- Branch
nnet(not yet on main):parse_pytorch_modellazy-import pattern and thepytorchextra — the model to replicate
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.