[Feature] Pipeline progress tracking server - #1363
Draft
anibalsolon wants to merge 103 commits into
Draft
Conversation
… in the container.
… as originally intended.
…eoblique, introduced a more specific NHP preconfig (macaque), included the Yerkes template in cpac templates package.
Fix/filter
add a loop based on notch filter order
* Link to latest release notes on docs site (instead of v1.6.0 on GH) * Add link to CONTRIBUTING.md in developer links section * Link to versioned docs URLS (the old links redirect, but might as well skip that step)
…CPU is allocated to each participant pipeline.
✏️ Update links in README
…bled, and fixed one of the apply warp parallelization concatenation nodes' output connections.
…NDI/C-PAC into feature/applywarp_parallel
Also update IOError(…'does not exist!') to FileNotFoundError
… into feature/progress-tracking
anibalsolon
marked this pull request as ready for review
September 22, 2020 15:09
Collaborator
|
Amazing! And the PR write-up is great. I'm going to wait until 1.7.1 is cut before merging this into develop. |
shnizzedy
force-pushed
the
develop
branch
4 times, most recently
from
September 24, 2020 15:48
e556e40 to
1d05264
Compare
HechengJin0
force-pushed
the
develop
branch
from
September 24, 2020 15:51
1d05264 to
27a5ac1
Compare
8 tasks
shnizzedy
requested changes
Sep 25, 2020
shnizzedy
self-requested a review
October 2, 2020 21:44
shnizzedy
approved these changes
Oct 2, 2020
12 tasks
shnizzedy
force-pushed
the
develop
branch
2 times, most recently
from
March 15, 2021 19:43
be468db to
0926b45
Compare
birajstha
marked this pull request as draft
August 23, 2024 20:35
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.
Fixes
Fixes #1279 by @sgiavasis
Description
Alter the monitoring server to a Websocket server, that will use the callback to send to the connected sockets the nodes statuses.
Technical details
During the pipeline execution, we want to monitor the nodes' execution. In order to allow it without needing the user to change C-PAC's code, this PR has a WebSocket server implemented. Different than a regular HTTP server, WS allows the server to push information to the connected clients, essential in an asynchronous setup. If a regular HTTP server was used, the client would need to poll an endpoint to get the current information about execution.
The WS server runs in a different thread than the main C-PAC pipeline builder/runner, so they can be executed in parallel. The way the pipeline runner communicates to the WS about is through two different functions:
log_nodes_initial&log_nodes_cblog_nodes_initialgenerates the list of existing nodes in a workflow. This is required to at least compute an execution percentage for a workflow run.log_nodes_cbis the famous callback log, which Nipype calls whenever it has an update about a node.In both functions, the node info is pushed to a thread-safe queue, so the WS handler can loop through it and send it to the connected client. The queue is only filled if the monitoring is enabled.
When starting a run with the
--monitoringflag, the execution hangs until the websocket connects. This is preferred so no data is lost (i.e. C-PAC starts running before the WS connects).Tests
Docker run with the flag
--monitoringand, for the container,-p 8080:8080. It is required to re-build the C-PAC image to install the dependencies.It will show a message:
[Waiting for monitoring websocket to connect]Then one can use the following command in another terminal to connect to the WS (how to install websocat):
As C-PAC executes the pipeline, messages in the terminal running
websocatwill start to pour.Screenshots
Checklist
Update index.md).developbranch of the repository.Developer Certificate of Origin
Developer Certificate of Origin