Skip to main content

Flytekit whylogs Plugin

whylogs is an open source library for logging any kind of data. With whylogs, you are able to generate summaries of datasets (called whylogs profiles) which can be used to:

  • Create data constraints to know whether your data looks the way it should
  • Quickly visualize key summary statistics about a dataset
  • Track changes in a dataset over time
pip install flytekitplugins-whylogs

To generate profiles, you can add a task like the following:

import whylogs as why
from whylogs.core import DatasetProfileView

import pandas as pd

from flytekit import task

@task
def profile(df: pd.DataFrame) -> DatasetProfileView:
    result = why.log(df) # Various overloads for different common data types exist
    profile_view = result.view()
    return profile

NOTE: You'll be passing around DatasetProfileView from tasks, not DatasetProfile.

Validating Data

A common step in data pipelines is data validation. This can be done in whylogs through the constraint feature. You'll be able to create failure tasks if the data in the workflow doesn't conform to some configured constraints, like min/max values on features, data types on features, etc.

from whylogs.core.constraints.factories import greater_than_number, mean_between_range

@task
def validate_data(profile_view: DatasetProfileView):
    builder = ConstraintsBuilder(dataset_profile_view=profile_view)
    builder.add_constraint(greater_than_number(column_name="my_column", number=0.14))
    builder.add_constraint(mean_between_range(column_name="my_other_column", lower=2, upper=3))
    constraint = builder.build()
    valid = constraint.validate()

    if valid is False:
        print(constraint.report())
        raise Exception("Invalid data found")

If you want to learn more about whylogs, check out our example notebooks.

Metadata

Release files for flytekitplugins-whylogs 1.16.31

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flytekitplugins-whylogs 1.16.31
File Size Uploaded Provenance
flytekitplugins_whylogs-1.16.31.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flytekitplugins-whylogs 1.16.31
File Interpreter ABI Platform
flytekitplugins_whylogs-1.16.31-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / flytekitplugins_whylogs-1.16.31.tar.gz

Download URL flytekitplugins_whylogs-1.16.31.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3ffc81338e4c4be88b583290345a3cf6a56dcce8cd066db0a44eaabea3e04ec7
BLAKE2b-256 checksum
How to use checksums
608e79ebf164dfc02b9ad28adca068d0065e60174028a8ec4307c37f77e3b79f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / flytekitplugins_whylogs-1.16.31-py3-none-any.whl

Download URL flytekitplugins_whylogs-1.16.31-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdcc4f448eceab802dca2bc15b52170f8bada1ffbe960d29f0e5044f678487dd
BLAKE2b-256 checksum
How to use checksums
f196627b8a34dfefea96b9d3044be27e710cb97b33f3a73b6ada2a467fae53ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for flytekitplugins-whylogs 1.16.31

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.16.31 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page