about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/livelossplot/default.nix40
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/livelossplot/default.nix b/pkgs/development/python-modules/livelossplot/default.nix
new file mode 100644
index 000000000000..c58a18dffe8e
--- /dev/null
+++ b/pkgs/development/python-modules/livelossplot/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, 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 stdenv.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 ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e54a4e9fe456..dcf947a7de78 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -891,6 +891,8 @@ in {
 
   limitlessled = callPackage ../development/python-modules/limitlessled { };
 
+  livelossplot = callPackage ../development/python-modules/livelossplot { };
+
   lmtpd = callPackage ../development/python-modules/lmtpd { };
 
   logster = callPackage ../development/python-modules/logster { };