Cycle priority flag on timers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- stream-processing
Research direction
Start by tracing csp.timers, csp.sample, csp.feedback, and the TimerHeap mentioned in the issue. Review how duplicate timestamps are ordered, then determine how FIRST, LAST, and FINAL priority should interact with feedbacks. Done means timer priority is controllable and the stated feedback semantics are enforced.
Written by the indexing model from the issue text.
Description
Right now, due to how CSP manages duplicate timestamp cycles, all csp.timers that are scheduled will always execute in the first cycle of the given timestamp ( even if there are more data points scheduled for the same timestamp )
This can cause issues if for example you want to csp.sample with a csp.timer. In many ( perhaps most ) cases you would want to sample the last point of the timestamp rather than the first, but there is no way to control this at the moment.
The other thing we can do if we controlled priority is to allow a "last cycle" timer. This would include managing feedbacks that are introduced mid-cycle, which would then potentially allow us to implement the ever elusive "csp.reroll" ( picture ts[list] -> csp.unroll -> process individual ticks -> csp.reroll back into the original list )
Thinking out loud, we can potentially have 3 priority modes for csp.timers / alarms:
- Priority.FIRST - with first cycle for the timestamp
- Priority.LAST - with last timestamp of the cycle ( will execute after everything scheduled up to this point, but not things scheduled after )
- Priority.FINAL? ( not stuck on this name ) - ultimate last cycle of the given timestamp
LAST can be fed into csp.feedback, FINAL should raise if its wired into a feedback since that would break its semantics.
Implementation wise, we would have to introduce a priority to timestamps in the TimerHeap ( can probably embed it in the timestamp going into the existing ordered map )
- Dominant language
- Python
- Stars
- 450
- Forks
- 91
- Avg merge
- 18h 8m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 Point72/csp
-
Add docs about transitioning from replay to realtime by setting start date in the pastPossibly taken @russlan23 claimed this 99 days ago. Openpart: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
RuntimeWarning: non-string key in the __dict__ of class OutputsMay be free again A pull request for this issue was closed without being merged. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
csp::Struct leaks one StructMeta reference per constructionPossibly taken @jieya907 claimed this 36 days ago. Opengood first issue type: bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
csp.output does not support dict unpackingPossibly taken @aadya940 claimed this 107 days ago. Opentype: feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
Similar issues
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPossibly taken @bodapatisaikrishna claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
langchain-ai/docs#7652 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
elastic/oblt-aw#2513 · 1 comment ·
Maintainers usually reply within 1 day
-
bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 75/100
NCAR/CLM-Tutorial#113 · 1 comment ·
Maintainers usually reply within 1 day