tensorflow / neural-structured-learning

Training neural models with structured signals.
https://www.tensorflow.org/neural_structured_learning
Apache License 2.0
980 stars 189 forks source link

ImportError: cannot import name 'configs' from 'neural_structured_learning' #36

Closed ivan-vasilev closed 4 years ago

ivan-vasilev commented 4 years ago

After installing neural_structured_learning with pip, I can successfully do:

import neural_structured_learning as nsl

But when I try:

from neural_structured_learning import configs

I get the following error: ImportError: cannot import name 'configs' from 'neural_structured_learning'

I'm using python 3.7

DualityGap commented 4 years ago

You should be able to invoke the config module by 'nsl.configs' (instead of a separate importing).

arjung commented 4 years ago

@ivan-vasilev, I tried importing configs the way you did and it worked for me. Below is sample output from a python shell.

Python 3.7.5rc1 (default, Oct  2 2019, 04:19:31) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neural_structured_learning as nsl
>>> from neural_structured_learning import configs
>>> 
arjung commented 4 years ago

Closing the issue as we don't think there is a bug here.