Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor config #214

Merged
merged 30 commits into from
Jul 4, 2022
Merged

Refactor config #214

merged 30 commits into from
Jul 4, 2022

Conversation

sbrugman
Copy link
Collaborator

@sbrugman sbrugman commented Jun 2, 2022

Preparations for v1.0.0 release

Config Refactor (breaking)

Structured config using pydantic.

  • Hierarchical configuration in config.py provides context to options
  • This setup prevents code duplication (functions with many arguments, various places to set defaults, docstrings...)
  • Introducing new parameters is simplified
  • Documentation is updated to reflect the new syntax
  • Validation is handled by the configuration, e.g. fewer type check in the code

Profiles/Comparison Registry refactor (breaking)

The Profile and Comparison registries are extended to generalize to other existing implementations (chi2, ks, etc.)
The definitions are moved from popmon/stats/numpy.py to popmon/analysis/(profiles|comparisons)

Enhancements

  • String representation for Pipeline and Module
  • Maintain section position when changing features
  • Guarantee the ordering of metrics in traffic lights overview

Removed

Removal of unused functionality:

  • "worst" traffic light (unused, trivial to compute post-hoc)
  • Plotting of individual alerts and traffic lights (this is replaced by the overview tables)
  • docs: Removed outdated tree, does not provide any additional information over what's available on github

Internal improvements / fixes

  • top argument for plot_heatmap_b64 is now supported
  • Replace eval with lambda functions
  • Metric pipelines are now constructed of building blocks (functions) to prevent code duplication
  • Make test robust against floating point error
  • Enable docs api structure and jupyter notebook qa in ci/cd

Base automatically changed from develop to master June 14, 2022 09:44
@sbrugman sbrugman changed the base branch from master to develop June 14, 2022 11:42
@sbrugman sbrugman force-pushed the refactor-config branch 4 times, most recently from 1c8b0d4 to f05d8ce Compare June 15, 2022 15:30
@sbrugman sbrugman marked this pull request as ready for review June 15, 2022 15:30
@sbrugman sbrugman requested review from pradyot-09, tomcis and mbaak and removed request for pradyot-09, tomcis and mbaak June 21, 2022 13:24
popmon/config.py Outdated Show resolved Hide resolved
sbrugman added 2 commits June 27, 2022 16:50
BREAKING CHANGE: the `worst` entry will no long be present in the datastore
Copy link
Contributor

@mbaak mbaak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, a lot of work went into this.
I have just one comment about the usage of kwargs in metrics.py. With the settings object we should probably get rid of that that, it's a bit confusing now. But it can be done at a later time afaic.

window=10,
shift=1,
monitoring_rules=None,
pull_rules=None,
features=None,
**kwargs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Simon, just one comment.
We should probably take away the kwargs argument here.
This can also be fixed later, but right now it's a bit confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Is addressed in the follow-up https://github.com/ing-bank/popmon/pulls/229

@sbrugman sbrugman merged commit 77fab29 into develop Jul 4, 2022
@sbrugman sbrugman deleted the refactor-config branch July 4, 2022 12:42
@sbrugman sbrugman restored the refactor-config branch July 4, 2022 12:42
@sbrugman sbrugman deleted the refactor-config branch July 4, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn global config into local configuration
3 participants