tensorflow / privacy

Library for training machine learning models with privacy for training data
Apache License 2.0
1.95k stars 452 forks source link

import tensorflow_privacy -> AttributeError #557

Open zedoul opened 7 months ago

zedoul commented 7 months ago

Great job

1. docker run -it --rm --runtime=nvidia tensorflow/tensorflow:latest-gpu-jupyter /bin/bash

2. pip install tensorflow-privacy

3. python

4. >>> import tensorflow_privacy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tf/privacy/tensorflow_privacy/__init__.py", line 26, in <module> from tensorflow_privacy import v1 File "/tf/privacy/tensorflow_privacy/v1/__init__.py", line 28, in <module> from tensorflow_privacy.privacy.estimators.v1.dnn import DNNClassifier as DNNClassifierV1 File "/tf/privacy/tensorflow_privacy/privacy/estimators/v1/dnn.py", line 19, in <module> from tensorflow_privacy.privacy.estimators.v1 import head as head_lib File "/tf/privacy/tensorflow_privacy/privacy/estimators/v1/head.py", line 20, in <module> from tensorflow_estimator.python.estimator import model_fn File "/usr/local/lib/python3.11/dist-packages/tensorflow_estimator/python/estimator/model_fn.py", line 29, in <module> from tensorflow_estimator.python.estimator.mode_keys import ModeKeys File "/usr/local/lib/python3.11/dist-packages/tensorflow_estimator/python/estimator/mode_keys.py", line 24, in <module> estimator_export('estimator.ModeKeys')(ModeKeys) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/tensorflow_estimator/python/estimator/estimator_export.py", line 63, in __init__ super().__init__(*args, api_name=tf_export.ESTIMATOR_API_NAME, v1=v1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'tensorflow.python.util.tf_export' has no attribute 'ESTIMATOR_API_NAME'

Great job

TinoJHB commented 4 months ago

faciing same issue did you get the sollution

adritatori commented 3 months ago

Getting the same error.. !!!

remigodet commented 2 months ago

I have the same error, on multiple versions of tf, tf-estimator and tf-privacy

remigodet commented 2 months ago

For instance, this https://colab.research.google.com/github/tensorflow/privacy/blob/master/g3doc/tutorials/privacy_report.ipynb colab notebook from the TensorFlow Authors is broken.