-
-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Description
distributed-2.7.0
Possibly related to #2336.
I'm using an asynchronous client connected to a remote cluster.
A publish_dataset -> get_dataset roundtrip on a Future causes it to be attached to a synchronous client.
client = await distributed.Client("localhost:8786", asynchronous=True)
a, = client.compute([delayed(1, pure=True)])
print(a) # <Future: status: pending, key: int-62645d78d66e2508256b7ab60a38b944>
print(a.result()) # <coroutine object Future._result at 0x11ad10dd0>
print(await a) # 1
await client.publish_dataset(foo=a)
b = await client.get_dataset("foo")
print(b) # <Future: status: pending, key: int-62645d78d66e2508256b7ab60a38b944>
print(client.asynchronous, b.client.asynchronous) # True, False
print(b.result()) # 1
print(await b) # AttributeError: 'int' object has no attribute '__await__'Switching to a LocalCluster weirdly makes the issue disappear.
Workarounds:
- Force
b.client = client - Use
client.gather([b])instead, which (involuntarily?) seems to ignore b.client.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels