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

[ui] Correctly determine if a graph is being computed locally and update nodes' statuses accordingly #1832

Merged
merged 3 commits into from
Dec 5, 2022

Conversation

cbentejac
Copy link
Contributor

Description

This PR fixes two bugs related to local graph computations:

  • When computing a graph in an instance of Meshroom, and opening the same computing graph in another instance of Meshroom, the second instance of Meshroom behaves as if it was performing the computations even though it was not. As a consequence, trying to open a new graph was failing (Meshroom would try stopping the computations, but fail since they were carried out by the first instance), and so was closing the instance, with a "Please stop any local computation before exiting Meshroom" error message. Only the chunks' statuses were taken into account to determine whether local computations were ongoing.
  • When loading a new graph while the opened one was locally computing nodes, computations were automatically stopped to be able to load the new graph. However, the computing chunks' statuses were not being updated before the graphs were switched up. This meant that opening that previously computing graph again was leading to a display in which nodes appeared to be computing although there was no ongoing computations. The only way to get back to a correct state was manually unlocking the nodes and clearing the pending statuses.

Features list

  • Take the Meshroom instance's session ID when determining whether computations are made locally, and not only the chunks' statuses.
  • Clear locally submitted nodes before loading a new graph to avoid stopping the computations without updating the chunks' statuses.

@cbentejac cbentejac added this to the Meshroom 2022.1.0 milestone Nov 25, 2022
@cbentejac cbentejac self-assigned this Nov 25, 2022
meshroom/ui/graph.py Outdated Show resolved Hide resolved
meshroom/ui/graph.py Outdated Show resolved Hide resolved
When loading a new graph while the opened one was locally computing nodes,
computations were automatically stopped to be able to load the new graph.
However, the computing chunks' status were not being updated before
the graphs were switched up. This meant that opening that previously
computing graph again would lead to a display in which nodes appeared to
be computing although there was no ongoing computations.
@fabiencastan
Copy link
Member

Should we not also change the meaning of isExtern?

def isExtern(self):

Instead of:

    def isExtern(self):
        return self._status.execMode == ExecMode.EXTERN

Use:

    def isExtern(self):
        return self._status.execMode == ExecMode.EXTERN or (
                self._status.execMode == ExecMode.LOCAL and self._status.sessionUid != sessionUi)

@cbentejac
Copy link
Contributor Author

Should we not also change the meaning of isExtern?

def isExtern(self):

Instead of:

    def isExtern(self):
        return self._status.execMode == ExecMode.EXTERN

Use:

    def isExtern(self):
        return self._status.execMode == ExecMode.EXTERN or (
                self._status.execMode == ExecMode.LOCAL and self._status.sessionUid != sessionUi)

You're totally right, it's done!

@fabiencastan fabiencastan merged commit 8ce2ac6 into develop Dec 5, 2022
@fabiencastan fabiencastan deleted the fix/graphLocalComputations branch December 5, 2022 15:20
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