-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Feature] Pipeline progress tracking server #1363
Draft
anibalsolon
wants to merge
103
commits into
develop
Choose a base branch
from
feature/progress-tracking
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
… 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
changed the title
[Feature] Progress tracking
[Feature] Pipeline progress tracking server
Sep 22, 2020
shnizzedy
approved these changes
Sep 22, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 I downloaded the built image from Circle, followed the instructions in the "Test" section above, and it's running and logging locally! Super cool.
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
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
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_cb
log_nodes_initial
generates the list of existing nodes in a workflow. This is required to at least compute an execution percentage for a workflow run.log_nodes_cb
is 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
--monitoring
flag, 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
--monitoring
and, 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
websocat
will start to pour.Screenshots
Checklist
Update index.md
).develop
branch of the repository.Developer Certificate of Origin
Developer Certificate of Origin