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

ModelAverage common test fails assertion on check_no_attributes_set_in_init #126

Open
BBQing opened this issue Aug 11, 2020 · 1 comment
Labels

Comments

@BBQing
Copy link

BBQing commented Aug 11, 2020

I have decided to try to fix the #124 I have independently encountered while working with metric-learn package.
I have fixed the joblib import issue into from sklearn.utils._joblib import delayed, Parallel, I have also fixed the sklearn GraphLassoCV import into GraphicalLassoCV import.

So far so good.

But tests failed in three cases. One of them is the mentioned issue with ModelAverage class.
The problematic line in the init method is this one

self.prng = np.random.RandomState(seed)

The error messge is this one:
AssertionError: Estimator ModelAverage should not set any attribute apart from parameters during init. Found attributes ['prng'].
This is, where I have stopped.

@mnarayan mnarayan added the bug label Sep 15, 2020
@mnarayan
Copy link
Member

More details on failed test

ImportError while importing test module '/home/user/skggm-dev/skggm/inverse_covariance/tests/model_average_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/model_average_test.py:4: in <module>
    from sklearn.covariance import GraphLassoCV
E   ImportError: cannot import name 'GraphLassoCV' from 'sklearn.covariance' (/usr/local/lib/python3.8/dist-packages/sklearn/covariance/__init__.py)

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

No branches or pull requests

2 participants