about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/livelossplot/default.nix
blob: 2951ab7a427b825c8ed58e906725fbdb4d4746d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, pytest
, bokeh
, ipython
, matplotlib
, numpy
, nbconvert
, nbformat
}:

buildPythonPackage rec {
  pname = "livelossplot";
  version = "0.5.0";

  disabled = isPy27;

  src = fetchFromGitHub {
    owner  = "stared";
    repo   = pname;
    rev    = "v${version}";
    sha256 = "164v65qglgyg38q9ajnas99rp14mvrk5hn8x76b8iy81vszmx1c0";
  };

  propagatedBuildInputs = [ bokeh ipython matplotlib numpy ];

  checkInputs = [ pytest nbconvert nbformat ];
  checkPhase = ''
    pytest tests tests/external_test_examples.py
  '';

  meta = with lib; {
    description = "Live training loss plot in Jupyter for Keras, PyTorch, and others";
    homepage = "https://github.com/stared/livelossplot";
    license = licenses.mit;
    maintainers = with maintainers; [ bcdarwin ];
  };
}