nixpkgs/pkgs/development/python-modules/sagemaker-mlflow/default.nix
2024-10-13 18:48:16 +02:00

75 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
boto3,
mlflow,
# tests
pytestCheckHook,
scikit-learn,
}:
buildPythonPackage rec {
pname = "sagemaker-mlflow";
version = "0.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "aws";
repo = "sagemaker-mlflow";
rev = "refs/tags/v${version}";
hash = "sha256-1bonIqZ+cFxCOxoFWn1MLBOIiB1wUX69/lUTPPupJaw=";
};
postPatch = ''
substituteInPlace VERSION \
--replace-fail "${version}.dev0" "${version}"
'';
build-system = [
setuptools
];
dependencies = [
boto3
mlflow
];
pythonImportsCheck = [
"sagemaker_mlflow"
];
nativeCheckInputs = [
pytestCheckHook
scikit-learn
];
disabledTests = [
# AssertionError: assert 's3' in '/build/source/not implemented/0/d3c16d2bad4245bf9fc68f86d2e7599d/artifacts'
"test_log_metric"
# AssertionError: assert 'not implemented' == 'mw'
"test_request_header"
# Require internet access
"test_auth_provider_returns_correct_sigv4"
"test_log_artifact"
"test_presigned_url"
"test_presigned_url_with_fields"
];
meta = {
description = "MLFlow plugin for SageMaker";
homepage = "https://github.com/aws/sagemaker-mlflow";
changelog = "https://github.com/aws/sagemaker-mlflow/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}