Methods without a `side_outputs` field may be unnecessarily included in `method_id_map`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start in httomo/ui_layer.py at the method-ID map construction around lines 64-72 and 110, then follow UiLayer.build_pipeline() into update_side_output_references(). Determine whether entries without an id are required for pipeline construction or only side-output lookup; done means the map's intended contents and any needed behavior change are verified.
Written by the indexing model from the issue text.
Description
A variable methods_id_map is defined in the UI layer when there is iteration over the methods in the pipeline config, getting ready to build the Pipeline object: https://github.com/DiamondLightSource/httomo/blob/7842bae27c1777545279aa36e8c10d9c4eeb489f/httomo/ui_layer.py#L64-L72
Based on how this variable is used by update_side_output_references() to map:
- a reference to a method X with an
idfield, from a method Y (ie, recon referencing a centering method withid: centering) - to the method wrapper with that ID
https://github.com/DiamondLightSource/httomo/blob/7842bae27c1777545279aa36e8c10d9c4eeb489f/httomo/ui_layer.py#L64-L72
it would appear that this methods_id_map is solely for dealing with side outputs.
However, the methods_id_map includes both:
- methods with an
idfield - methods without and
idfield
and some dumb printing in the loop in UiLayer.build_pipeline() confirms this:
i = 1, method_id_map is now {'centering':
<httomo.method_wrappers.rotation.RotationWrapper object at 0x7f3d48321f60>}
i = 2, method_id_map is now {'centering':
<httomo.method_wrappers.rotation.RotationWrapper object at 0x7f3d48321f60>, 'task_2':
<httomo.method_wrappers.dezinging.DezingingWrapper object at 0x7f3d41d8c220>}
i = 3, method_id_map is now {'centering':
<httomo.method_wrappers.rotation.RotationWrapper object at 0x7f3d48321f60>, 'task_2':
<httomo.method_wrappers.dezinging.DezingingWrapper object at 0x7f3d41d8c220>, 'task_3':
<httomo.method_wrappers.generic.GenericMethodWrapper object at 0x7f3d41d8e110>}
i = 4, method_id_map is now {'centering':
<httomo.method_wrappers.rotation.RotationWrapper object at 0x7f3d48321f60>, 'task_2':
<httomo.method_wrappers.dezinging.DezingingWrapper object at 0x7f3d41d8c220>, 'task_3':
<httomo.method_wrappers.generic.GenericMethodWrapper object at 0x7f3d41d8e110>, 'task_4':
<httomo.method_wrappers.generic.GenericMethodWrapper object at 0x7f3d41d8c190>}
...
Question: given that methods_id_map seems to only be used for side outputs, is there a particular reason why methods without an id field (which produce no side outputs, and thus have no reason to be referenced) are still added to methods_id_map?
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/httomo
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DiamondLightSource/httomo#714 ·
-
framework minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DiamondLightSource/httomo#699 ·
-
documentation question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/httomo#697 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
DiamondLightSource/httomo#609 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
DiamondLightSource/httomo#607 ·
All issues in DiamondLightSource/httomo
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·