Installation Guide for LabChain¶
This guide will walk you through the process of installing LabChain using pip.
Prerequisites¶
Before installing LabChain, ensure you have the following prerequisites:
- Python 3.11 or higher
- pip (Python package installer)
Optional dependency groups¶
LabChain is split into optional extras so you only install what your use case requires:
| Extra | Included packages | Use case |
|---|---|---|
| (none) | typeguard, multimethod, rich, cloudpickle, tqdm, dill |
Core pipeline engine |
data |
pandas, scipy, scikit-learn |
Classical ML |
dl |
torch, transformers, sentence-transformers |
Deep learning |
nlp |
nltk, gensim |
NLP |
tracking |
wandb, optuna |
Experiment tracking & optimization |
spark |
pyspark |
Distributed processing |
aws |
boto3, fastapi |
Cloud storage & serving |
dev |
pytest, pytest-mock, pytest-cov, ruff, moto, ipykernel |
Development |
Installation¶
Step 1: Set Up a Virtual Environment (Recommended)¶
Activate the virtual environment:
- On Windows:
- On macOS and Linux:
Step 2: Install LabChain¶
Core only (pipeline engine, caching, serialization):
With specific extras:
# Classical ML
pip install "framework3[data]"
# Deep learning
pip install "framework3[dl]"
# NLP
pip install "framework3[nlp]"
# Experiment tracking & optimization
pip install "framework3[tracking]"
# Distributed processing
pip install "framework3[spark]"
# Cloud storage & serving
pip install "framework3[aws]"
Combining extras:
# Mix and match what you need
pip install "framework3[data,dl,tracking]"
# Install everything
pip install "framework3[data,dl,nlp,tracking,spark,aws]"
Verify Installation¶
Updating LabChain¶
To update while keeping your chosen extras:
Troubleshooting¶
If you encounter any issues during installation:
- Ensure your Python version is 3.11 or higher.
- Make sure pip is up to date:
pip install --upgrade pip - If you're using a virtual environment, ensure it's activated when installing and using LabChain.
- If a class or plugin is not found, check that you installed the extra that provides it (see the table above).
For more detailed error messages, you can use the verbose mode when installing:
If problems persist, please check the project's issue tracker on GitHub or reach out to the maintainers for support.
Next Steps¶
Now that you have LabChain installed, you can start using it in your projects. Check out the Quick Start Guide for an introduction to using LabChain, or explore the API Documentation for more detailed information on available modules and functions.