Practical overview
When it fits
Use Lightwood when a Python-based prediction workflow needs a generated starting pipeline that can be inspected and customized, including workflows involving supported mixed data types or time-series dependencies.
Who it is for
- Python developers building predictive machine-learning workflows.
- Data science and machine-learning practitioners who want generated pipeline scaffolding they can customize.
- Developers creating reusable data-preparation or modeling components.
Documented uses
- Generate pipeline code from a prediction task and target column.
- Prepare, encode and split data as part of a machine-learning workflow.
- Train a Predictor from a pandas DataFrame.
- Override pipeline defaults or supply custom cleaners, splitters, explainers or mixers.
Requirements & limits
The repository is public and identifies the project as GPL-3.0 licensed. The README documents pip installation and recommends a Python virtual environment.
- The documented development environment uses Python >=3.8 and
- The quick-start workflow requires a DataFrame and a named target column.
- Lightwood predominantly uses PyTorch-based approaches, while also supporting other models.
- Custom components must follow the abstractions for their pipeline stage.
- The framework supports numbers, dates, categories, tags, text, arrays and multimedia formats, plus a time-series mode.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate and train a prediction pipeline from a DataFrame
Create a Lightwood Predictor for a dataset by specifying its target column and training from the raw DataFrame.
Before you start
- Python environment with Lightwood installed; the README documents pip installation and recommends a virtual environment.
- A pandas DataFrame containing the prediction target column.
Steps
Load the dataset into a pandas DataFrame.
Create a ProblemDefinition with the target column name.
Generate JSON-AI with json_ai_from_problem, then generate Python pipeline code with code_from_json_ai.
Create a Predictor using predictor_from_code and train it with predictor.learn(df).
Expected outcome
A trained Predictor built from the generated pipeline; the README's example then preprocesses and splits data before requesting predictions.
Guide limitations
- The example requires a target column in the DataFrame.
- This guide covers the README's example workflow; it does not establish performance or compatibility for a particular dataset or environment.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 November 2026
- Original website title
- mindsdb/lightwood · Official homepage title · retained in its source language

