-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
scikit-survival: init at 0.11 #82410
scikit-survival: init at 0.11 #82410
Conversation
fbe54dc
to
a5e2bc0
Compare
9f6c5e0
to
e7fd1bb
Compare
You'll probably need to collapse these 5 commits into 2, each with the correct commit message. Builds for me though. Result of 7 package failed to build:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main suggestion is fetchFromGitHub
, PR numbers, and note about reverting OSQP changes after version is bumped. Haven't tested build locally.
Thanks for the reviews. I'll work on it asap.
|
If you're referring to @wd15 's failed builds above, those are probably due to an unfree dependency (mkl) of osqp not working with automated PR review. |
Didn't think of that. Will check for Python 2 still, but thanks I'll keep that in mind! |
sha256 = "130frig5bznfacqp9jwbshmbqd2xw3ixdspsbkrwsvkdaab7kca7"; | ||
src = fetchgit { | ||
url = "https://github.com/GuillaumeDesforges/osqp-python"; | ||
rev = "770ecc3b96a94b30344cf3721a2e0771ef5c8259"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rev = "770ecc3b96a94b30344cf3721a2e0771ef5c8259"; | |
rev = "770ecc3b96a94b30344cf3721a2e0771ef5c8259"; |
fatal: reference is not a tree: 770ecc3b96a94b30344cf3721a2e0771ef5c8259
Unable to checkout 770ecc3b96a94b30344cf3721a2e0771ef5c8259 from https://github.com/GuillaumeDesforges/osqp-python.
cannot build derivation '/nix/store/z2c2zviawy62qbkzaqx4pbs44xpm4a2m-python2.7-osqp-unstable-2020-03-18.drv': 1 dependencies couldn't be built
@GrahamcOfBorg build python3Packages.scikit-survival |
meta = with lib; { | ||
description = "Survival analysis built on top of scikit-learn"; | ||
homepage = "https://github.com/sebp/scikit-survival"; | ||
license = licenses.gpl3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
licenses.gpl3
is deprecated, consider using licenses.gpl3Only
or licenses.gpl3Plus
.
According to Pypi, the current version is "0.15.0.post0". Should this PR be updated? |
Sorry, I've left it aside for too long. I don't have the time to update it right now. Could you take over @alexvorobiev ? |
I have crude (e.g. tests disabled, etc.) nix derivations for about 20 non-nixpkgs python packages so this one would be at the end of the queue... Here is what I ended up doing for the latest version of scikit-survival: { lib
, buildPythonPackage
, fetchPypi
, ecos
, joblib
, numexpr
, numpy
, osqp
, pandas
, scipy
, scikitlearn
, cython
}:
buildPythonPackage rec {
pname = "scikit-survival";
version = "0.15.0.post0";
src = fetchPypi {
inherit pname version;
sha256 = "572c3ac6818a9d0944fc4b8176eb948051654de857e28419ecc5060bcc6fbf37";
};
buildInputs = [
cython
];
propagatedBuildInputs = [
ecos
joblib
numexpr
numpy
osqp
pandas
scipy
scikitlearn
];
doCheck = false;
doInstallCheck = false;
meta = with lib; {
description = "Survival analysis built on top of scikit-learn";
homepage = https://github.com/sebp/scikit-survival;
license = licenses.gpl3Plus;
};
} |
Mostly LGTM. Maybe open a separate PR for that? Comments:
|
Actually I can work on it this week |
fa778e4
to
a1d68b7
Compare
Tests fail, e.g.
Basically, it seems it does not cythonize. If I do
I can see that the The I'm a but lost here, it's beyond what I know about nixpkgs/python/cython |
They definitely go through the I suspect this is a similar issue I had while packaging A few suggestions:
|
@drewrisinger thanks for sharing your fix, I'll try that :) But isn't that a bigger issue that would need some more global fix in nixpkgs rather than a script to fix it per package? Or is it really package-specific? I mean, won't a lot of cythonized packages fail like this one in the future? |
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 2 packages failed to build and are new build failures:
|
Not sure. Possibly. It seems to be restricted to packages that use both cython & pytest for tests, maybe also ones that run their tests only from the /build/source dir. This is only the second package (other than the Qiskit ones) that I've run across that's had the issue, so not sure if it's worth coming up with a universal solution. EDIT: I just reviewed another PR where this is an issue #120909. I think you're right @GuillaumeDesforges that we need to start coming up with a better automatic solution. |
fe54485
to
0032221
Compare
I've included your fix, thanks @drewrisinger |
0032221
to
cb1c59a
Compare
@GuillaumeDesforges I've been running I suggestion:
|
Agreed 100%, hadn't thought about it. I'll patch it asap |
cb1c59a
to
5f38890
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Minor style points on diff
- Commit LGTM
- Builds via
nix-review
on x86-64-linux:
2 packages built:
python38Packages.scikit-survival python39Packages.scikit-survival
5f38890
to
80748d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments addressed, LGTM. Tested w/ nix-review
again, ran fine.
2 packages built:
python38Packages.scikit-survival python39Packages.scikit-survival
Thanks @drewrisinger for the review :) who should I poke for merge? |
pinging @SuperSandro2000 for merge. I don't have merge permissions |
btw there's a new release available |
This caused evaluation errors when aliases are disabled. Fixed in #133576 |
thanks |
Motivation for this change
Add scikit-survival to nixpkgs
https://github.com/sebp/scikit-survival
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Motivation
scikit-survival was missing from nixpkgs
Notes
Had to PR the package because of requirements issues.
Will put back src on actual source when PR is merged.
See sebp/scikit-survival#98