populse / populse_mia

Multiparametric Image Analysis
Other
10 stars 9 forks source link

[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 closed 11 months ago

servoz commented 2 years ago

The minimum steps to reproduce :

If we now want to get things right:

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 commented 2 years ago

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

servoz commented 11 months ago

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 commented 11 months ago

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

servoz commented 11 months ago

Done.