Closed jlewi closed 2 years ago
It looks like when this exception occurs the relevant line is
async def create_call(self, comp, arg=None):
py_typecheck.check_type(comp, ReferenceResolvingExecutorValue)
py_typecheck.check_type(comp.type_signature, computation_types.FunctionType)
The value of comp.type_signature
is
<bound method TaskInputValue.type_signature of <flaap.tff.executors.TaskInputValue object at 0x7fea94a78df0>>
If we invoke type_signature
we get
FunctionType(SequenceType(TensorType(tf.float32)), TensorType(tf.float32))
So seems like it could be a bug in TaskInputValue
Looks like I'm missing the @property declaration. RemoteValue has it https://github.com/tensorflow/federated/blob/4403830d5a8d79c76d644f46e729013a422e6882/tensorflow_federated/python/core/impl/executors/remote_executor.py#L69
Fixed by above commit.
The code is https://github.com/jlewi/flaap/commit/7a10396e960810719484cc6e96585ec82e2d1331
Here's the TFF program being run https://github.com/jlewi/flaap/blob/jlewi/list/py/flaap/testing/fed_average.py
This code uses the TaskStoreExecutor as the leaf executor to replace the TFEagerExecutor. This executor creates Tasks in the TaskStore so they can be claimed by the workers.
Using TFEagerExecutor it runs fine.
Here is the stack trace.
Exception is coming from: https://github.com/tensorflow/federated/blob/54ae7836c593746e3dd9a3ccfe74f61d46005c5c/tensorflow_federated/python/core/impl/executors/reference_resolving_executor.py#L322