-
Notifications
You must be signed in to change notification settings - Fork 242
[Refactor] Rework Model Manager Try 2 #1367
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
Draft
maxschulz-COL
wants to merge
20
commits into
main
Choose a base branch
from
mm_rework_new_actions_merged
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
antonymilne
requested changes
Oct 17, 2025
Contributor
antonymilne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just doing this as a reminder to myself to look at my comments in #1317 and put these somewhere better to track in future.
…zro into mm_rework_new_actions_merged
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.
Closes https://github.com/McK-Internal/vizro-internal/issues/1866, closes #109
check for more...
How to review
First part will focus on making sure
add_typeworks correctly, which is technically independent of this PRs purpose, but since the MM PR will requirerevalidate_instance="always", we have to make changes: https://mckinsey-hub.slack.com/archives/D03N7KXFXV3/p1756475773136999Currently we are thinking about 2 options:
add_typeto properly update the schema for ALL modelsadd_typeat allSecond part with then focus on the actual MM bit.
(note: moved description over from #1317)
Description
Architecture
Key new concepts are:
model_manager.__models, it is replaced by a nutree tree that (atm) gets populated indashboard.buildpre-buildorder it isdepth-first, post-order--> some things needed to change in order to make this possibe_validate_pagesmoved topre-buildfrom afield_validator(which it really always should have been!)pre-buildare instantiated using an alternative__init__which adds them to the tree AND callspre-buildif presentEDIT:
After going over the
ParameterandFilteragain, I am wondering if it is ok if certain non-pre-build relevant attributes of lower models can be set by parents. So far we have things like:_in_containerflag when in Container --> this forced filters to be pre built before Container so selectors are guaranteed to existfilter.targetsin Containerpre-build(see https://github.com/McK-Internal/vizro-internal/issues/1761#issuecomment-2985098855) --> this is solved by the filters just requesting the targets, instead of them being setMy rule of thumb would be:
OK, if this does not influence pre-build order, otherwise a strong NO
ToDos
For @antonymilne to specifically check, but can tell more in detail later:
data_frameParameters / dynamic Filters work - I did not do any specific work for thisPreliminary intuition why up the tree pre-building is better than down the tree
It is very useful to know for certain that when you pre-build a model, everything below is already set, not vice versa. E.g. the
Filterneeds to be beforePagebecause thePagechecks if its filters aredynamicScreenshot
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":