fix: update popmon_dp_loader_example notebook for popmon 1.0+ API#1209
Open
star11293 wants to merge 1 commit into
Open
fix: update popmon_dp_loader_example notebook for popmon 1.0+ API#1209star11293 wants to merge 1 commit into
star11293 wants to merge 1 commit into
Conversation
popmon v1.0.0 migrated to a pydantic-based Settings model that rejects the extended_report and pull_rules kwargs the notebook was passing directly to pm_stability_report, causing a ValidationError on every run with modern popmon. Migrates the three pm_stability_report calls to use a Settings object: - extended_report moves to settings.report.extended_report - pull_rules is renamed to monitoring_rules and moves to settings.monitoring.monitoring_rules - time_axis must be set on settings.time_axis (the kwarg is ignored when settings is provided) Adds a make_settings() helper so each call gets a fresh Settings instance, since the object's bin_specs gets mutated per-call and can't be reused. Verified by running the notebook end-to-end against popmon 1.4.12. Fixes capitalone#1014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1014
What was broken
The
popmon_dp_loader_example.ipynbnotebook errored on cell 6 with aValidationError: 2 validation errors for Settingswhen run against modern popmon (v1.0+):Root cause
popmon v1.0.0 migrated to a pydantic-based
Settingsmodel withextra="forbid", which rejects theextended_reportandpull_ruleskwargs the notebook was passing directly topm_stability_report.Changes
Migrated the three
pm_stability_reportcalls to use aSettingsobject:extended_report→settings.report.extended_reportpull_rules→ renamed tomonitoring_rulesand moved tosettings.monitoring.monitoring_rulestime_axis→ set onsettings.time_axis(the kwarg is silently ignored when settings is provided)Added a
make_settings(time_axis)helper so each call gets a freshSettingsinstance, sincesettings.bin_specsgets mutated per-call and can't be reused across calls.Testing
Verified the notebook executes end to end against popmon 1.4.12:
All three
pm_stability_reportcalls complete successfully and produce stability reports.