-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix and prevent mismatches between an attribute's type and its default value's type #1784
Merged
Conversation
This file contains 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
Fix the parameters with default values that do not correspond to the parameters' types. For CameraInit, all the default values of FloatParams that are set with integers are replaced with actual float values. These default values with an erroneous type would cause changes in the CameraInit's UID when the intrinsics' default values were written (with values of the correct type) and when they were loaded (with values of the wrong type).
Fix default values for: - DepthMap: refineSigma (FloatParam); use float instead of int - ImageMasking: hsvMaxSaturation (FloatParam); use float instead of int - ImageMasking: hsvMaxValue (FloatParam); use float instead of int - Meshing: estimateSpaceMinObservationAngle (FloatParam); use float instead of int - PanoramaInit: yawCW (BoolParam); use bool instead of int
cbentejac
force-pushed
the
fix/uidNodes
branch
from
September 27, 2022 10:47
1bba0e8
to
2b4a708
Compare
cbentejac
force-pushed
the
fix/uidNodes
branch
from
September 27, 2022 14:25
2b4a708
to
a446808
Compare
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.
code LGTM now
At Meshroom's launch, check that every node we attempt to load has a valid description, i.e. that every parameter has a default value that matches its parameter's type. If there is at least one parameter with an incorrect default value, the node is not loaded and a corresponding message will be displayed. This prevents the user from loading erroneous nodes that may lead to unexpected behaviours (such as a change of a node's UID between the moment when it is written and the moment it is loaded).
…ing it For IntParam and FloatParam, which may have ranges, check before loading the node that the non-null ranges are of the same type as the attribute. If at least a range is not correct (e.g. "(0, 10, 0.1)" for a FloatParam, for which "(0.0, 10.0, 0.1)" is expected), then the node is rejected (in the same manner as when a default value is deemed invalid).
cbentejac
force-pushed
the
fix/uidNodes
branch
from
September 28, 2022 08:47
a446808
to
1275975
Compare
fabiencastan
approved these changes
Sep 28, 2022
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.
Description
This PR fixes a long-standing issue with nodes' attributes that was recently highlighted by #1747.
Some nodes' attributes had default values that did not match with the attribute's type, and, provided these attributes could invalidate their node, this would trigger some UID changes when loading a graph with such nodes, compared to their initial values when the graph was written.
One of the direct consequences of this issue was that a pipeline that was created and submitted to the render farm needed to be reloaded in Meshroom (to trigger the undesired change of UIDs) for the nodes' status to be updated; otherwise, the nodes' status remained in the "waiting" state, since these nodes' UIDs did not correspond to those submitted.
We address this issue as follows:
Features list