New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'tensorflow_federated.python.core.backends.native' has no attribute 'set_sync_local_execution_context' #3792
Comments
Thank you for the question, we're looking into this. |
Hi, it looks like the TFF version you used is an very old version, it's a version we released about 2 years ago. The TFF tutorials and TFF API docs are all based on the newer versions. Are you copying the tutorial from Colab and run it locally? |
Hi, I used TFF version 0.48.0, but still it did not work. It only works if tff is 0.52.0 with python 3.9. Is there any alternative solution for the above code? |
Could you try approaches such as:
import tensorflow_federated as tff
|
Hi, I tried tff.aggregator differential privacy from https://www.tensorflow.org/federated/tutorials/tuning_recommended_aggregators But it did not work. I seen in github tff release that tff.aggregators can work in tff 2.19.0 version and tf 2.7.0 and python 3.8.16. dp_mean = tff.aggregators.DifferentiallyPrivateFactory.gaussian_adaptive( But it throws an error that tff has no attribute aggregators. Else what can be the minimum version of tff to work with aggregators. can you please look in to this. |
@deepquantum88 TFF did have an Also note that you can directly look atthe aggregators tutorial associated with v0.19.0, see https://github.com/tensorflow/federated/tree/v0.19.0/docs/tutorials. Since this is a different bug than the one you initially filed above, can you please fill out the bug template form (reproduced below)? Better yet, a separate bug thread, as these are two separate issues, would be useful. Describe the bug Environment (please complete the following information):
Note: You can collect the Python package information by running Expected behavior Additional context |
@zcharles8 @huili0140 dp_mean = tff.aggregators.DifferentiallyPrivateFactory.gaussian_adaptive( iterative_process = tff.learning.algorithms.build_unweighted_fed_avg( state = iterative_process.initialize() When i am executing the above initialize statement, it keeps on executing and look like in infinite loop. Python=3.9.7 |
Describe the bug
Trying to run TFF with differential privacy module, but it throws an attribute error.
Environment (please complete the following information):
I cannot use python 3.9 or TF >2.7.0 due to compatibility with other packages. How can i use module 'tensorflow_federated.python.core.backends.native' 'set_sync_local_execution_context'. Is there any alternative or am missing something. Please help.
The text was updated successfully, but these errors were encountered: