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
[WIP] pythonPackages.nevergrad: init at 0.3.2 #80424
Conversation
c9a8496
to
c38fbff
Compare
Thanks for your comments. I've updated the PR and squashed the commits. |
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.
Looks pretty good other than small changes. Haven't tried building.
|
||
src = fetchFromGitHub { | ||
owner = "facebookresearch"; | ||
repo = "nevergrad"; |
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.
You could do repo = pname
here but also fine as is.
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.
Build fails (test failures) with nixpkgs-review pr 80424
for python37Packages.nevergrad
Full build log: https://pastebin.com/tvB9ibfc
python38Packages.nevergrad
also fails, but due to broken python38Packages.pytorch
.
I have the same problem with |
I usually try to build it with e.g. |
Re If you choose to install from GitHub, I would just use a regular python package, with the following additions:
I think that should cover it from a quick glance. |
Thanks for the help. I tried to package fcmaes a few days ago and asked for help here : https://discourse.nixos.org/t/build-a-python-package-which-uses-a-c-library/6097/2 |
@drewrisinger I have a package for fcmaes that seems to work, thanks to your help. I'll try to package the latest version of nevergrad and send another PR then. |
If it's just those two (nevergrad, fcmaes) as new packages, you could merge them into this one PR and submit together. that allows them to be tested together. could also include the bump to 0.4.0 |
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.
Comments re pytestCheckHook
.
checkInputs = [ pytest ]; | ||
checkPhase = "pytest"; |
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.
checkInputs = [ pytest ]; | |
checkPhase = "pytest"; | |
checkInputs = [ pytestCheckHook]; |
I suggest using pytestCheckHook
, it's slightly cleaner and gives more flexibility in future if you need to disable tests, etc. Not a hard requirement.
, matplotlib | ||
, opencv4 | ||
, pandas | ||
, pytest |
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.
, pytest | |
, pytestCheckHook |
I've already opened a PR for fcmaes. So I will rebase and update this PR when possible (and switch to pytestCheckHook, as suggested). |
Motivation for this change
Add Nevergrad (a Python gradient-free optimization framework).
Things done
Tested on NixOS and on Nix+Debian10, using the following
shell.nix
:and with the following example (from Nevergrad docs):
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)