Skip to content
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

Tensorflow Estimator no longer supported #362

Open
chabazite opened this issue Mar 13, 2024 · 3 comments
Open

Tensorflow Estimator no longer supported #362

chabazite opened this issue Mar 13, 2024 · 3 comments

Comments

@chabazite
Copy link

It appears the newest version of tensorflow no longer supports the estimator function, which is used in tensorflow-ranking. You probably already know this an have a fix for the next update, just wanted to call it out in case.

@pabx06
Copy link

pabx06 commented Feb 15, 2025

same issue here . trying to make nixos package for tensorflow-ranking, fails at import check of tensorflow_ranking

  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
  File "/nix/store/nmqxyr00in2arwrq5qd1qipsanz1yrn5-python3-3.11.10/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/nix/store/qnw76s433q5divmh07rsd386kjy38f8v-python3.11-tensorflow-ranking-0.5.3/lib/python3.11/site-packages/tensorflow_ranking/__init__.py", line 20, in <module>
    from tensorflow_ranking import extension as ext
  File "/nix/store/qnw76s433q5divmh07rsd386kjy38f8v-python3.11-tensorflow-ranking-0.5.3/lib/python3.11/site-packages/tensorflow_ranking/extension/__init__.py", line 21, in <module>
    from tensorflow_ranking.extension import pipeline
  File "/nix/store/qnw76s433q5divmh07rsd386kjy38f8v-python3.11-tensorflow-ranking-0.5.3/lib/python3.11/site-packages/tensorflow_ranking/extension/pipeline.py", line 24, in <module>
    from tensorflow import estimator as tf_estimator
ImportError: cannot import name 'estimator' from 'tensorflow' (/nix/store/f45c2147yfw7lz3cbrdnzx1182lfsgah-python3.11-tensorflow-2.18.0/lib/python3.11/site-packages/tensorflow/__init__.py)

@pabx06
Copy link

pabx06 commented Feb 15, 2025

@pabx06
Copy link

pabx06 commented Feb 15, 2025

Missing tensorflow.estimator Dependency
The error ImportError: cannot import name 'estimator' from 'tensorflow' occurs because tensorflow-ranking 0.5.3 depends on the legacy tf.estimator API, which is not included in current TensorFlow 2.18.0 by default. Instead, tensorflow-estimator is now a standalone package :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants