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

[general need] Mia loses the name of the brick in case of a calculation launch error (e.g. a pipeline without input parameters) #258

Closed
servoz opened this issue Mar 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@servoz
Copy link
Contributor

servoz commented Mar 10, 2022

The minimum steps to reproduce :

  • Open Mia
  • Open a project
  • In the pipeline manager, drag and drop the SPM Smooth brick from mia_processes, into the editor
  • Click on the "Run pipeline" button (this is an error as we have not yet defined the input parameters, but errors should be handled in Mia)
  • A pop-up window opens indicating that a mandatory parameter for the pipeline is missing (note that the Smooth brick/process is called main, which is not appropriate)
    Screenshot from 2022-03-10 10-34-53
    => Except for the problem of the name of the brick, the case is well managed now (following the previous opened ticket on this subject).

If we now want to get things right:

  • Right click in the brick and choose "Export all unconnected records" (all nodes turn blue, why ?)
  • Select a in_files parameter using the Filter button, in the controller
  • Click on the "Run pipeline" button
  • Calculation runs correctly, but:

We see on the status bar: Pipeline "NoName" has been correctly run
We see on the stdout:
issue1
And we see in DataBrowser for the Bricks tag (this is the most important problem, as we lose the data history in this case) :
issue2

EDIT: If we hit the main button, mia crashs with this exception:

Traceback (most recent call last):
  File "/casa/home/Git_projects/populse_mia/python/populse_mia/user_interface/data_browser/data_browser.py", line 2177, in show_brick_history
    self.data_browser.main_window)
  File "/casa/home/Git_projects/populse_mia/python/populse_mia/user_interface/pop_ups.py", line 5034, in __init__
    self.node_selected(full_brick_name[0], pipeline.nodes[full_brick_name[0]])
KeyError: 'main'

@servoz servoz added the enhancement New feature or request label Mar 10, 2022
@servoz servoz changed the title [general need] Mia loses the name of the brick in the case of an calculation launching error (e.g. a pipeline without input parameters) [general need] Mia loses the name of the brick in case of a calculation launch error (e.g. a pipeline without input parameters) Mar 10, 2022
@servoz
Copy link
Contributor Author

servoz commented Apr 20, 2022

Other name issue has been noticed. See the ticket #263.

@servoz
Copy link
Contributor Author

servoz commented Oct 3, 2023

The "main" name comes from the capsul.pipeline.pipeline_workflow.workflow_from_pipeline() method when the pipeline is in fact a single process.

Maybe I'm missing something (maybe there's a reason for using 'main' as the name in all cases?) but as this is a pipeline with a single process, the node must take the name of the class + '_1'.

So, I think this line should be:
new_pipeline.add_process(pipeline.name.lower() + "_1", pipeline)

@denisri, what do you think?
If you don't see a side effect I'm missing, I can make the change directly in capsul.

@denisri
Copy link
Contributor

denisri commented Oct 3, 2023

No problem, it's fine... it was just a bit of code done too quickly.

@servoz
Copy link
Contributor Author

servoz commented Oct 4, 2023

Done.

@servoz servoz closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants