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

AttributeError: module 'lore.pipelines' has no attribute 'hold' #108

Closed
code-wangshuyi opened this issue Aug 3, 2018 · 6 comments
Closed

Comments

@code-wangshuyi
Copy link

When I run the test,How to solve it

@montanalow
Copy link
Contributor

Do you mind providing the full stacktrace? It looks like there is a typo, since the correct type of pipeline is probably lore.pipelines.holdout.Base

@code-wangshuyi
Copy link
Author

code-wangshuyi commented Aug 4, 2018

Many thanks for your response!
I used the Cute Little Example
The following is the full stacktrace:

root@iZwz922qhju4g3na76zdj6Z:~/mairui# lore test
mairui in test on root@iZwz922qhju4g3na76zdj6Z with Python 3.6.4 & Lore 0.6.14
RUNNING Test Suite
/root/.pyenv/versions/3.6.4/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
Using TensorFlow backend.
2018-08-04 10:47:56.076266: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
E

ERROR: unit.test_subscribers (unittest.loader._FailedTest)

ImportError: Failed to import test module: unit.test_subscribers
Traceback (most recent call last):
File "/root/.pyenv/versions/3.6.4/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/root/.pyenv/versions/3.6.4/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/root/mairui/tests/unit/test_subscribers.py", line 3, in
from mairui.models.subscribers import DeepName, BoostedName
File "/root/mairui/mairui/models/subscribers.py", line 6, in
from mairui.pipelines.subscribers import Holdout
File "/root/mairui/mairui/pipelines/subscribers.py", line 7, in
class Holdout(lore.pipelines.holdout.Base):
AttributeError: module 'lore.pipelines' has no attribute 'holdout'


Ran 1 test in 0.002s

FAILED (errors=1)

@montanalow
Copy link
Contributor

Did you recently upgrade to lore 0.6.X? You'll now need to import specific pipeline modules. In this case:

import lore.pipelines.holdout

at the top of "/root/mairui/mairui/pipelines/subscribers.py"

@montanalow
Copy link
Contributor

I have updated the documentation to reflect this: 07aad34

@code-wangshuyi
Copy link
Author

Yes
Requirement already satisfied: lore in /root/.pyenv/versions/3.6.4/envs/mairui/lib/python3.6/site-packages (0.6.14)

@code-wangshuyi
Copy link
Author

Thank you

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