1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonRelaxDepsHook
5, attrs
6, boto3
7, google-pasta
8, importlib-metadata
9, numpy
10, protobuf
11, protobuf3-to-dict
12, smdebug-rulesconfig
13, pandas
14, pathos
15, packaging
16, pythonOlder
17}:
18
19buildPythonPackage rec {
20 pname = "sagemaker";
21 version = "2.109.0";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-hs71bIoByh5S1ncsku+y4X2i0yU65FknJE05lEmnru4=";
29 };
30
31 nativeBuildInputs = [ pythonRelaxDepsHook ];
32 pythonRelaxDeps = [
33 # FIXME: Remove when >= 2.111.0
34 "attrs"
35 "protobuf"
36 ];
37
38 propagatedBuildInputs = [
39 attrs
40 boto3
41 google-pasta
42 importlib-metadata
43 numpy
44 packaging
45 pathos
46 protobuf
47 protobuf3-to-dict
48 smdebug-rulesconfig
49 pandas
50 ];
51
52 postFixup = ''
53 [ "$($out/bin/sagemaker-upgrade-v2 --help 2>&1 | grep -cim1 'pandas failed to import')" -eq "0" ]
54 '';
55
56 doCheck = false;
57
58 pythonImportsCheck = [
59 "sagemaker"
60 "sagemaker.lineage.visualizer"
61 ];
62
63 meta = with lib; {
64 description = "Library for training and deploying machine learning models on Amazon SageMaker";
65 homepage = "https://github.com/aws/sagemaker-python-sdk/";
66 license = licenses.asl20;
67 maintainers = with maintainers; [ nequissimus ];
68 };
69}