Fix pipeline module alignment and run_likelihood hang#1
Draft
Fix pipeline module alignment and run_likelihood hang#1
Conversation
…ation Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add basic UI infrastructure for CosmoSIS web app
Add CosmoSIS GUI v2: Flask/WebSocket backend + interactive pipeline canvas
Mar 3, 2026
Copilot stopped work on behalf of
joezuntz due to an error
March 3, 2026 17:53
… on drop Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Add CosmoSIS GUI v2: Flask/WebSocket backend + interactive pipeline canvas
Vertical pipeline layout with left/right bezier arcs and deselect on drop
Mar 3, 2026
Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Vertical pipeline layout with left/right bezier arcs and deselect on drop
Module library categories, canvas drag-to-reorder, and correct arc source tracing
Mar 3, 2026
…r and syntax error Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Module library categories, canvas drag-to-reorder, and correct arc source tracing
Ingest modules from cosmosis-standard-library; categories collapsed by default
Mar 4, 2026
Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Ingest modules from cosmosis-standard-library; categories collapsed by default
Module library ingestion, visual canvas improvements, expandable ports, and params form
Mar 4, 2026
…ne button Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Module library ingestion, visual canvas improvements, expandable ports, and params form
Visual tweaks, expandable port sections, params form, server-side library scan, and CosmoSIS INI pipeline loading
Mar 4, 2026
Copilot
AI
changed the title
Fix per-module setup output splitting via OS-level fd capture
Fix per-module setup output splitting and show actual DataBlock I/O after pipeline run
Mar 9, 2026
…responsive UI Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Fix per-module setup output splitting and show actual DataBlock I/O after pipeline run
Show actual DataBlock I/O per module after pipeline run; colour modules green on success
Mar 9, 2026
Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Show actual DataBlock I/O per module after pipeline run; colour modules green on success
Results tab, pipeline status indicators, and CWD auto-scan
Mar 10, 2026
Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Results tab, pipeline status indicators, and CWD auto-scan
Fix Results tab layout and section expand
Mar 10, 2026
…b sections are not empty Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Fix Results tab layout and section expand
Fix Results tab layout and empty sections
Mar 10, 2026
…com/cosmosis-developers/gui-v2 into copilot/add-basic-ui-infrastructure
…ion, placeholder fix, pipeline connector centering Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Fix Results tab layout and empty sections
Results tab: two-column Plotly layout, axis selection, log-scale toggles, pipeline connector alignment
Mar 10, 2026
- pipeline.js: add _modLeft(module) helper; all module boxes are now horizontally centred at _modX() + maxModWidth/2. Update _appendModule, _appendPorts, _appendSourceOutputBoxes, _computeSourceOutputPositions, and _appendPortEdges to use the per-module left edge. Restore _appendConnections to use a single shared centre x → perfectly vertical connecting arrows. - worker.py: replace _FdCapture with _FdDevNull in run_likelihood. Cosmosis pipelines can spawn child processes that keep the pipe write end open indefinitely, causing the drain thread to never see EOF. Since the captured text is unused on the success path, _FdDevNull (redirects to /dev/null, no drain thread, no blocking) is sufficient. Also harden _FdCapture for prepare_pipeline: save self._r, reduce initial join timeout to 5 s, then force-close the read end to unblock the drain thread if it is still alive. Co-authored-by: joezuntz <220537+joezuntz@users.noreply.github.com>
Copilot
AI
changed the title
Results tab: two-column Plotly layout, axis selection, log-scale toggles, pipeline connector alignment
Fix pipeline module alignment and run_likelihood hang
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pipeline module boxes were left-aligned, causing connectors to be diagonal when modules had different widths. Running a likelihood evaluation could hang indefinitely due to cosmosis child processes keeping a pipe write-end alive.
Pipeline module centre alignment (
pipeline.js)Added
_modLeft(module)helper that offsets each module's left edge so all boxes share a single centre x:_appendModule,_appendPorts,_appendSourceOutputBoxes,_computeSourceOutputPositions,_appendPortEdges— all updated to use_modLeft(module)for the module's left edge_appendConnections— simplified to a singlecx = _modX() + maxModWidth/2for both endpoints → perfectly vertical arrowsFix
run_likelihoodhang (worker.py)_FdCaptureuses a pipe + drain thread. CosmoSIS spawns child processes (OpenMP, external programs) that inherit the pipe write end; when the parent restores stdout/stderr the children keep the write end alive, so the drain thread never sees EOF and the worker blocks.run_likelihood: replaced_FdCapturewith new_FdDevNull— redirects fd 1/2 to/dev/nullinstead of a pipe. Writes are instant and non-blocking; child fd inheritance is harmless. The captured text was unused on the success path anyway._FdCapture(still used inprepare_pipeline): savesself._r, reduces initialjointimeout to 5 s, then force-closes the pipe read end to unblock the drain thread, with a final 3 s join — worst-case delay is now ~8 s instead of indefinite.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.