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 orbital works without scikit-learn installed; calling parse_pipeline (or other sklearn-only entry points) without it raises a clear ImportError pointing to the extra to install (e.g. pip install orbital[sklearn]).
- Decide and document what a bare
pip install orbital provides (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-level skl2onnx/sklearn.pipeline imports, parse_pipeline)
src/orbital/types.py (wraps skl2onnx.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_model lazy-import pattern and the pytorch extra — the model to replicate
Goal
Turn scikit-learn (and skl2onnx) into an optional dependency, mirroring how PyTorch support works: users who only need
parse_pytorch_modelcan install orbital without pulling scikit-learn/skl2onnx.Done when:
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]).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)nnet(not yet on main):parse_pytorch_modellazy-import pattern and thepytorchextra — the model to replicate