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

on-save plumbing for model operator #4962

Merged
merged 20 commits into from
Oct 1, 2024
Merged

on-save plumbing for model operator #4962

merged 20 commits into from
Oct 1, 2024

Conversation

mwdchang
Copy link
Member

@mwdchang mwdchang commented Sep 27, 2024

Summary

This PR changes the "save as" semantic for model-operator, such that on top of

  • creating a new model
  • adding the model into the project

It will also update the model-operator to take in the newly create model, any downstream operators will be invalidated as if a new output has been chosen.

Note

Because model-operator ceeds all control to tera-model component, we don't have a graceful way of isolating the logic to the model-operator itself. What we end up is tera-model will detect whether it is on the workflow-route or not, and emit an event back to the invoker. We will then catch that event in model-operator and do the usual update-state, append-output to propagate new changes.

Testing

  • Add a model onto workflow canvas
  • Link the model to a model-config operator
  • Drilldown into the model operator, save as a new model with a different name

Check new model is created and available within the project
Check the new model replaces the existing one in the model-operator
Check the new model is the output of model-operator and downstream operators are invalidated because there is a new instance

@mwdchang mwdchang marked this pull request as ready for review September 27, 2024 20:27
@mwdchang mwdchang requested review from asylves1 and removed request for shawnyama and asylves1 September 27, 2024 20:27
Copy link
Member

@YohannParis YohannParis left a comment

Choose a reason for hiding this comment

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

LGTM

@YohannParis YohannParis marked this pull request as draft September 30, 2024 20:52
@YohannParis YohannParis marked this pull request as ready for review October 1, 2024 15:17
@mwdchang mwdchang merged commit 2f759b2 into main Oct 1, 2024
4 checks passed
@mwdchang mwdchang deleted the model-op-save-semantic branch October 1, 2024 15:36
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.

4 participants