提交 63967809 编辑于 作者: Scott Wegner's avatar Scott Wegner 提交者: tensorflow-copybara
浏览文件

Improve the error message when attempting to execute `federated_secure_sum`...

Improve the error message when attempting to execute `federated_secure_sum` computations for the default executor context.

This is a common error when writing tests for TFF logic.

PiperOrigin-RevId: 343890748
上级 45e358da
......@@ -521,7 +521,12 @@ class FederatedResolvingStrategy(federating_executor.FederatingStrategy):
async def compute_federated_secure_sum(
self,
arg: FederatedResolvingStrategyValue) -> FederatedResolvingStrategyValue:
raise NotImplementedError('The secure sum intrinsic is not implemented.')
raise NotImplementedError(
'`tff.federated_secure_sum()` is not implemented in this executor. '
'For a fake implementation of `federated_secure_sum` suitable for '
'testing, consider using the test executor context by adding the '
'following during initialization: '
'`tff.backends.test.set_test_execution_context()`')
@tracing.trace
async def compute_federated_sum(
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册