A framework built on top of Ploomber that allows code-first definition of pipelines.
Project description
Code-First Pipelines
A framework built on top of Ploomber that allows code-first definition of pipelines. No YAML needed!
Installation
To get the minimum code needed to use the pipelines, install it from PyPI:
pip install code-first-pipelines
Usage
Pipelines
import pandas as pd
from sklearn import datasets
from cf_pipelines import Pipeline
iris_pipeline = Pipeline("My Cool Pipeline")
@iris_pipeline.step("Data ingestion")
def data_ingestion():
d = datasets.load_iris()
df = pd.DataFrame(d["data"])
df.columns = d["feature_names"]
df["target"] = d["target"]
return {"raw_data.csv": df}
iris_pipeline.run()
See the tutorial notebook for a more comprehensive example.
ML Pipelines
import pandas as pd
from sklearn import datasets
from cf_pipelines.ml import MLPipeline
iris_pipeline = MLPipeline("My Cool Pipeline")
@iris_pipeline.data_ingestion
def data_ingestion():
d = datasets.load_iris()
df = pd.DataFrame(d["data"])
df.columns = d["feature_names"]
df["target"] = d["target"]
return {"raw_data.csv": df}
iris_pipeline.run()
See the tutorial notebook for a more comprehensive example.
Getting started with a template
Once installed, you can create a new pipeline template by running:
pipelines new [pipeline name]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file code-first-pipelines-1.0.0.tar.gz
.
File metadata
- Download URL: code-first-pipelines-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.14 Linux/5.15.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f760de684e3286c3c5a920dfb9f03de60ae94234e237e3e96a49adece61d1ce9 |
|
MD5 | b6ac209ad514313d23294d1f5fd235c5 |
|
BLAKE2b-256 | 777bfa081cfe6edc1b9d86355b6db126f2659b15f71cadb57ebe10e3ba4bb13a |
File details
Details for the file code_first_pipelines-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: code_first_pipelines-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.14 Linux/5.15.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7253ee9833d156e4ed9188959e527915d0499d394a614e012d0367365fd1b3f3 |
|
MD5 | f21176d39ac2c73fc154eb6d1be5fdb8 |
|
BLAKE2b-256 | 3e773514627251f8326f1104deab49d5c900e3af157f17b3d7d0ad37c0713c0a |