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
Fail to build scikit-learn. tests fail. #35436
Comments
As a workaround, try using To fix it, possibly we could try updating the upstream version or deleting the test. I've not tested it yet (still building gfortran and numpy for some reason). |
@rvl Thanks for the tip. That produces a different error so I can't supply an empty
|
That worked. Just an ugly workaround however. Specifically, changing shell.nix to this...
|
Hi, glad to hear you're able to use the sklearn package now. My mistake with an empty I had a closer look at the text of the test failure message. Firstly, it is a doctest not a normal test. Secondly, the only difference is whitespace. Apparently, numpy have changed their array I think the best course of action would be to make a nixpkgs pull request disabling scikitlearn doctests unconditionally (i.e. not just darwin), like you have done. Then raise an issue with scikit-learn. Ideally we should run doctests. Maybe there is a better way of invoking the tests. |
Perhaps @FRidh could chime in on this? I could make the fix if they agree. |
Seems a good solution. Ideally it would be the other way around (first raising an issue with scikit-learn and then fixing it here). Note that some things were reverted in numpy 1.14.1 which should end up in staging (currently on |
Did someone raise an issue over at scikit-learn yet? I included a commit that disables doctests in #37250. |
I can't yet change my commit hash, is there a way to do this #35436 (comment) but with a package that depends on let
scikitlearn = python35.pkgs.scikitlearn.overridePythonAttrs (oldAttrs: {
checkPhase = ''
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests --doctest-options=+SKIP $out/${python35.sitePackages}/sklearn/
'';
});
in
(imbalanced-learn.override { scikitlearn = scikitlearn; }) I tried the above, but it didn't work. |
Maybe try something like this: with import <nixpkgs> {};
let
packageOverrides = self: super: {
scikitlearn = super.scikitlearn.overridePythonAttrs (oldAttrs: { checkPhase = "true"; });
};
pythonPackages = (pkgs.python36.override {inherit packageOverrides;}).withPackages (ps: [ps.imbalanced-learn]);
in
pythonPackages.env # env is for a nix-shell Ref: https://nixos.org/nixpkgs/manual/#how-to-override-a-python-package |
Issue description
Using scikitlearn in a nix shell. A test fails but it looks like a bug in the test code. The end of the build messages appears below. It actuall looks ok with small formatting differences. Maybe it's possible to disable some or all of the tests, Not sure how to do that.
Steps to reproduce
Technical details
"x86_64-linux"
Linux 4.9.77, NixOS, 18.03.git.5402412 (Impala)
yes
no
nix-env (Nix) 1.12pre5849_74f75c85
""
""
/home/timsears/nixpkgs
commit is e9fdcc9
(a recent commit on the master branch)
The text was updated successfully, but these errors were encountered: