SKA-ScienceDataProcessor / algorithm-reference-library

Reference code for simplified aperture synthesis imaging
Apache License 2.0
26 stars 21 forks source link

Further improvements/fixes for ARL/daliuge integration #34

Closed rtobar closed 6 years ago

rtobar commented 6 years ago

There are two main changes: an upgrade to use daliuge's new dlg.dask_emulation.compute function, which allows passing a list/tuple of delayed objects (like dask's Client.compute method), and adding an explicit nout argument to calls that needed it.

Regarding the latter change, there are two aspects about it: on the one hand, dask seems to happily handle the situation while daliuge doesn't (but probably could), but on the other hand the calls are known to return arrays, so having an nout parameter makes that more explicit. If this kind of usage of the API starts repeating itself in more places we may want to consider supporting this more transparently in daliuge's dask emulation too.

As a bonus, I'm also adding an unrelated patch to remove and ignore binary compiled files. I understand this is outside the scope of the main work, so feel free to ask for its removal.

timcornwell commented 6 years ago

Hi Rodrigo,

I get an import error:

from dlg import delayed as dlg_delayed from dlg.dask_emulation import compute as dlg_compute Traceback (most recent call last): File "/Users/timcornwell/anaconda/envs/arlenv/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 2, in from dlg.dask_emulation import compute as dlg_compute ImportError: cannot import name 'compute'

I've already done:

pip install "daliuge>=0.5.2" pytest

timcornwell commented 6 years ago

Rodrigo,

Nevermind. The obvious works!

pip install "daliuge>=0.5.3" pytest

Regards, Tim