pandera plugin for flyte
Project description
Flyte Pandera Plugin
flyteplugins-pandera adds support for pandera.typing.pandas.DataFrame, pandera.typing.polars.DataFrame / LazyFrame, and pandera.typing.pyspark_sql.DataFrame in Flyte v2.
Install:
pip install flyteplugins-pandera 'pandera[pandas]' # pandas only
pip install flyteplugins-pandera 'pandera[polars]' flyteplugins-polars # Polars + structured dataset I/O
pip install flyteplugins-pandera 'pandera[pyspark]' flyteplugins-spark # PySpark SQL + parquet I/O
For PySpark, structured dataset serialization uses Flyte’s DataFrameTransformerEngine parquet handlers from flyteplugins-spark (register Spark encoders/decoders alongside this plugin).
At runtime, the plugin:
- delegates dataframe IO to Flyte's
DataFrameTransformerEngine, - validates data with pandera schemas, and
- writes a validation report to
flyte.report.
Validation always runs on every encode/decode. Report tabs are suppressed automatically when Flyte is only moving literals across a nested-task boundary (parent task encoding child inputs, or materializing a child’s outputs inside the parent). The SDK sets TaskContext.in_driver_literal_conversion on the active task (check with flyte.ctx() when non-None, then .in_driver_literal_conversion) so you see one report per dataframe on the task that actually produced or consumed it as task body I/O, not extra tabs on the orchestrating “driver” task.
Troubleshooting
If logs show “Unsupported Type pandera.typing… Flyte will default to use PickleFile”, the pandera transformer was not registered:
- Install the plugin in every environment (local runner and task image):
pip install flyteplugins-pandera. - Flyte loads
flyte.plugins.typesduringflyte.initialize()and on firstTypeEngineuse; confirm the distribution is installed (import importlib.metadata as m; print(list(m.entry_points(group="flyte.plugins.types")))). - Import order: import your
pandera.typing.*modules before plugin registration runs in files that run early (tests,__init__.py). Loading the plugin before pandera can leave two differentpandera.typing.pandas.DataFrame(or polars container) class objects in the process;TypeEnginewould only know about one of them, so annotations on the other fall through to pickle / the generic handler.
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flyteplugins_pandera-2.3.5-py3-none-any.whl.
File metadata
- Download URL: flyteplugins_pandera-2.3.5-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817a4de4f5baca7b416a37181d4214e4dc39becdb552aad636311425441f6666
|
|
| MD5 |
70e7bd3a5dc08c9fabb07c0759c79ae1
|
|
| BLAKE2b-256 |
4cb13d9a24d55f01ac8753c4780593b5fa756d1af9b7b2ad8ae4114ce13b6f11
|