nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 boto3,
11 mlflow,
12
13 # tests
14 pytestCheckHook,
15 scikit-learn,
16}:
17
18buildPythonPackage rec {
19 pname = "sagemaker-mlflow";
20 version = "0.2.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "aws";
25 repo = "sagemaker-mlflow";
26 tag = "v${version}";
27 hash = "sha256-EmfEqL+J+cZVdBfUJtAPHpUZCoDV4X1yRfVJYWky1HU=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 dependencies = [
35 boto3
36 mlflow
37 ];
38
39 pythonImportsCheck = [ "sagemaker_mlflow" ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 scikit-learn
44 ];
45
46 disabledTests = [
47 # AssertionError: assert 's3' in '/build/source/not implemented/0/d3c16d2bad4245bf9fc68f86d2e7599d/artifacts'
48 "test_log_metric"
49
50 # AssertionError: assert 'not implemented' == 'mw'
51 "test_request_header"
52
53 # Require internet access
54 "test_auth_provider_returns_correct_sigv4"
55 "test_log_artifact"
56 "test_presigned_url"
57 "test_presigned_url_with_fields"
58 ];
59
60 meta = {
61 description = "MLFlow plugin for SageMaker";
62 homepage = "https://github.com/aws/sagemaker-mlflow";
63 changelog = "https://github.com/aws/sagemaker-mlflow/releases/tag/v${version}";
64 license = lib.licenses.asl20;
65 maintainers = with lib.maintainers; [ GaetanLepage ];
66 };
67}