Registry / ai-ml / whylogs

whylogs

JSON →
library1.6.4pypypi✓ verified 83d ago

whylogs is an open-source Python library for logging, profiling, and monitoring ML data pipelines end-to-end. It generates lightweight, mergeable statistical summaries (profiles) of datasets, enabling data quality validation, drift detection, and exploratory data analysis. It integrates with the WhyLabs Platform for observability and alerting, but the core library is open source. The library is actively maintained with frequent patch releases.

pip install whylogs
INSTALL
IMPORT
SIG · WHYLOGS
W
whylogs
ai-mlpythonv1.6.4
Install
15.6s avg
Import
Disk
585MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
8/12 runs
✓ 15.36s
py 3.11
8/12 runs
✓ 14.59s
py 3.12
✕ build_error
8/12 runs
py 3.13
✕ build_error
✕ build_error
py 3.9
8/12 runs
✓ 16.73s
585MB installed
● package 585MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatasetProfileView
from whylogs import DatasetProfileView
from whylogs import get_or_create_session
ResultSet
from whylogs import ResultSet
log
from whylogs import log

This quickstart demonstrates how to initialize a whylogs session, log a Pandas DataFrame to create a data profile, and then view the summary statistics.

import pandas as pd from whylogs import get_or_create_session # Create a sample DataFrame data = { 'col_a': [1, 2, 3, 4, 5], 'col_b': ['apple', 'banana', 'cherry', 'apple', 'date'] } df = pd.DataFrame(data) # Get or create a whylogs session session = get_or_create_session() # Log the DataFrame to generate a profile with session.logger(dataset_name="my_first_dataset") as logger: logger.log_dataframe(df) # Get the generated profile (ResultSet) results = logger.profile() # You can also use the direct API for convenience (e.g., if not using a logger for multiple logs) # import whylogs as why # results_direct = why.log(df) print(results.view().to_pandas())
Debug
Known issues
breakingwhylogs v1 introduced significant breaking changes from v0.x, including API alterations and potential incompatibility with profiles generated by older versions. Users migrating from v0.x should consult the migration guide.
fix
Review the official whylogs v1 Migration Guide and update your code and profile loading logic accordingly. Re-profile data where necessary.
affects: <1.0
gotchaCore visualization tools (`ProfileVisualizer`, `profile_viewer`) and PySpark integration require extra installations (`whylogs[viz]` and `whylogs[spark]`, respectively). A base `pip install whylogs` will not include these functionalities.
fix
Install the necessary extras: `pip install "whylogs[viz]"` for visualization or `pip install "whylogs[spark]"` for PySpark integration.
affects: >=1.0
deprecatedThe hosted WhyLabs Platform, used for advanced monitoring and observability of whylogs profiles, is being discontinued. While the whylogs library remains open source and the WhyLabs platform's source code is publicly available for self-hosting, the managed SaaS offering is no longer accessible.
fix
If you rely on the WhyLabs Platform for monitoring, consider self-hosting the open-sourced WhyLabs platform or integrating whylogs profiles with an alternative monitoring solution.
affects: All versions that integrate with WhyLabs SaaS
breakingwhylogs version 1.1.2 was yanked from PyPI due to a bug that prevented it from correctly reading dataset profiles written with previous versions.
fix
Avoid installing or using whylogs version 1.1.2. Upgrade to a later stable version (e.g., 1.1.3 or higher) or downgrade to an earlier stable version.
affects: 1.1.2
Upgrade
Version history
1.6.4latest on PyPI · released Dec 3, 2024
Audit
Dependencies
pandasrequiredCommonly used for data input (DataFrames) to whylogs.
pysparkoptionalRequired for Spark integration, installed via 'whylogs[spark]'.
matplotliboptionalOften used for profile visualization, included with 'whylogs[viz]'.
Agent activity
43 hits · last 30 days
node
38
OpenAI (training)
1
Resources
whylogs — pip install whylogs · libregistry