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

[bin] meshroom_batch: Save the graph once it has been all set up and resolved #2095

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Jun 30, 2023

Description

This PR fixes an issue in meshroom_batch which led its executions with the --submit argument to fail with the following key errors:

Invalid expression with missing key on "CameraInit_1.output" with value "{cache}/{nodeType}/{uid0}/cameraInit.sfm".
Error: 'uid0'
KeyError: 'uid0'

In order to prevent this, if the --save argument has been provided, the graph should be saved outside of the GraphModification event, once it has been set up entirely and resolved. If it is saved within the GraphModification, UIDs are not yet available when it is written on disk, so the dictonaries that should be filled with them are empty.

This does not cause any issue for the rest of the execution of meshroom_batch if the graph is to be computed locally, since the UIDs will be computed right after (but they still will never be written in the project file).

However, when submitting the graph to a renderfarm, the project file is loaded again. If it does not contain any UID:

  • All the nodes will present the UidConflict compatibility issue;
  • Key errors will be raised when trying to apply the links between nodes since they contain direct references to UIDs, which cannot be resolved as they are not present in the project file.

…lved

If the "save" argument has been provided, the graph should be saved
outside of the `GraphModificatioǹ event, once it has been set up entirely
and resolved.

When it is saved within the `GraphModification`, UIDs are not yet
available.

This does not cause any issue for the rest of the execution if the graph
is to be computed locally, since the UIDs will be computed right
after (but the UIDs will still never be written in the project file).
However, when submitting the graph to a renderfarm, the project file is
loaded again. If it does not contain any UID:
 - all the nodes will present the `UidConflict` compatibility issue
 - key errors will be raised when trying to apply the links between nodes
since they contain direct references to UIDs, which cannot be resolved as
they are not present in the project file.
@cbentejac cbentejac added this to the Meshroom 2023.3.0 milestone Jun 30, 2023
@cbentejac cbentejac self-assigned this Jun 30, 2023
@cbentejac cbentejac changed the title [bin] meshroom_batch: Save graph once it has been all set up and resolved [bin] meshroom_batch: Save the graph once it has been all set up and resolved Jun 30, 2023
@mugulmd mugulmd merged commit a479af2 into develop Jul 3, 2023
2 checks passed
@mugulmd mugulmd deleted the fix/saveMeshroomBatchGraph branch July 3, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants