Files
nixpkgs/pkgs/development/python-modules/gluonts/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

114 lines
1.9 KiB
Nix

{
stdenv,
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
# dependencies
numpy,
pandas,
pydantic,
tqdm,
toolz,
# optional dependencies (torch)
torch,
lightning,
scipy,
# test
pytestCheckHook,
distutils,
matplotlib,
pyarrow,
statsmodels,
which,
}:
buildPythonPackage rec {
pname = "gluonts";
version = "0.16.2";
pyproject = true;
src = fetchFromGitHub {
owner = "awslabs";
repo = "gluonts";
tag = "v${version}";
hash = "sha256-h0+RYgGMz0gPchiKGIu0/NGcWBky5AWNTJKzoupn/iQ=";
};
build-system = [
setuptools
];
dependencies = [
numpy
pandas
pydantic
tqdm
toolz
];
optional-dependencies = {
torch = [
torch
lightning
scipy
];
};
pythonRelaxDeps = [
"numpy"
"toolz"
];
pythonImportsCheck = [
"gluonts"
"gluonts.core"
"gluonts.dataset"
"gluonts.ev"
"gluonts.evaluation"
"gluonts.ext"
"gluonts.model"
"gluonts.shell"
"gluonts.time_feature"
"gluonts.torch"
"gluonts.transform"
];
nativeCheckInputs = [
pytestCheckHook
distutils
matplotlib
pyarrow
statsmodels
which
]
++ optional-dependencies.torch;
preCheck = ''export HOME=$(mktemp -d)'';
disabledTestPaths = [
# requires `cpflows`, not in Nixpkgs
"test/torch/model"
];
disabledTests = [
# tries to access network
"test_against_former_evaluator"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# RuntimeError: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]
"test_forecast"
];
meta = {
description = "Probabilistic time series modeling in Python";
homepage = "https://ts.gluon.ai";
changelog = "https://github.com/awslabs/gluonts/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}