2023-04-11 21:35:47 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, torch
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "lion-pytorch";
|
2023-06-01 10:35:49 +02:00
|
|
|
version = "0.1.2";
|
2023-04-11 21:35:47 +02:00
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lucidrains";
|
|
|
|
repo = "lion-pytorch";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-06-01 10:35:49 +02:00
|
|
|
hash = "sha256-9hdpRJvCpv3PeC7f0IXpHt6i+e6LiT0QUl5jeDGelQE=";
|
2023-04-11 21:35:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ torch ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "lion_pytorch" ];
|
|
|
|
doCheck = false; # no tests currently
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Optimizer tuned by Google Brain using genetic algorithms";
|
|
|
|
homepage = "https://github.com/lucidrains/lion-pytorch";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|