chore/SOF 7921#147
Closed
VsevolodX wants to merge 22 commits into
Closed
Conversation
VsevolodX
commented
Jun 2, 2026
Member
- update: adjust {} -> []
- update: tests:
|
|
||
| merged_context = self._merge_convergence_context( | ||
| unit_for_convergence.context, | ||
| {item["name"]: item["data"] for item in unit_for_convergence.context}, |
Member
There was a problem hiding this comment.
You should update the _merge_convergence_context function instead
| ): | ||
| reciprocal_vector_ratios = PointsGridDataProvider( | ||
| context=unit_for_convergence.context | ||
| context={item["name"]: item["data"] for item in unit_for_convergence.context} |
Member
There was a problem hiding this comment.
This doesn't make sense - we should initialize it with context from unit_for_convergence directly, as it was
| next: Flowchart ID of the next unit | ||
| tags: List of tags for the unit | ||
| context: Context data dictionary for the unit | ||
| context: Persisted context provider items for the unit |
| ): | ||
| target_unit = self.get_unit_by_name(name=unit_name, name_regex=unit_name_regex) | ||
| target_unit.context = new_context | ||
| target_unit.set_context(new_context or []) |
Member
There was a problem hiding this comment.
Having set_context also should not be needed
| def _instantiate_model(cls, value: Any) -> Any: | ||
| if isinstance(value, Model): | ||
| return value | ||
| return ModelFactory.create(value.to_dict()) |
Member
Author
There was a problem hiding this comment.
IT is to create ModelDFT or Model based on the config
SerializeAsAny[Model] accepts any config that is bound by Model, and here we return it
| f"execution unit {unit.get('name')!r} must include application for web-app ExecutionUnit" | ||
| ) | ||
| if subworkflow_application: | ||
| assert unit["application"].get("name") == subworkflow_application.get("name") |
| data = value | ||
| if name is None: | ||
| raise ValueError("yield_data() must contain a provider data key") | ||
| return ExecutionUnit.context_item(name, data, is_edited=is_edited, extra_data=extra_data) |
Member
There was a problem hiding this comment.
The implementation should be simpler. Dealing with context item serialization should be in a class of its own; the list of context items should have its own logic
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.