nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 graphviz,
6 ipywidgets,
7 matplotlib,
8 notebook,
9 numpy,
10 opt-einsum,
11 pandas,
12 pillow,
13 pyro-api,
14 scikit-learn,
15 scipy,
16 seaborn,
17 setuptools,
18 torch,
19 torchvision,
20 tqdm,
21 wget,
22}:
23
24buildPythonPackage rec {
25 pname = "pyro-ppl";
26 version = "1.9.1";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "pyro-ppl";
31 repo = "pyro";
32 tag = version;
33 hash = "sha256-Dvbl/80EGoGWGhWYVIf/xjovUJG1+3WtpMH+lx1oB2E=";
34 };
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 numpy
40 opt-einsum
41 pyro-api
42 torch
43 tqdm
44 ];
45
46 optional-dependencies = {
47 extras = [
48 notebook
49 ipywidgets
50 graphviz
51 matplotlib
52 torchvision
53 pandas
54 pillow
55 scikit-learn
56 seaborn
57 scipy
58 # visdom
59 wget
60 ];
61 };
62
63 # pyro not shipping tests do simple smoke test instead
64 doCheck = false;
65
66 pythonImportsCheck = [
67 "pyro"
68 "pyro.distributions"
69 "pyro.infer"
70 "pyro.optim"
71 ];
72
73 meta = {
74 description = "Library for probabilistic modeling and inference";
75 homepage = "http://pyro.ai";
76 changelog = "https://github.com/pyro-ppl/pyro/releases/tag/${version}";
77 license = lib.licenses.asl20;
78 maintainers = with lib.maintainers; [
79 teh
80 georgewhewell
81 ];
82 };
83}