xsar icon indicating copy to clipboard operation
xsar copied to clipboard

When using dask distributed : AttributeError: type object 'Sentinel1Meta' has no attribute 'reader'

Open Skealz opened this issue 2 years ago • 2 comments

I followed this guide : https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/examples/xsar_batch_datarmor.html but without using a notebook. (basically, using : res = ddf_l1.map_partitions(batch_processing, meta=('foo', str)) res.persist() )

I end up getting this error : AttributeError: type object 'Sentinel1Meta' has no attribute 'reader'

It seems that the BlockingActorProxy() class doesn't work correctly. In BlockingActorProxy init function, when I change a part of the code to :

        if False: #self._dask_client is not None:
            logger.debug('submit new actor')
            self._actor_future = self._dask_client.submit(self._cls, *args, **kwargs, actors=True)
            self._actor = self._actor_future.result()
        elif self._actor is None:
            # transparent proxy: no future
            self._actor = self._cls(*args, **kwargs)

I no longer get the error and the code works as expected.

Skealz avatar Aug 07 '23 14:08 Skealz

I have to dig in the code to understood why we have this BlockingActorProxy. If it appears that it is no more needed I would be happy to remove it. @Skealz Do you want to propose a pull request?

agrouaze avatar May 15 '24 08:05 agrouaze

Dear @agrouaze ,

I would need this issue to be fixed, since I use xsar in a notebook running a Dask cluster. Have you investigated this BlockingActorProxy ? Could you give me some inputs to help me propose a pull request ?

Thank you

annesophie-cls avatar Dec 20 '24 09:12 annesophie-cls