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