Skip to content

pythonPackages.scikitlearn: apply max_iter patch from scikitlearn master#43483

Merged
dotlambda merged 1 commit intoNixOS:masterfrom
Ma27:skip-broken-scikitlearn-tests
Jul 14, 2018
Merged

pythonPackages.scikitlearn: apply max_iter patch from scikitlearn master#43483
dotlambda merged 1 commit intoNixOS:masterfrom
Ma27:skip-broken-scikitlearn-tests

Conversation

@Ma27
Copy link
Copy Markdown
Member

@Ma27 Ma27 commented Jul 13, 2018

Motivation for this change

See scikit-learn/scikit-learn#10723

This fixes the build of scikitlearn on master and nixos-unstable.

The issue is originally an upstream issue
(see scikit-learn/scikit-learn#10619) which
was fixed on master and was mainly caused by changes to the environment.

Closes #43466

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Ma27 Ma27 requested a review from FRidh as a code owner July 13, 2018 13:10
@Ma27
Copy link
Copy Markdown
Member Author

Ma27 commented Jul 13, 2018

currently running nox-review on my machine. I'll report the result when this is done.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jul 13, 2018
@Ma27
Copy link
Copy Markdown
Member Author

Ma27 commented Jul 13, 2018

nox-review fails due to pythonPackages.nilearn which seems to be broken on master already.

@dotlambda
Copy link
Copy Markdown
Member

Shouldn't we apply scikit-learn/scikit-learn@2aba6e2 as a patch instead?

@Ma27
Copy link
Copy Markdown
Member Author

Ma27 commented Jul 13, 2018

I tried to do that, but it doesn't apply properly.
The current patch was a workaround as I needed scikitlearn, please give me some time tonight then I'll see if I can rebase the patch onto the release.

@Ma27 Ma27 changed the title pythonPackages.scikitlearn: skip test_max_iter test WIP pythonPackages.scikitlearn: skip test_max_iter test Jul 13, 2018
@Ma27
Copy link
Copy Markdown
Member Author

Ma27 commented Jul 13, 2018

just marked the PR as WIP until I've seen whether it's possible to apply the patch ;)

@Ma27 Ma27 force-pushed the skip-broken-scikitlearn-tests branch from 06bb0c2 to a4174a5 Compare July 13, 2018 20:09
@Ma27 Ma27 changed the title WIP pythonPackages.scikitlearn: skip test_max_iter test pythonPackages.scikitlearn: apply max_iter patch from scikitlearn master Jul 13, 2018
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a link to the appropriate commit?

@dotlambda
Copy link
Copy Markdown
Member

@GrahamcOfBorg build python2.pkgs.scikitlearn python3.pkgs.scikitlearn

…aster

See scikit-learn/scikit-learn#10723

This fixes the build of `scikitlearn` on master and nixos-unstable.

The issue is originally an upstream issue
(see scikit-learn/scikit-learn#10619) which
was fixed on master and was mainly caused by changes to the environment.

Closes NixOS#43466
@Ma27 Ma27 force-pushed the skip-broken-scikitlearn-tests branch from a4174a5 to 2644a61 Compare July 14, 2018 11:01
@GrahamcOfBorg
Copy link
Copy Markdown

Success on x86_64-linux (full log)

Attempted: python2.pkgs.scikitlearn, python3.pkgs.scikitlearn

Partial log (click to expand)

  self.class_log_prior_ = (np.log(self.class_count_) -
.........../nix/store/ryjjlrli4kxgcr8lfbs8fkhzpjiaqwrw-python3.6-scikit-learn-0.19.1/lib/python3.6/site-packages/sklearn/naive_bayes.py:461: RuntimeWarning: divide by zero encountered in log
  self.class_log_prior_ = (np.log(self.class_count_) -
.................................................................
----------------------------------------------------------------------
Ran 8230 tests in 274.656s

OK (SKIP=62)
/nix/store/a3csiki2lfcyxhwk7s84wgrds9svbgw8-python2.7-scikit-learn-0.19.1
/nix/store/ryjjlrli4kxgcr8lfbs8fkhzpjiaqwrw-python3.6-scikit-learn-0.19.1

@dotlambda dotlambda merged commit af17bfd into NixOS:master Jul 14, 2018
@GrahamcOfBorg
Copy link
Copy Markdown

Failure on aarch64-linux (full log)

Attempted: python2.pkgs.scikitlearn, python3.pkgs.scikitlearn

Partial log (click to expand)

                -5,          0,          0,          0,          0,...
>>  raise AssertionError('\nArrays are not almost equal to 15 decimals\n\n(mismatch 0.793650793651%)\n x: array([[         0,          0,          2,          0,          0,\n                 0,          0,          0,          0,          0,\n                -5,          0,          0,          0,          0,...\n y: array([[         0,          0,          2,          0,          0,\n                 0,          0,          0,          0,          0,\n                -5,          0,          0,          0,          0,...')


----------------------------------------------------------------------
Ran 8230 tests in 1472.104s

FAILED (SKIP=64, failures=1)
builder for '/nix/store/jqy4vvp2rg10rck1rbmnzm7wla7a89iw-python2.7-scikit-learn-0.19.1.drv' failed with exit code 1
error: build of '/nix/store/jqy4vvp2rg10rck1rbmnzm7wla7a89iw-python2.7-scikit-learn-0.19.1.drv', '/nix/store/xyhq27il2b8v2fqfjdkfly9knjnbw60w-python3.6-scikit-learn-0.19.1.drv' failed

@Ma27 Ma27 deleted the skip-broken-scikitlearn-tests branch July 14, 2018 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scikit-learn build failed

3 participants