Merge pull request #172300 from SomeoneSerge/plightning
This commit is contained in:
commit
3e229d87b5
4 changed files with 129 additions and 2 deletions
39
pkgs/development/python-modules/py-deprecate/default.nix
Normal file
39
pkgs/development/python-modules/py-deprecate/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pytestCheckHook
|
||||||
|
, scikit-learn
|
||||||
|
, pytorch
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "py-deprecate";
|
||||||
|
version = "0.3.2";
|
||||||
|
in
|
||||||
|
buildPythonPackage {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Borda";
|
||||||
|
repo = "pyDeprecate";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-84RmQvLxwtLPQk3hX7Q6eeJeejhrO3t+mc95W1E85Fg=";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
scikit-learn
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "deprecate" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A module for marking deprecated functions or classes and re-routing to the new successors' instance. Used by torchmetrics";
|
||||||
|
homepage = "https://borda.github.io/pyDeprecate/";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
SomeoneSerge
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -3,15 +3,18 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, isPy27
|
, isPy27
|
||||||
, future
|
, future
|
||||||
|
, fsspec
|
||||||
|
, packaging
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pytorch
|
, pytorch
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, tensorboard
|
, tensorboard
|
||||||
|
, torchmetrics
|
||||||
, tqdm }:
|
, tqdm }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytorch-lightning";
|
pname = "pytorch-lightning";
|
||||||
version = "1.5.10";
|
version = "1.6.3";
|
||||||
|
|
||||||
disabled = isPy27;
|
disabled = isPy27;
|
||||||
|
|
||||||
|
@ -19,14 +22,17 @@ buildPythonPackage rec {
|
||||||
owner = "PyTorchLightning";
|
owner = "PyTorchLightning";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-GP6/VZuRv8dS5wKQW7RbtOSa2vV9Af2Jp+ioEW3bIgc=";
|
hash = "sha256-MEUFrj84y5lQfwbC9s9fJNOKo+Djeh+E/eDc8KeX7V4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
packaging
|
||||||
future
|
future
|
||||||
|
fsspec
|
||||||
pytorch
|
pytorch
|
||||||
pyyaml
|
pyyaml
|
||||||
tensorboard
|
tensorboard
|
||||||
|
torchmetrics
|
||||||
tqdm
|
tqdm
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
78
pkgs/development/python-modules/torchmetrics/default.nix
Normal file
78
pkgs/development/python-modules/torchmetrics/default.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cloudpickle
|
||||||
|
, scikit-learn
|
||||||
|
, scikitimage
|
||||||
|
, packaging
|
||||||
|
, psutil
|
||||||
|
, py-deprecate
|
||||||
|
, pytorch
|
||||||
|
, pytestCheckHook
|
||||||
|
, torchmetrics
|
||||||
|
, pytorch-lightning
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "torchmetrics";
|
||||||
|
version = "0.8.1";
|
||||||
|
in
|
||||||
|
buildPythonPackage {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "PyTorchLightning";
|
||||||
|
repo = "metrics";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-AryEhYAeC97dO2pgHoz0Y9F//DVdX6RfCa80gI56iz4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
packaging
|
||||||
|
py-deprecate
|
||||||
|
];
|
||||||
|
|
||||||
|
# Let the user bring their own instance
|
||||||
|
buildInputs = [
|
||||||
|
pytorch
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytorch-lightning
|
||||||
|
scikit-learn
|
||||||
|
scikitimage
|
||||||
|
cloudpickle
|
||||||
|
psutil
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
# A cyclic dependency in: integrations/test_lightning.py
|
||||||
|
doCheck = false;
|
||||||
|
passthru.tests.check = torchmetrics.overridePythonAttrs (_: {
|
||||||
|
doCheck = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
# These require too many "leftpad-level" dependencies
|
||||||
|
"tests/text"
|
||||||
|
"tests/audio"
|
||||||
|
"tests/image"
|
||||||
|
|
||||||
|
# A few non-deterministic things like test_check_compute_groups_is_faster
|
||||||
|
"tests/bases/test_collections.py"
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"torchmetrics"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Machine learning metrics for distributed, scalable PyTorch applications (used in pytorch-lightning)";
|
||||||
|
homepage = "https://torchmetrics.readthedocs.io";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
SomeoneSerge
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -5841,6 +5841,8 @@ in {
|
||||||
|
|
||||||
python-nvd3 = callPackage ../development/python-modules/python-nvd3 { };
|
python-nvd3 = callPackage ../development/python-modules/python-nvd3 { };
|
||||||
|
|
||||||
|
py-deprecate = callPackage ../development/python-modules/py-deprecate { };
|
||||||
|
|
||||||
nwdiag = callPackage ../development/python-modules/nwdiag { };
|
nwdiag = callPackage ../development/python-modules/nwdiag { };
|
||||||
|
|
||||||
oasatelematics = callPackage ../development/python-modules/oasatelematics { };
|
oasatelematics = callPackage ../development/python-modules/oasatelematics { };
|
||||||
|
@ -10360,6 +10362,8 @@ in {
|
||||||
|
|
||||||
torchgpipe = callPackage ../development/python-modules/torchgpipe { };
|
torchgpipe = callPackage ../development/python-modules/torchgpipe { };
|
||||||
|
|
||||||
|
torchmetrics = callPackage ../development/python-modules/torchmetrics { };
|
||||||
|
|
||||||
torchinfo = callPackage ../development/python-modules/torchinfo { };
|
torchinfo = callPackage ../development/python-modules/torchinfo { };
|
||||||
|
|
||||||
torchvision = callPackage ../development/python-modules/torchvision { };
|
torchvision = callPackage ../development/python-modules/torchvision { };
|
||||||
|
|
Loading…
Reference in a new issue