-
Notifications
You must be signed in to change notification settings - Fork 4
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
Distribution of Processing #481
base: master
Are you sure you want to change the base?
Conversation
This first commit enables us to have local and remote acquisitions and consumers. It's mostly about interfaces and defines a way how to create acquisitions and addons. It also introduces an explicit |
b909e95
to
ff891b3
Compare
concert/tests/integration/test_grating_interferometry_experiments.py
Outdated
Show resolved
Hide resolved
How about introducing a RemoteCamera, that sends to the Consumers instead of the RemoteAcquisition? Then the Experiments would not be different for local and remote acquisition. |
Why are you doing this to me?! :-) I will try. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #481 +/- ##
==========================================
- Coverage 88.41% 81.21% -7.21%
==========================================
Files 121 134 +13
Lines 8340 10772 +2432
==========================================
+ Hits 7374 8748 +1374
- Misses 966 2024 +1058 ☔ View full report in Codecov by Sentry. |
concert/ext/ufo.py
Outdated
) | ||
await self._params[arg].set(kwargs[arg]) | ||
|
||
@property |
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.
Could you make all 'properties' concert Quantities/Parameters? Otherwise this will be confusing (since there is no async access, which is mandatory for the others to use).
@@ -232,26 +233,39 @@ async def __call__(self, producer): | |||
|
|||
|
|||
class GeneralBackprojectArgs(object): |
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.
Since you already break (slightly) the interface to the reco-args: I always found it a bit artificial that the reco-args and the Reco were splitted (and not the args where properties of the reco-class). What do you think about merging both classes?
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 will keep it in mind, let me finish up the reco and the remote version of it and then I'll see if it will still be reasonable to merge.
|
||
def run_server(): | ||
TangoBenchmarker.run_server( | ||
args=['name', '-ORBendPoint', 'giop:tcp::1235', '-v4', '-nodb', '-dlist', 'a/b/c'], |
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.
Change this everywhere to a proper DB-based start.
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.
Should we maybe run them all without the DB access? Then we can spawn them without adding them to the DB. This depends how "fixed" a pipeline will be.
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.
This should be configurable on startup. So one must specify that the dev-server runs without db (-nodb) and a port, or the user must provide a class name (or automatically get it, since this should be only Writer or OnlineReco) and an instance name.
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.
When a db is present we should also use device_properties for default settings (e.g. root folder for the writer).
0c99603
to
3da5890
Compare
Tango device for the dummy concert camera sending images over a zmq socket. | ||
""" | ||
|
||
endpoint = attribute( |
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.
@MarcusZuber do you know why Tango doesn't like inheriting attributes? If you run the TangoDummyCamera
server you can set the endpoint without any problem, but try reading it and it just crashes.
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 will look into this. Could this be caused by the metaclass, that you define here and in the Device?
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 original comment is pretty old and I am not sure it's a problem anymore.
self._params_initialized = True | ||
|
||
def dynamic_getter(self, attr): | ||
# If this were async def Tango would complain about it never being awaited |
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.
This is one of the reasons I will not change the format strings + eval in the reco server right now.
@MarcusZuber in |
which will be dealt with in PR #481.
8a67145
to
c96ed85
Compare
which will be dealt with in PR #481.
@@ -124,7 +126,10 @@ async def __ainit__(self, device, experiment, acquisitions=None, do_normalizatio | |||
await TangoMixin.__ainit__(self, device) | |||
|
|||
# Lock the device to prevent other processes from using it | |||
self._device.lock() | |||
try: | |||
self._device.lock() |
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.
Does this need await?
Last weekend I was no able to get the remote continuous sprial CT to run. Somehow the stream was started twice and then everything was messed up. We need integration tests for all typical use cases of experiments. (I was also quite tired, so there is a chance that I did something stupid.) |
this does not yet work because the zmq sockets need to be mocked up, due to lack of time postponing.
Enhancement: add endpoint registration to base camera
After working a few days with the remote-addons I have this suggestion (I needed to attach/detatch addons often in run-time, and keeping track of the enpoints is a bit annoying. Especially, since everything breaks if you run an experiment with not matching addons/enpoints): The experiment has a defined property 'camera' or implements a register/unregister enpoint for the camera. |
About the tango-timeouts: I'm still favoring the buisy-wait a bit since it can handle network problems better than setting the timeout to infinity. |
I would like to have a |
Consensus: motors have timeouts, processing tango servers not and if this becomes a problem future us will take care of this. |
I will do this on the uca-net and concert sides and also implement zmq timeouts to detect dead streams. |
for allowing or forbidding running a session multiple times at the same time.
even though it should not happen...
and make the zmq connections atomic, i.e. they are made when acquisition starts and after it is finished they are disconnected.
This will enable us to acquire data on a remote server and push it there via a ZMQ stream over network to processing nodes which can also be on different machines. Live preview will be able to subscribe to a stream of data and there will also be a stream splitter able to create a whole topology of processing nodes. The control will be done via concert, but only control, meaning mere synchronization of devices and data processing. All the rest will be done remotely, most probably via remote addons implemented as Tango servers for easy RPC access to them. More detailed info and diagrams to follow...
Todo
Acquisition
sends data to aProcessor
which sends the result toAddon
via aProxy
, so the addon doesn't have to care if the processing happens locally or remotely) -> @sarkarchandan[ ] add some benchmarks -> @tfarago-> this is far from important right now, do it laterConcertAsyncioRunner
await await
from "Make walker a ..." 4149771remove_all_endpoints
: @tfaragoFor discussion: