1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 attrs,
11 boto3,
12 cloudpickle,
13 docker,
14 fastapi,
15 google-pasta,
16 graphene,
17 importlib-metadata,
18 jsonschema,
19 numpy,
20 omegaconf,
21 packaging,
22 pandas,
23 pathos,
24 platformdirs,
25 protobuf,
26 psutil,
27 pyyaml,
28 requests,
29 sagemaker-core,
30 schema,
31 smdebug-rulesconfig,
32 tblib,
33 tqdm,
34 urllib3,
35 uvicorn,
36
37 # optional-dependencies
38 scipy,
39 accelerate,
40}:
41
42buildPythonPackage rec {
43 pname = "sagemaker";
44 version = "2.251.1";
45 pyproject = true;
46
47 src = fetchFromGitHub {
48 owner = "aws";
49 repo = "sagemaker-python-sdk";
50 tag = "v${version}";
51 hash = "sha256-6NiWEINVjIzLrHT504wvtFrU34YgyKISvSwozL4JptQ=";
52 };
53
54 build-system = [
55 hatchling
56 ];
57
58 pythonRelaxDeps = [
59 "attrs"
60 "boto3"
61 "cloudpickle"
62 "importlib-metadata"
63 "numpy"
64 "omegaconf"
65 "packaging"
66 "protobuf"
67 ];
68
69 dependencies = [
70 attrs
71 boto3
72 cloudpickle
73 docker
74 fastapi
75 google-pasta
76 graphene
77 importlib-metadata
78 jsonschema
79 numpy
80 omegaconf
81 packaging
82 pandas
83 pathos
84 platformdirs
85 protobuf
86 psutil
87 pyyaml
88 requests
89 sagemaker-core
90 schema
91 smdebug-rulesconfig
92 tblib
93 tqdm
94 urllib3
95 uvicorn
96 ];
97
98 doCheck = false; # many test dependencies are not available in nixpkgs
99
100 pythonImportsCheck = [
101 "sagemaker"
102 "sagemaker.lineage.visualizer"
103 ];
104
105 optional-dependencies = {
106 local = [
107 urllib3
108 docker
109 pyyaml
110 ];
111 scipy = [ scipy ];
112 huggingface = [ accelerate ];
113 # feature-processor = [ pyspark sagemaker-feature-store-pyspark ]; # not available in nixpkgs
114 };
115
116 meta = {
117 description = "Library for training and deploying machine learning models on Amazon SageMaker";
118 homepage = "https://github.com/aws/sagemaker-python-sdk/";
119 changelog = "https://github.com/aws/sagemaker-python-sdk/blob/${src.tag}/CHANGELOG.md";
120 license = lib.licenses.asl20;
121 maintainers = with lib.maintainers; [ nequissimus ];
122 };
123}