tensorflow / tensorflow/neural-structured-learning

tensorflow estimator error in v2.16

Open
#130 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
189
PR merge metrics
No merged PRs in 30d

Description

I am trying to use your API with TF2.16 but I got this error:

from neural_structured_learning import estimator
File "/data2/users/angeloso/anaconda/ajsoto/lib/python3.11/site-packages/neural_structured_learning/estimator/init.py", line 7, in
from neural_structured_learning.estimator.adversarial_regularization import add_adversarial_regularization
File "/data2/users/angeloso/anaconda/ajsoto/lib/python3.11/site-packages/neural_structured_learning/estimator/adversarial_regularization.py", line 27, in
from tensorflow import estimator as tf_estimator
ImportError: cannot import name 'estimator' from 'tensorflow' (/data2/users/angeloso/anaconda/ajsoto/lib/python3.11/site-packages/tensorflow/init.py)

Are you planning update your API soon?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the import failure with TensorFlow 2.16, then inspect estimator/init.py and estimator/adversarial_regularization.py, especially the tensorflow.estimator import. Trace the supported TensorFlow estimator API and verify the result with the project's available tests or import checks; done means the API has a confirmed compatibility outcome for TensorFlow 2.16.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.