-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add ability to pre-declare a stream #1542
Conversation
Open questions:
|
I think we do want it. I think we should start with "YOLO" mode only and get some experience with this before we add either "warn" or "strict". I think that we can defer doing anything helpful or clever with I think class attribute is a fine place to start. |
bluesky/bundlers.py
Outdated
extra={'doc_name': 'descriptor', | ||
'run_uid': self._run_start_uid, | ||
'data_keys': data_keys.keys()}) | ||
await self._cache_describe(obj) |
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.
The describe cache from read()
was previously used here:
await self._cache_describe(obj) | |
if obj not in self._describe_cache: | |
await self._cache_describe(obj) |
Similar for the read_configuration()
and describe_configuration()
. Is this refresh of the cache on monitor purposeful?
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.
Fixed this and centralized most of this into one place.
Could not fully inline the helpers because collect also uses some of them. Will leave that refactor for the future.
Also, what does "YOLO" mean? |
YOLO: You Only Live Once |
It looks like changes to ophyd broke some of the tests? |
I'm guessing bluesky/ophyd#1036 might have something to do with it? @callumforrester do you recognise the error? |
I'm interested in getting this merged. I can try to look at why tests were failing, but as the logs have disappeared it would be helpful to re-run the tests first. I don't think I can tell GH to re-run the tests, but someone has the power to do that, right? |
Power-cycled to re-run CI |
Well it looks like turning it off and then back on has "fixed" the previously failing tests. Were the previously open questions ever answered satisfactorily?
I can at least answer the first question and say yes, I want this. In order to manage |
Another important question is if strict checking option should be left in Maybe this is a plausible enough future addition that the code for strict checking ought to be left in? |
Thank you @cjtitus for pushing on this! One change I would like to make is to change the |
From discussions with PSI, it became clear that making the RunBundler pluggable would greatly aid adoption at PSI.
This is preparatory work for adding a "pre-declare-a-stream" message
There is not a way to thread this through yet, will probably revert / rethink later.
When unifying the descriptor work with monitors we picked up adding the object name to the data keys in the descriptors from monitor consistent with other descriptors.
…passed into count and scan plans
…eclaration. Added test that creating a stream (i.e, in a custom per_step) without pre-declaring fails in this case. Note that turning on strict checking functionally precludes passing in per_step
…es primary, causes strict checking of pre-declaration to fail
c689a64
to
1652ce9
Compare
@coretl I think this is ready to go modulo:
|
In discussions with PSI (SLS2) at NSLS-II today it became clear that we need the ability to pre-declare what the streams will be before we create the first event. This will have at least three and a half major benefits
In local testing I added a "strict mode" flag to demand that streams are pre-declared and many tests still passed.