DataProfiler icon indicating copy to clipboard operation
DataProfiler copied to clipboard

fix: update popmon_dp_loader_example notebook for popmon 1.0+ API

Open star11293 opened this issue 6 months ago • 0 comments

Fixes #1014

What was broken

The popmon_dp_loader_example.ipynb notebook errored on cell 6 with a ValidationError: 2 validation errors for Settings when run against modern popmon (v1.0+):

extended_report
Extra inputs are not permitted [type=extra_forbidden, ...]
pull_rules
Extra inputs are not permitted [type=extra_forbidden, ...]

Root cause

popmon v1.0.0 migrated to a pydantic-based Settings model with extra="forbid", which rejects the extended_report and pull_rules kwargs the notebook was passing directly to pm_stability_report.

Changes

Migrated the three pm_stability_report calls to use a Settings object:

  • extended_report → settings.report.extended_report
  • pull_rules → renamed to monitoring_rules and moved to settings.monitoring.monitoring_rules
  • time_axis → set on settings.time_axis (the kwarg is silently ignored when settings is provided)

Added a make_settings(time_axis) helper so each call gets a fresh Settings instance, since settings.bin_specs gets mutated per-call and can't be reused across calls.

Testing

Verified the notebook executes end to end against popmon 1.4.12:

jupyter nbconvert --to notebook --execute popmon_dp_loader_example.ipynb --output /tmp/test.ipynb
[NbConvertApp] Writing 53035 bytes to /tmp/test.ipynb

All three pm_stability_report calls complete successfully and produce stability reports.

star11293 avatar May 30 '26 20:05 star11293