1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, isPy27
5, pytest
6, bokeh
7, ipython
8, matplotlib
9, numpy
10, nbconvert
11, nbformat
12}:
13
14buildPythonPackage rec {
15 pname = "livelossplot";
16 version = "0.5.0";
17
18 disabled = isPy27;
19
20 src = fetchFromGitHub {
21 owner = "stared";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "164v65qglgyg38q9ajnas99rp14mvrk5hn8x76b8iy81vszmx1c0";
25 };
26
27 propagatedBuildInputs = [ bokeh ipython matplotlib numpy ];
28
29 checkInputs = [ pytest nbconvert nbformat ];
30 checkPhase = ''
31 pytest tests tests/external_test_examples.py
32 '';
33
34 meta = with stdenv.lib; {
35 description = "Live training loss plot in Jupyter for Keras, PyTorch, and others";
36 homepage = "https://github.com/stared/livelossplot";
37 license = licenses.mit;
38 maintainers = with maintainers; [ bcdarwin ];
39 };
40}