forked from mirrors/nixpkgs
python3Packages.torchmetrics: init at 0.8.1
...needed for pytorch-lightning
This commit is contained in:
parent
f6abbe3b32
commit
defebc5bb9
|
@ -28,7 +28,7 @@ buildPythonPackage {
|
|||
pythonImportsCheck = [ "deprecate" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python module for marking deprecated functions or classes and re-routing to the new successors' instance. Used by torchmetrics";
|
||||
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; [
|
||||
|
|
76
pkgs/development/python-modules/torchmetrics/default.nix
Normal file
76
pkgs/development/python-modules/torchmetrics/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cloudpickle
|
||||
, scikit-learn
|
||||
, scikitimage
|
||||
, packaging
|
||||
, psutil
|
||||
, py-deprecate
|
||||
, pytorch
|
||||
, pytestCheckHook
|
||||
, torchmetrics
|
||||
}:
|
||||
|
||||
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 = [
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -10362,6 +10362,8 @@ in {
|
|||
|
||||
torchgpipe = callPackage ../development/python-modules/torchgpipe { };
|
||||
|
||||
torchmetrics = callPackage ../development/python-modules/torchmetrics { };
|
||||
|
||||
torchinfo = callPackage ../development/python-modules/torchinfo { };
|
||||
|
||||
torchvision = callPackage ../development/python-modules/torchvision { };
|
||||
|
|
Loading…
Reference in a new issue