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

pythonPackages.pymc3: init at 3.2 #32416

Closed
wants to merge 1,185 commits into from
Closed

Conversation

1pakch
Copy link
Contributor

@1pakch 1pakch commented Dec 7, 2017

Motivation for this change

Adds the latest stable version of pymc3 to Python packages. This is one of the major Bayesian inference libraries (along with stan, BUGS, JAGS and, to a lesser extent, edward),

Things done
  • Tested using sandboxing
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested the library
  • Fits [CONTRIBUTING.md]

Edit: longer info

sha256 = "1wkjd71rx1akfrk6iimi4zm783gagxmkxm3ppjyr2c98asni009c";
};

buildInputs = [ nose ];
Copy link
Member

Choose a reason for hiding this comment

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

checkInputs

propagatedBuildInputs = [
six
numpy
] ++ lib.optional (!isNull scipy) [ scipy ];
Copy link
Member

Choose a reason for hiding this comment

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

that lib.optional needs to be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why? It's an optional dependency to patsy allowing for some optional features.

Copy link
Member

Choose a reason for hiding this comment

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

Its no problem if one would pass in scipy = null;;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I see! Of course then.

propagatedBuildInputs = [
Theano
gfortran
openblas
Copy link
Member

Choose a reason for hiding this comment

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

numpy.blas or scipy.blas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed, your concerns are very valid


propagatedBuildInputs = [
Theano
gfortran
Copy link
Member

Choose a reason for hiding this comment

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

does it need to propagate gfortran and openblas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely not needed. I found some existing nix expression where they were listed and did not think about it honestly.

patsy
tqdm
joblib
];
Copy link
Member

Choose a reason for hiding this comment

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

several packages you mentioned here are dependencies of others. No need to repeat them, although it also doesn't hurt.

joblib
];

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

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

Why? Leave a comment in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the tests work but they are quite computationally intensive and some of them fail. Maybe I can patch it so that only few specific tests are run.

Another issue is that the tests are being run in the install phase instead of the check phase. Is it normal?

Copy link
Member

Choose a reason for hiding this comment

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

No, not really.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I disabled the tests and left a note on this peculiarity.

pname = "patsy";
version = "0.4.1";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

why not from PyPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried it actually but specifically patsy 0.4.1 is not found there


doCheck = false;

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

why not from PyPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@1pakch
Copy link
Contributor Author

1pakch commented Dec 10, 2017

I used this package thoroughly and It’s fully functional. The test suite failures I mentioned above are not relevant for end users.

@1pakch 1pakch closed this Dec 10, 2017
@1pakch 1pakch reopened this Dec 10, 2017
, tqdm
, six
, h5py
, run-tests ? false # these are quite heavy
Copy link
Member

Choose a reason for hiding this comment

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

This should not be an option. If one wants to change this value one can use overridePythonAttrs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, thank you

matthewbauer and others added 20 commits April 8, 2018 21:37
(cherry picked from commit 3e88838f3f2fe4e56d10e5eb60d9d8b4c544fb17)
(cherry picked from commit 2e0dfb4)
Signed-off-by: Domen Kožar <domen@dev.si>
Closes: NixOS#37444

(cherry picked from commit 9acdfbf)
(cherry picked from commit 8322981)
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped -h` got 0 exit code
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped --help` got 0 exit code
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped -v` and found version 10.0.1
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped --version` and found version 10.0.1
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater -h` got 0 exit code
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater --help` got 0 exit code
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater -v` and found version 10.0.1
- ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater --version` and found version 10.0.1
- found 10.0.1 with grep in /nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1
- directory tree listing: https://gist.github.com/ef3eb260a3fd46598a3b70c142c2ef2c

(cherry picked from commit a7046d5)
(cherry picked from commit ae3782b)

fixes NixOS#38550
(cherry picked from commit 059f33c)
(cherry picked from commit 4009338)
(cherry picked from commit d6e8371)
(cherry picked from commit 0cadbb8)
(cherry picked from commit 042c001)
(cherry picked from commit a36ae7a)
(cherry picked from commit 017fffc)
(cherry picked from commit 399edfe)
(cherry picked from commit 03efbb0)
(cherry picked from commit 357a2cc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment