sagemaker-core 2.1.1__py3-none-any.whl → 2.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. sagemaker/__init__.py +2 -0
  2. sagemaker/core/common_utils.py +119 -1
  3. sagemaker/core/experiments/experiment.py +3 -0
  4. sagemaker/core/fw_utils.py +56 -12
  5. sagemaker/core/git_utils.py +66 -0
  6. sagemaker/core/helper/session_helper.py +22 -10
  7. sagemaker/core/image_retriever/image_retriever_utils.py +1 -3
  8. sagemaker/core/image_uri_config/huggingface-llm-neuronx.json +111 -1
  9. sagemaker/core/image_uri_config/huggingface-llm.json +110 -1
  10. sagemaker/core/image_uri_config/huggingface-neuronx.json +182 -6
  11. sagemaker/core/image_uri_config/huggingface-vllm-neuronx.json +38 -0
  12. sagemaker/core/image_uri_config/huggingface.json +151 -2
  13. sagemaker/core/image_uri_config/sagemaker-tritonserver.json +40 -0
  14. sagemaker/core/image_uri_config/sklearn.json +48 -0
  15. sagemaker/core/image_uri_config/xgboost.json +84 -0
  16. sagemaker/core/image_uris.py +9 -3
  17. sagemaker/core/iterators.py +11 -0
  18. sagemaker/core/jumpstart/models.py +2 -0
  19. sagemaker/core/jumpstart/region_config.json +8 -0
  20. sagemaker/core/local/data.py +10 -0
  21. sagemaker/core/local/utils.py +6 -5
  22. sagemaker/core/model_monitor/clarify_model_monitoring.py +2 -0
  23. sagemaker/core/model_registry.py +1 -1
  24. sagemaker/core/modules/configs.py +14 -1
  25. sagemaker/core/modules/train/container_drivers/common/utils.py +2 -10
  26. sagemaker/core/modules/train/sm_recipes/utils.py +1 -1
  27. sagemaker/core/processing.py +2 -0
  28. sagemaker/core/remote_function/client.py +31 -6
  29. sagemaker/core/remote_function/core/pipeline_variables.py +0 -6
  30. sagemaker/core/remote_function/core/serialization.py +16 -28
  31. sagemaker/core/remote_function/core/stored_function.py +8 -11
  32. sagemaker/core/remote_function/errors.py +1 -3
  33. sagemaker/core/remote_function/invoke_function.py +1 -6
  34. sagemaker/core/remote_function/job.py +2 -21
  35. sagemaker/core/telemetry/constants.py +6 -8
  36. sagemaker/core/telemetry/telemetry_logging.py +6 -5
  37. sagemaker/core/training/configs.py +16 -4
  38. sagemaker/core/workflow/utilities.py +10 -3
  39. {sagemaker_core-2.1.1.dist-info → sagemaker_core-2.3.1.dist-info}/METADATA +1 -1
  40. {sagemaker_core-2.1.1.dist-info → sagemaker_core-2.3.1.dist-info}/RECORD +43 -47
  41. sagemaker/core/huggingface/__init__.py +0 -29
  42. sagemaker/core/huggingface/llm_utils.py +0 -150
  43. sagemaker/core/huggingface/processing.py +0 -139
  44. sagemaker/core/huggingface/training_compiler/__init__.py +0 -0
  45. sagemaker/core/huggingface/training_compiler/config.py +0 -167
  46. sagemaker/core/image_uri_config/__init__.py +0 -13
  47. {sagemaker_core-2.1.1.dist-info → sagemaker_core-2.3.1.dist-info}/WHEEL +0 -0
  48. {sagemaker_core-2.1.1.dist-info → sagemaker_core-2.3.1.dist-info}/licenses/LICENSE +0 -0
  49. {sagemaker_core-2.1.1.dist-info → sagemaker_core-2.3.1.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
1
+ sagemaker/__init__.py,sha256=wxIXz5aO38fCpEr0NNsvxyx-X8kv6trTFwDxV_knZ6E,104
1
2
  sagemaker/core/__init__.py,sha256=HFFMSe-3h2XYVO4VM_ltZzdHy3foEtnKHD01I7J7DTA,521
2
3
  sagemaker/core/_studio.py,sha256=ahBlOr6rayKxClGnpEyPJ0x8BoSKiA1nSM3cXvInxiE,3341
3
4
  sagemaker/core/_version.py,sha256=TbmhyNSaGE7fgbLKhx9olW4bV3oPxZZsxTz3wkYdsdU,327
@@ -6,7 +7,7 @@ sagemaker/core/analytics.py,sha256=sQcseHyGdazwozUANnm-gZot4lMW6keJSh9Oib-2ZEw,3
6
7
  sagemaker/core/base_deserializers.py,sha256=-90dIeUnCvZ2D1Dk7VApEuDjGiOZG-JGdGwrI5oymws,1247
7
8
  sagemaker/core/base_serializers.py,sha256=isYz_R__C74po-MAZ_0n6WlczD-DAi9darvzk7IpOJc,1231
8
9
  sagemaker/core/collection.py,sha256=xCpr1vVnONQtyGH2bQw3eFrIDn3i7FzIkH7ZsNk-yEc,18843
9
- sagemaker/core/common_utils.py,sha256=HARZuwlrK0VuWxb7AwzdINbvNU_aeidhyfWuhhwxrBQ,80610
10
+ sagemaker/core/common_utils.py,sha256=oksEWtvKEesYvx70WwNJ2erZyN4a8mGnzkt8Xns4rZM,85042
10
11
  sagemaker/core/config_schema.py,sha256=1oT4_YbYyeXc2W_It6tlH4V5erqmAWpiEJaaXbuqoJc,84753
11
12
  sagemaker/core/constants.py,sha256=-wRY6RGDxoIaUTeMEr2nBfc--hptsIRvo46TTqOFvw8,2584
12
13
  sagemaker/core/content_types.py,sha256=C7Q-JGB25ozrQlnGw_mXjnA_mP4bSbzTCzJssCOuksc,6413
@@ -15,16 +16,16 @@ sagemaker/core/drift_check_baselines.py,sha256=p8PQkUQMFsZOEuPx_Q-TXM5xnDZ1QHqnr
15
16
  sagemaker/core/enums.py,sha256=V6wacThvAs2ZZh-0InTrAe4fejT8AsNqlhukLWNce5s,1687
16
17
  sagemaker/core/environment_variables.py,sha256=d3xrN16DPYpcN9BtGJxewFiolQ7tFLyXedNeKnc6DGM,4977
17
18
  sagemaker/core/exceptions.py,sha256=NGRkmdGGh2ZlpOZPprbCkJYJn4jMCvQw9UYZkFD3Vzk,3667
18
- sagemaker/core/fw_utils.py,sha256=y67CnGy9P4TZx1P4_MOA--KcbwmK1-e6x9fXWoSECJI,44965
19
- sagemaker/core/git_utils.py,sha256=W_gbzhUnq-S1_vc4Ae_WMIDqaiOBgPx8RSMDTa-GfRs,15551
19
+ sagemaker/core/fw_utils.py,sha256=_dyCGwmQ4VlVgD5BCJL6aD0RcWH-_a_ep-4M-ygrSa0,46428
20
+ sagemaker/core/git_utils.py,sha256=alQYwXkm69jkVC1aBTlqvX-z-P3of50HBvrJnrtA3HA,18184
20
21
  sagemaker/core/hyperparameters.py,sha256=qeaRPSL_IsAcpVw8idaM2W01D-gfx680IKsplthPPkU,8581
21
- sagemaker/core/image_uris.py,sha256=0PPI9mXXD8_Q6FFR_7Wm-3FmVZf7-Ei-GjVyg3pRhYg,34265
22
+ sagemaker/core/image_uris.py,sha256=FeGlgMwYad6SupKvVTausaKt9VLevboUdkpkqpk0BWk,34470
22
23
  sagemaker/core/inference_config.py,sha256=LEJ5ei9ha30WT_tKId_BL6XyWiWFayO74oWwR2YX5Lw,7007
23
24
  sagemaker/core/inputs.py,sha256=3CPYESbuC5NwFUkv82fMG6k4V5xR6NQVmJhD4VGqoMQ,17976
24
25
  sagemaker/core/instance_group.py,sha256=faSzt3rHRgQl8w1PYKxz1hb31xG2KznvuukNpg3cWv8,2522
25
26
  sagemaker/core/instance_types.py,sha256=0J9vHGYVaiqCuVpohw1AnXlSc2O_PYp6u7Rzc9-iZFo,7666
26
27
  sagemaker/core/instance_types_gpu_info.py,sha256=h2DbsA7VkiWkhp4fEoaodsBamFxGwJXUHe6sof8oCfg,1572
27
- sagemaker/core/iterators.py,sha256=QdA1b5Ni1UwCJUZywGH6BiocgtrPt9Va-i_M33IjwaM,7269
28
+ sagemaker/core/iterators.py,sha256=ch23c9fEaHQEjrt9SQ_vYwwiFOybR7MChRWSRRnG36A,7810
28
29
  sagemaker/core/job.py,sha256=uobdRe57YhzVxyXDR7ITGt_dG8hf9yGHO3wTLnxAmw4,14063
29
30
  sagemaker/core/lambda_helper.py,sha256=UtB1AlU2GFxfzBaNRB5vyAxbEv4oTIhvt9UBWSWFX5Q,12501
30
31
  sagemaker/core/logs.py,sha256=Xx4EEf8J0oS9it_nyJgFe4DsnSooWfnbSrvcF_Y0m8E,5917
@@ -32,12 +33,12 @@ sagemaker/core/metadata_properties.py,sha256=N9LIkaUwaqeyBTKRwGr0h06Xw282S_q5Tly
32
33
  sagemaker/core/metric_definitions.py,sha256=rzPVEKNwfWeZ2UvGq1NRmQtt2bCcTAr_vBkLcrs54o4,4393
33
34
  sagemaker/core/model_life_cycle.py,sha256=Mhjz-ETubuNaBnyw6-7l4XoJMfy4c3jw1GGYcjRruiw,2042
34
35
  sagemaker/core/model_metrics.py,sha256=eyPL67aGQJm2l8XNrSnivqKPoyWCOqxM1EpVkgtbdHE,7155
35
- sagemaker/core/model_registry.py,sha256=JNwErFyo_GshlRuE6llIctxMnWwu7pYmEAtimDTvzAA,20879
36
+ sagemaker/core/model_registry.py,sha256=O6qepWaXPlwJvVnYCBWLDRlYj6EzE0RTKexmTaZ485A,20898
36
37
  sagemaker/core/model_uris.py,sha256=1SdcZE1Hhd12dMpJhfNuDRq9qsTcALLfklI28lCtLm4,4695
37
38
  sagemaker/core/network.py,sha256=f31RvflBvGBvMLqm55d99qFG8gdmA4UQrm0FJGQ2KwQ,7418
38
39
  sagemaker/core/parameter.py,sha256=5cq8bvJymrAW-WebRGE76GaH7LaYKyvb_vKwHOGaUL8,5748
39
40
  sagemaker/core/payloads.py,sha256=FFSwfPoRdJRZWZa1YCEf75kv6Go5uYlHSQj_Ie-pzgE,8720
40
- sagemaker/core/processing.py,sha256=RkzA9Bj3Cf0QN7D1yO08PEiblDwvvv1y1THdnwCpVaA,70908
41
+ sagemaker/core/processing.py,sha256=Dm6EF7LIUJWCp7I5RMN7RagC3of098f7d4_Rd_bquQc,71034
41
42
  sagemaker/core/resource_requirements.py,sha256=2UOYq6TWzNMrE2g8YsHomrWkHGdk02IS5JtMWrQwn50,7039
42
43
  sagemaker/core/resources.py,sha256=iiI5XtEjH0VjDstH3RsSISD0oUWmFXB8ZRjAAKVgY0Q,1775863
43
44
  sagemaker/core/script_uris.py,sha256=HcnlX2OLEXaBkdv9PdoDD2_sfWbdbrYVCOozQBAGeYg,4439
@@ -76,7 +77,7 @@ sagemaker/core/experiments/_helper.py,sha256=IEwuCAXJWB3wtwrj_W74W0zOg4gVVrZ79RK
76
77
  sagemaker/core/experiments/_metrics.py,sha256=Frw_7pUqW_LG35O0OwZQwfeCzgnc1057KllebVxVbwY,11767
77
78
  sagemaker/core/experiments/_run_context.py,sha256=8VJkbV50TpzJ8XU9kyhkfD0EtMTJ4jXwi7WgEBAOZGg,1757
78
79
  sagemaker/core/experiments/_utils.py,sha256=orfWE-nweLLOaVKvvFypTn-iq7ObckZRpjAc4weEJ0g,7934
79
- sagemaker/core/experiments/experiment.py,sha256=1u2nY1X2Hojn-2AooV-P8yaYtYkT-7rq-3Af0LGwpJg,10223
80
+ sagemaker/core/experiments/experiment.py,sha256=9hhlR5qCnB9WLfMswEwB7Y-zlED7qrI-SGyWsUKlNVs,10430
80
81
  sagemaker/core/experiments/run.py,sha256=Wl3mcD_4plglSprcpdecscQ0YaUZlliZOGvcL0vsYyM,38814
81
82
  sagemaker/core/experiments/trial.py,sha256=a24qakHEfbcnbhvReGDyj1s7g4cj_ilM2U0oBTsKljc,12372
82
83
  sagemaker/core/experiments/trial_component.py,sha256=02yv0YFUgtW4bt38Mc0-0ajkFyGCLgPMOO1wu2x6xYU,17114
@@ -85,17 +86,11 @@ sagemaker/core/explainer/clarify_explainer_config.py,sha256=10fMeqVVX6fWEDVUVt3G
85
86
  sagemaker/core/explainer/explainer_config.py,sha256=h5IzOnmvCErFk8mlGf1GT9ojK2ZpQ7KScuz5jCuT-Y8,1763
86
87
  sagemaker/core/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
88
  sagemaker/core/helper/pipeline_variable.py,sha256=K1sd7-tx8QfKFy6okox62KgSoLqdQn4XLtTGI8WzxzU,3048
88
- sagemaker/core/helper/session_helper.py,sha256=0Wb0gDMfDejJ-CtX6mpZ1zmr7MY8ld7NJIo1rOwU89k,124019
89
- sagemaker/core/huggingface/__init__.py,sha256=zyRugEr9PJEfOkgLj_tE9_YSjnI9Njk3B46QNqspQgg,1284
90
- sagemaker/core/huggingface/llm_utils.py,sha256=7STooczHw80_0180_EH2E8m4LBG3zwHErZXGvZMQ2tA,5588
91
- sagemaker/core/huggingface/processing.py,sha256=LzdE-f3loGj49zjQJJ4P-eDIAZO9bUPrv2z5eCIgQps,6033
92
- sagemaker/core/huggingface/training_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
- sagemaker/core/huggingface/training_compiler/config.py,sha256=67cJSB01-ztcl-zfaD1wfLm_IHceQ-KyVi0Cllq-xzw,8019
89
+ sagemaker/core/helper/session_helper.py,sha256=PpF5csI2a6A1G1u4A4PxEDvyv0n3-pCQqrtLlsEN-HM,124527
94
90
  sagemaker/core/image_retriever/__init__.py,sha256=Jn3TWcihenajRyEbKATTBRGjTJi039CnrswsSKcLbwI,128
95
91
  sagemaker/core/image_retriever/image_retriever.py,sha256=EPMi7rj2boMPcjnMoQs-TXCd7I2oKTGyALVb1eGJC0A,30205
96
- sagemaker/core/image_retriever/image_retriever_utils.py,sha256=RLkbNFibqEOonz1pwQn3n1eUOMSXfY0s59AXAuJxXRg,20148
92
+ sagemaker/core/image_retriever/image_retriever_utils.py,sha256=l6X9boAcczEIaPl88i87Ey328kwL7Q5ZvYw1cDdVlxM,20091
97
93
  sagemaker/core/image_retriever/test.py,sha256=ZFYrI7kR7Q4tSxb8W7Lya39wjkvdDKmEAiTBelnk9Ug,89
98
- sagemaker/core/image_uri_config/__init__.py,sha256=GAgqnhmt2Swv6XnSeXMh6CHqgHRUsBvZ8o7vF1g38O0,596
99
94
  sagemaker/core/image_uri_config/autogluon.json,sha256=xwUB37qGyClWYwv5Y0q2WAi5-ZRKdC6Iw-3VoIvoRwI,58839
100
95
  sagemaker/core/image_uri_config/blazingtext.json,sha256=Q7zida81k5uv066x_PCYrb-YEsZc3g8oExp_4WMAt_E,1952
101
96
  sagemaker/core/image_uri_config/chainer.json,sha256=zaxwUPCQa8zZ6O28Uohjc81dssxdDz8etGXQi_76tNw,4212
@@ -112,14 +107,15 @@ sagemaker/core/image_uri_config/djl-neuronx.json,sha256=QF-b0RJjzl9A-ieHJjjk46e8
112
107
  sagemaker/core/image_uri_config/djl-tensorrtllm.json,sha256=enITTkw0jMpvOjxv7QC1bV7U7rzkwIDdaspUK1Xs_hs,11397
113
108
  sagemaker/core/image_uri_config/factorization-machines.json,sha256=kAZpjPj5jkOsGU8bPWllAhovmDXTltWSgCvaAJvXV6s,1963
114
109
  sagemaker/core/image_uri_config/forecasting-deepar.json,sha256=0EfKpdqRSJKuLfHKSUiQ2CBN8tXDUjeErchHmDN95F4,1959
115
- sagemaker/core/image_uri_config/huggingface-llm-neuronx.json,sha256=6Zmxu1BCmS4FVknqwSvJNPJBh4djhPzrjbsuroKywp4,30847
116
- sagemaker/core/image_uri_config/huggingface-llm.json,sha256=EmrxZl2zhAZV29_huB-_78aYtOya0z3WkCG4AjIJ7dw,54159
110
+ sagemaker/core/image_uri_config/huggingface-llm-neuronx.json,sha256=m2qTC2wOe7qXbRK7Giy4VZRY0UdxyoGYlLrlZ1xECXo,36009
111
+ sagemaker/core/image_uri_config/huggingface-llm.json,sha256=nQwCZkBgbG-MH1BXFEdLsv8Dj1KOlo1B3Sq9Ut5fy3o,59295
117
112
  sagemaker/core/image_uri_config/huggingface-neuron.json,sha256=B4JqfOSugs9HW2T22eNPjcuzqi7PVxc52UZ3bOB59vY,1964
118
- sagemaker/core/image_uri_config/huggingface-neuronx.json,sha256=GEyOb--IEUztV1dVvzDoIPwfHeuwDrI_LEp36f5oFvY,23088
113
+ sagemaker/core/image_uri_config/huggingface-neuronx.json,sha256=vIP1djtJDzjmDcwT028oKon0hydYXFPHiOrR-QMRxME,31034
119
114
  sagemaker/core/image_uri_config/huggingface-tei-cpu.json,sha256=pd7POB4Gk_Dq_YTMhuQMdTukbeydLKXV11zUxovW_Pc,13187
120
115
  sagemaker/core/image_uri_config/huggingface-tei.json,sha256=6aBUBOBQn-0G_MBps_cpAGJNMT-pRUvubSuMEvnWrQc,13204
121
116
  sagemaker/core/image_uri_config/huggingface-training-compiler.json,sha256=DnCPhKPlQtEiUg6V2RNUzkbLe-gAr_YKJq7USQVSW8I,8738
122
- sagemaker/core/image_uri_config/huggingface.json,sha256=0-CVtLHsywJNJihVFWQZPz2dduX62_fVfnefkgxH1HM,104220
117
+ sagemaker/core/image_uri_config/huggingface-vllm-neuronx.json,sha256=gy6eqJkKyfl2YZtb2JUo5qA39aMTdqRnobwDf10YLF8,1198
118
+ sagemaker/core/image_uri_config/huggingface.json,sha256=tus0nYBzwY-alS0sF2F1fnVjHEZ5Ursv5dykOKJwVso,111302
123
119
  sagemaker/core/image_uri_config/hyperpod-recipes-neuron.json,sha256=PTAIWLrTJ3DTJyODjf2T6i_QkX7-nhA2-k3rRd8g3h4,1924
124
120
  sagemaker/core/image_uri_config/image-classification-neo.json,sha256=XYf76nHUA42dXUQWJJJy4O_8-EIR_d0J5Igj_79PXo8,1665
125
121
  sagemaker/core/image_uri_config/image-classification.json,sha256=PDK6ISr9dzWwVVPz7XeTZCs5T2ztVB1z4fmgQoCX3-g,1961
@@ -151,17 +147,17 @@ sagemaker/core/image_uri_config/ray-tensorflow.json,sha256=WnidbAzGY9Xz5pijqKrcn
151
147
  sagemaker/core/image_uri_config/sagemaker-base-python.json,sha256=4S4fx97mtrKgY1kui70MKGcHjZoW0Tt1DRmbWWBBHRs,1900
152
148
  sagemaker/core/image_uri_config/sagemaker-distribution.json,sha256=D15rjPfuXQ_1A0q0jPi7Lbryri_6Wd0jp1941JW3aaw,1359
153
149
  sagemaker/core/image_uri_config/sagemaker-geospatial.json,sha256=onitbqKrsxP9FiLYv5-YHNxWw57lKJJdfBviekLtbow,251
154
- sagemaker/core/image_uri_config/sagemaker-tritonserver.json,sha256=qES0aX22zuaodEd75H4A44F-zNcLADnimB4jGnmyNWM,8848
150
+ sagemaker/core/image_uri_config/sagemaker-tritonserver.json,sha256=YI7ielrEek9YcTpCsDQMDjESd35NeSDF0y6DWeedEuA,10616
155
151
  sagemaker/core/image_uri_config/semantic-segmentation.json,sha256=F7CmcedwppBwAt8bJesP1MCFfkQo9ISFlloxpz3Bso8,1962
156
152
  sagemaker/core/image_uri_config/seq2seq.json,sha256=CJOrRAImaXXSGtxkh_vFQqYD93QkqTTLJYUt1DO06R4,1948
157
- sagemaker/core/image_uri_config/sklearn.json,sha256=WyJWAATV8A7PxvjsXvzi5TOpcbkh225nqR2mEceyRTU,20003
153
+ sagemaker/core/image_uri_config/sklearn.json,sha256=aMNGYNDxQPV1rE9HZB1xKmbC12LcIfJG2cQn74wtUpA,22205
158
154
  sagemaker/core/image_uri_config/spark.json,sha256=-Pxku5AiFvmUqgOpqWFCRqMk4tVyZOTE5jOEnbZ3ET4,12868
159
155
  sagemaker/core/image_uri_config/sparkml-serving.json,sha256=HzMRrp1mbyF_VNcnJ9T83FBQvicWWgBsLDoixVCkNNA,4052
160
156
  sagemaker/core/image_uri_config/stabilityai.json,sha256=MBzBi0bg3IxVgv__x08NBvNdKgR69n17OYm9iCwsDV4,2050
161
157
  sagemaker/core/image_uri_config/tensorflow.json,sha256=_KBm-dRO7Xzry9oDKmNRuEqFi8wj_Ga7997vcyOdGJE,240040
162
158
  sagemaker/core/image_uri_config/vw.json,sha256=-MfHhVlpEDxPWxStlL-CmpcBNHcMBieU_NEts09BDKI,857
163
159
  sagemaker/core/image_uri_config/xgboost-neo.json,sha256=HYlq52lyItrApOvtx6Ew4J-XBDS0YusIfvAwinrRwsA,1652
164
- sagemaker/core/image_uri_config/xgboost.json,sha256=PcEHwLtCbyBq0P26NEWAece7y9nm3sRBdzn7PKUa06w,41639
160
+ sagemaker/core/image_uri_config/xgboost.json,sha256=3eR3TzerFVhkH2h6XFhLIr7Emvumg-vsdOj7t7l--fQ,45723
165
161
  sagemaker/core/inference_recommender/__init__.py,sha256=nty_FWYBcHR8aodym2YtiiyVtyujQxMSmfaoewAbUa0,801
166
162
  sagemaker/core/inference_recommender/inference_recommender_mixin.py,sha256=BTA7lUCAPxCxdZFtivb34DeoR6orP9pS4cdKH5Errxk,28741
167
163
  sagemaker/core/interactive_apps/__init__.py,sha256=KrgA4M5RnLip8ClNHwC7KxSnHu6D9oe1aSOWh8YR_Is,1272
@@ -178,11 +174,11 @@ sagemaker/core/jumpstart/document.py,sha256=ek3fJ0p2l9zTCmpnmghi4Yi852j0oCGj6Usg
178
174
  sagemaker/core/jumpstart/enums.py,sha256=2BkIRRRNnemLzdmG3XMUuzVr8FWhI33ZI3FXtgz8iZ4,4872
179
175
  sagemaker/core/jumpstart/exceptions.py,sha256=f7HXiSYdfQwpqHRVCIjRUDFCRTliJWx0cBFjDYRhURU,9262
180
176
  sagemaker/core/jumpstart/filters.py,sha256=xe53UlzSVCFt-FLKWbaq09XTYmpV4MMHn-eF_wTR2es,20982
181
- sagemaker/core/jumpstart/models.py,sha256=BvvytN1Kvcu1Dqle4LscUDa71PwAocMGP5t5pG8bee0,14636
177
+ sagemaker/core/jumpstart/models.py,sha256=bYOnTz_dfSisCnLNAk7YfNp9JvaHpt9g7OTKHtpI_pk,14766
182
178
  sagemaker/core/jumpstart/notebook_utils.py,sha256=i2dIlISgzFUoYeILN5Tpyc_jyKH9PpqbRiol6dTMeQA,23295
183
179
  sagemaker/core/jumpstart/parameters.py,sha256=opIIW_oU7O72vq_SlBkKoMExqIYHnUbHRXJ07-ovJZo,948
184
180
  sagemaker/core/jumpstart/payload_utils.py,sha256=bqLUYBLxaJ6sD7n4OREBgq7MhEa8f61oVWxI7Z8F5kc,9380
185
- sagemaker/core/jumpstart/region_config.json,sha256=sAiSeU09T8JsQlkVuiKdHxeI1uDagpsQKjTjZL8rfaE,7167
181
+ sagemaker/core/jumpstart/region_config.json,sha256=yi51K_wj6-GM0dZ23TglJl7lU0Xmn0cDFF3-_XSEW9w,7500
186
182
  sagemaker/core/jumpstart/search.py,sha256=KwduhuER3_Ul7roLewBVBEYw8YZSlXW7K49VFQyx-Mw,6135
187
183
  sagemaker/core/jumpstart/serializers.py,sha256=2jOUfK4_msGeQqSuQCR-sXQx5UHc1U1Z8DBnfsVT7OM,3935
188
184
  sagemaker/core/jumpstart/session_utils.py,sha256=TARN-sAyubafGpj_KX43N6MPrKU4NDFLbeACS07B88M,9169
@@ -225,17 +221,17 @@ sagemaker/core/lineage/lineage_trial_component.py,sha256=ou_SkNTTRDo9BoVmsVfPxJD
225
221
  sagemaker/core/lineage/query.py,sha256=aH0aeEyF8doBM0zQ-_UV-PjyU3Pf8N3fQ4ZOsPcDdVM,27066
226
222
  sagemaker/core/lineage/visualizer.py,sha256=MY3tCTZgeXNxUZ_m-aZhJqV6Dw12fpkk2qbQXA2lQ_g,13246
227
223
  sagemaker/core/local/__init__.py,sha256=Dx1VYzVS--FYew8A-CwWsGvB3_18qXgwG9cet7U85jc,744
228
- sagemaker/core/local/data.py,sha256=uIpjWyPL3MPTFoanYczhcy0eM6oXi0rM2xvb0wdHudA,13205
224
+ sagemaker/core/local/data.py,sha256=RpEBEkuKpVbQLRJ5VMoO_sMA8OFjceo3fZls0002fiw,13675
229
225
  sagemaker/core/local/entities.py,sha256=ARxpUteG-7Nla1nG98ALbStVD2yNK92GkNtItSwKIFY,25904
230
226
  sagemaker/core/local/exceptions.py,sha256=hjcRgJk9TtBBWVpSrByurrnERwrvJ3e5NOrMcPnIdpk,779
231
227
  sagemaker/core/local/image.py,sha256=0jiA5HqfbQWo9BqufnEODCBgG1yLjb37u9DxjfkHoYM,47218
232
228
  sagemaker/core/local/local_session.py,sha256=hAAzjGhyWhoP5gPMqwKnTECYt4e-r14gjOchppgxHAM,26829
233
- sagemaker/core/local/utils.py,sha256=HgWjDp_TI2YMp13q7xrLf3TTkbVsM3Tmo24fJvrSv_A,8177
229
+ sagemaker/core/local/utils.py,sha256=trDakVtOpAqnZyAni-R0WgeXlXng564X9dFBtwmIzrc,8196
234
230
  sagemaker/core/mlflow/__init__.py,sha256=fe-GZTujt4kzM6qqkc-7gEOxL6a_6M-VnUy3VfRGCUg,1372
235
231
  sagemaker/core/mlflow/forward_sagemaker_metrics.py,sha256=3_kpOWCof6igCHpXg43cqTBIuYh3r644FESM5k4nB8E,1648
236
232
  sagemaker/core/model_card/__init__.py,sha256=A6zkr52JZWKDdIoH-tF5-0ni3iQ0gYRrVmW4pqz2c3M,986
237
233
  sagemaker/core/model_monitor/__init__.py,sha256=3ls5dUkIapv4AStR7-AjWqpIWU-_-IjztOoNxH_kiYo,3433
238
- sagemaker/core/model_monitor/clarify_model_monitoring.py,sha256=m2asOJkwqwVNCOGFXkoJygznhh8Oi5M3faEO4IzmaTI,69520
234
+ sagemaker/core/model_monitor/clarify_model_monitoring.py,sha256=jUlaBeRJVc4Ox8TP5hl67QOrNcG0IjqsIevKZuDTm2o,69650
239
235
  sagemaker/core/model_monitor/cron_expression_generator.py,sha256=4A05akhzppenJQHPt1xY2pJsbJ1lcOK3G3fuY5m6sTg,2930
240
236
  sagemaker/core/model_monitor/data_capture_config.py,sha256=f7lbWdEwlQwvzoQEDh6BCmVgznDlc2pWT7re0cjkrPQ,5176
241
237
  sagemaker/core/model_monitor/data_quality_monitoring_config.py,sha256=Jg5Pd06ZlYUtIQ3Qg8Sgz9k6kcip2NVNchsMhGsJnz8,2486
@@ -245,7 +241,7 @@ sagemaker/core/model_monitor/monitoring_alert.py,sha256=r6AFJi7dt_lFLWsicKv9KlUM
245
241
  sagemaker/core/model_monitor/monitoring_files.py,sha256=Bpo9pEtVL7e_osQcYnbuziX9HOaI2uBkCWiQ6jYF3us,20524
246
242
  sagemaker/core/model_monitor/utils.py,sha256=jCBfB-Jj12W4JsMjS8jD04etBijR6v-1kIgAsWUZbYY,34089
247
243
  sagemaker/core/modules/__init__.py,sha256=SSZBrimc63iqSPjSjR4Lx-iTluu8znM2QQZioudE1Zs,829
248
- sagemaker/core/modules/configs.py,sha256=zuv5lDhbyd1rjf8cytlCKrIKBEOrT_xwpOeqO-ogd4Y,9136
244
+ sagemaker/core/modules/configs.py,sha256=xq4wv0ln_mew4lI1DkUQQ6XBvoEdaS7hWMJ7da-XUUI,9636
249
245
  sagemaker/core/modules/constants.py,sha256=hiViW1H2tzmiLrsrhe4UvLJEKGCJ0WqiG3vb1t1E-wE,1254
250
246
  sagemaker/core/modules/distributed.py,sha256=ZCm3RF3UgnrtoE-Zcjxa_X1RgR12-1ba4f2-SSIMvSk,6833
251
247
  sagemaker/core/modules/templates.py,sha256=7VrkG6axyqBr-Xx0fuwFbyLfrxU9snQpxyUL46BjLp8,2320
@@ -256,7 +252,7 @@ sagemaker/core/modules/local_core/local_container.py,sha256=ZWF9-WuCS5izqA4UXRR3
256
252
  sagemaker/core/modules/train/__init__.py,sha256=04hUL2wiHGXWHpHD9vtlpTA1YHEJvN3Ja3aaf1YSLXY,640
257
253
  sagemaker/core/modules/train/container_drivers/__init__.py,sha256=hFRmz5Ch3wx0a9vpgVqyXozipjZ2TSKvb20-X1sP26o,652
258
254
  sagemaker/core/modules/train/container_drivers/common/__init__.py,sha256=W_hcSzzOvV8oNNWzivU6vZqv3jYd7cSkKDaQXjlf8es,661
259
- sagemaker/core/modules/train/container_drivers/common/utils.py,sha256=Z2heyOBmLhE3rqsy3L6qolEBdLXxmSqXHtk-j98AC_Y,6981
255
+ sagemaker/core/modules/train/container_drivers/common/utils.py,sha256=rsx1VD-ixzeKCf1ZVDFUFE8ZwMDpOJx0_hi9XncHAqY,6698
260
256
  sagemaker/core/modules/train/container_drivers/distributed_drivers/__init__.py,sha256=P_9zjCEBEpSJ_hmU0661joL8t3ARn4qovOENqCZczj4,662
261
257
  sagemaker/core/modules/train/container_drivers/distributed_drivers/basic_script_driver.py,sha256=gcSKwb_laf8_bZ3s1eFjEujLlL-ujtjan3OLd6LrJmY,2427
262
258
  sagemaker/core/modules/train/container_drivers/distributed_drivers/mpi_driver.py,sha256=ikQO52Co16nxxXPHQ7NkoH28MHwsMjpYvQ9Rd8tmawE,4266
@@ -265,21 +261,21 @@ sagemaker/core/modules/train/container_drivers/distributed_drivers/torchrun_driv
265
261
  sagemaker/core/modules/train/container_drivers/scripts/__init__.py,sha256=j-mHREHwHYpuAr9egOazGgT-a6MPfxnCFmH4rtqHwTY,662
266
262
  sagemaker/core/modules/train/container_drivers/scripts/environment.py,sha256=IseQtc0qnqvdlRKiostC4OOMVmLgJpO1ai9MW6E6ulw,11070
267
263
  sagemaker/core/modules/train/sm_recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
268
- sagemaker/core/modules/train/sm_recipes/utils.py,sha256=ec9SbavQIcidJ5zmWEJk640-5oATNJ_WMlNY9_-8r1o,11725
264
+ sagemaker/core/modules/train/sm_recipes/utils.py,sha256=E-ToK3koYTGuJZ7zueodB4TUASOx-mLfbyxmH2F3c5w,11722
269
265
  sagemaker/core/remote_function/__init__.py,sha256=A1vDi5kiaPuwrGA6yS4VapWRWMeorDtSYYtwH1KM7G0,1035
270
266
  sagemaker/core/remote_function/checkpoint_location.py,sha256=6DMXQ6TOnYcMjox__YXUB3kMtmoJ9l6fDxdnPtucwkE,1894
271
- sagemaker/core/remote_function/client.py,sha256=aS-OKoyIaok2XNBFcBIYXxT3-D49QTwBfQSEgWyE83g,60934
267
+ sagemaker/core/remote_function/client.py,sha256=D-doUzTS25eelxL-OhP6QJzTRgd2Hl7JO3HgnXK7Z9o,61650
272
268
  sagemaker/core/remote_function/custom_file_filter.py,sha256=01YUOG1lrFsD6Tti2I7YyJPabF8Bw4181y1Ep1Kb6EA,4549
273
- sagemaker/core/remote_function/errors.py,sha256=fzhFFItk7NWDYlvjmZg1wl_fbVx5In-_-ODzKXSL5H8,3616
274
- sagemaker/core/remote_function/invoke_function.py,sha256=qevwl_G33VGPtVDN81-0QAxKv8q0W_rzbqUjNWbITco,5670
275
- sagemaker/core/remote_function/job.py,sha256=u5O5okPR5-2zmohfT7kt347fH5nU_mKrzBcSoHiH0TE,87986
269
+ sagemaker/core/remote_function/errors.py,sha256=8Zgyp5EWI-J8L6_ValeGAtOKV4YxXs3w-voqeh-f5N4,3494
270
+ sagemaker/core/remote_function/invoke_function.py,sha256=HGL9xTnXaVeL2e5ALeVagQDeuakBLRSavc7UebqhmOk,5511
271
+ sagemaker/core/remote_function/job.py,sha256=0enllsj62GN_pl-oSXHpxyA6A_IWfD2npUc2L-_8OGM,86992
276
272
  sagemaker/core/remote_function/logging_config.py,sha256=e6C8w_CR2iJh5QLazeYZAmTjOgF7zAz1IGAPk1MGIy8,1387
277
273
  sagemaker/core/remote_function/spark_config.py,sha256=3jhyNOmeEvS9K7-trneFOpHzdq6yHEU_p4yufTZnL90,6298
278
274
  sagemaker/core/remote_function/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
279
275
  sagemaker/core/remote_function/core/_custom_dispatch_table.py,sha256=KuJL6gJxFgx4OqPDo0LWK97vQZ6EUdS_nOi3P-Y-3NE,2659
280
- sagemaker/core/remote_function/core/pipeline_variables.py,sha256=NAidYz2p6p7dA8VMRIdjKadSptHNmtFFp3OuiPehx6E,11791
281
- sagemaker/core/remote_function/core/serialization.py,sha256=Ia4hX-hLROoU1nukusXqNZxj7ASuhY73M3uTLXQ4vCc,16275
282
- sagemaker/core/remote_function/core/stored_function.py,sha256=ceXA2C28fooWI8xJPfmUOGwkzfUgTvUvJUTQ9vgvrgA,8284
276
+ sagemaker/core/remote_function/core/pipeline_variables.py,sha256=P_7Nzg0c9r02g5dsOnDXRgj7jfC2O8m39YW_bwl0QYU,11503
277
+ sagemaker/core/remote_function/core/serialization.py,sha256=9GKGHUsZ0uwKVis3SyqjPYhTBCyoS71qryZERkP4ooc,15243
278
+ sagemaker/core/remote_function/core/stored_function.py,sha256=7q0eV2Q0pF83woSh-QP82Xdr_so-NA-5b7XfaLos3fA,7950
283
279
  sagemaker/core/remote_function/runtime_environment/__init__.py,sha256=I3CZULFeDwHwjPUzq3xk_ZrWh6x8d-kO6kz-rX6_sO4,652
284
280
  sagemaker/core/remote_function/runtime_environment/bootstrap_runtime_environment.py,sha256=eSUDdN1U9leS4Gv-i-ZJ8TKtnkfqBL6iaEB4E6Xgv7M,22122
285
281
  sagemaker/core/remote_function/runtime_environment/mpi_utils_remote.py,sha256=wqNH5Zuc5WB0rPNy3sf3szszolkbGJElEveh4FHkSMw,8726
@@ -299,8 +295,8 @@ sagemaker/core/spark/__init__.py,sha256=RISFq3KL40KRGkWsk813EqauI0FcjeCrsIpn1lS1
299
295
  sagemaker/core/spark/defaults.py,sha256=Ga7OzEuG29qT-78eCeW_kmI2gP__746Ew6xoRfNPoRM,671
300
296
  sagemaker/core/spark/processing.py,sha256=Yf1ueSAJ57kY8rGrPEDU39cQAdPxcztV-Oi4YciKif8,61569
301
297
  sagemaker/core/telemetry/__init__.py,sha256=fgtTWBIe2a3zZ3lXnVbFN-5Uxsy2LvMyEAKUcj-eak0,912
302
- sagemaker/core/telemetry/constants.py,sha256=TZgwEhDO3-LxIGAO4RBIPZEk6cFUXffL58rgjxB3PNg,2744
303
- sagemaker/core/telemetry/telemetry_logging.py,sha256=TIVf4X6ZhTPJ1rUQx8MJwbUIAgMb3zL5TH3LdFaKY84,10379
298
+ sagemaker/core/telemetry/constants.py,sha256=dSKj_fFqbR_vD7xHRSCU2ahiFS3esL_PQ0qrwrKZxsg,2596
299
+ sagemaker/core/telemetry/telemetry_logging.py,sha256=IMS_jfY6GLpk1FiYyWPGhjO1ZUgK3dRX5Sx_G1WgRFM,10412
304
300
  sagemaker/core/tools/__init__.py,sha256=Wv7J6XW66GOYhUytyQ32XZHW0TbfS11mLH8hl7L4Fuo,70
305
301
  sagemaker/core/tools/codegen.py,sha256=MMSmzm1jXg09lPfcrxDo2VhHUTUQbhdjlthhfubDGx8,2006
306
302
  sagemaker/core/tools/constants.py,sha256=Li4DCfEto3_CWM9LV-_PlweEKU42GiYbKcDtlilriYQ,3728
@@ -313,7 +309,7 @@ sagemaker/core/tools/shapes_extractor.py,sha256=vxGxdvstoJ8xoNKX8npT6aixGkHntt_P
313
309
  sagemaker/core/tools/templates.py,sha256=lzckRzlX3Ht8j3H4SYp79P2B4q5M9jX1swSuKC_t8EU,24676
314
310
  sagemaker/core/tools/model_card/generate_model_card_from_schema.py,sha256=wHZGKMWttL-lYSdMjyuh0YO569hkemNsB2ICq6wscR8,22622
315
311
  sagemaker/core/training/__init__.py,sha256=mnnemiOpx61sdFlJNKBlRcRAaMoKIImCdM67eqeNhB8,643
316
- sagemaker/core/training/configs.py,sha256=ZUjem52iJj-OSZCMnimdHARMNFNLjW8mDUzQeFOBVrM,13932
312
+ sagemaker/core/training/configs.py,sha256=E35rVbDSFw3UGKBV2t_FSe-n2Y0p0eNmuybsRsQzF_w,14507
317
313
  sagemaker/core/training/constants.py,sha256=neypgR0hRAzJ7vvY0mxoww0H9NTXgv1qq6DboY6M2vo,1248
318
314
  sagemaker/core/training/utils.py,sha256=EiGf0Xv9OKCi8JrzetEkCE2fQszAm8s6FrUnMxYhQbw,2632
319
315
  sagemaker/core/training_compiler/__init__.py,sha256=0DNGNiUXdmvJ6cywPSyE4Nxrd2hsL8IATSrbYrfzqkU,753
@@ -342,14 +338,14 @@ sagemaker/core/workflow/pipeline_context.py,sha256=PPDXxp0TYhd_UmShwKRwIauMDiUhm
342
338
  sagemaker/core/workflow/pipeline_definition_config.py,sha256=h7peb05tolLC6YK0dZ3ucr3J7UnA4loGNZU-FyyFLCo,1241
343
339
  sagemaker/core/workflow/properties.py,sha256=Sn1n53hF3RFhFMY-mtn6Md4nyEqbX--kI7v-Bbeji_o,10538
344
340
  sagemaker/core/workflow/step_outputs.py,sha256=iaM-iQPa-SjwrF1_EYJb0W1oj1eCTVj4RyyW4sgLGhw,1891
345
- sagemaker/core/workflow/utilities.py,sha256=vlgh1w3E9B25p3n0MFzun1Jrq9ofv-xovW4tcEvIWb0,19211
341
+ sagemaker/core/workflow/utilities.py,sha256=oGsYI4Y5D_Lz2Lkqb1zUif3ygizlR1l09sZzQfHUVDk,19386
346
342
  sagemaker/lineage/__init__.py,sha256=Mvz5zBHiXnPWFsP73xS02mnUWuI69ZsiMo5MYKu4QZE,1211
347
343
  sagemaker/lineage/action.py,sha256=riSefnRx-Tq0FgOqTaa2rMzYnCgPFLAvU3YIeTN6H_U,976
348
344
  sagemaker/lineage/artifact.py,sha256=HhKq36HWaEFDRiwGtJVhgMaz8ARIYCVY9cs0hnGerqc,986
349
345
  sagemaker/lineage/context.py,sha256=eNgpEhvsWZgf6VMCJVbAn9LFMyz_GumYQkDi2kVHnoQ,981
350
346
  sagemaker/lineage/lineage_trial_component.py,sha256=x9vzNn5hNb9FWyn0EipZyUKTclv-8_X9Q86bUXWNL_Q,1061
351
- sagemaker_core-2.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
352
- sagemaker_core-2.1.1.dist-info/METADATA,sha256=iIg62XgekXjIvAapnfprAOY_XhRbMuXdKRa2e_p1cLo,5521
353
- sagemaker_core-2.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
354
- sagemaker_core-2.1.1.dist-info/top_level.txt,sha256=dzCY2cZ4aU_S6NM-0PxIEkCsiZXnzUM2UQbHsuyIU1c,10
355
- sagemaker_core-2.1.1.dist-info/RECORD,,
347
+ sagemaker_core-2.3.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
348
+ sagemaker_core-2.3.1.dist-info/METADATA,sha256=TzSISKAA5mAyxtU99UZ8AG0Kh-xfDsZnNacmuzI7YuU,5521
349
+ sagemaker_core-2.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
350
+ sagemaker_core-2.3.1.dist-info/top_level.txt,sha256=dzCY2cZ4aU_S6NM-0PxIEkCsiZXnzUM2UQbHsuyIU1c,10
351
+ sagemaker_core-2.3.1.dist-info/RECORD,,
@@ -1,29 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You
4
- # may not use this file except in compliance with the License. A copy of
5
- # the License is located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is
10
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- # ANY KIND, either express or implied. See the License for the specific
12
- # language governing permissions and limitations under the License.
13
- """HuggingFace framework support for SageMaker."""
14
- from __future__ import absolute_import
15
-
16
- from sagemaker.core.huggingface.estimator import HuggingFace # noqa: F401
17
- from sagemaker.core.huggingface.llm_utils import get_huggingface_llm_image_uri # noqa: F401
18
- from sagemaker.core.huggingface.model import HuggingFaceModel, HuggingFacePredictor # noqa: F401
19
- from sagemaker.core.huggingface.processing import HuggingFaceProcessor # noqa: F401
20
- from sagemaker.core.huggingface.training_compiler.config import TrainingCompilerConfig # noqa: F401
21
-
22
- __all__ = [
23
- "HuggingFace",
24
- "HuggingFaceModel",
25
- "HuggingFacePredictor",
26
- "HuggingFaceProcessor",
27
- "TrainingCompilerConfig",
28
- "get_huggingface_llm_image_uri",
29
- ]
@@ -1,150 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You
4
- # may not use this file except in compliance with the License. A copy of
5
- # the License is located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is
10
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- # ANY KIND, either express or implied. See the License for the specific
12
- # language governing permissions and limitations under the License.
13
- """Functions for generating ECR image URIs for pre-built SageMaker Docker images."""
14
- from __future__ import absolute_import
15
-
16
- import os
17
- from typing import Optional
18
- import importlib.util
19
-
20
- import urllib.request
21
- from urllib.error import HTTPError, URLError
22
- import json
23
- from json import JSONDecodeError
24
- import logging
25
- from sagemaker.core import image_uris
26
- from sagemaker.core.helper.session_helper import Session
27
-
28
- logger = logging.getLogger(__name__)
29
-
30
-
31
- def get_huggingface_llm_image_uri(
32
- backend: str,
33
- session: Optional[Session] = None,
34
- region: Optional[str] = None,
35
- version: Optional[str] = None,
36
- ) -> str:
37
- """Retrieves the image URI for inference.
38
-
39
- Args:
40
- backend (str): The backend to use. Valid values include "huggingface" and "lmi".
41
- session (Session): The SageMaker Session to use. (Default: None).
42
- region (str): The AWS region to use for image URI. (default: None).
43
- version (str): The framework version for which to retrieve an
44
- image URI. If no version is set, defaults to latest version. (default: None).
45
-
46
- Returns:
47
- str: The image URI string.
48
- """
49
-
50
- if region is None:
51
- if session is None:
52
- region = Session().boto_session.region_name
53
- else:
54
- region = session.boto_session.region_name
55
- if backend == "huggingface":
56
- return image_uris.retrieve(
57
- "huggingface-llm",
58
- region=region,
59
- version=version,
60
- image_scope="inference",
61
- )
62
- if backend == "huggingface-neuronx":
63
- return image_uris.retrieve(
64
- "huggingface-llm-neuronx",
65
- region=region,
66
- version=version,
67
- image_scope="inference",
68
- inference_tool="neuronx",
69
- )
70
- if backend == "huggingface-tei":
71
- return image_uris.retrieve(
72
- "huggingface-tei",
73
- region=region,
74
- version=version,
75
- image_scope="inference",
76
- )
77
- if backend == "huggingface-tei-cpu":
78
- return image_uris.retrieve(
79
- "huggingface-tei-cpu",
80
- region=region,
81
- version=version,
82
- image_scope="inference",
83
- )
84
- if backend == "lmi":
85
- version = version or "0.24.0"
86
- return image_uris.retrieve(framework="djl-deepspeed", region=region, version=version)
87
- raise ValueError("Unsupported backend: %s" % backend)
88
-
89
-
90
- def get_huggingface_model_metadata(model_id: str, hf_hub_token: Optional[str] = None) -> dict:
91
- """Retrieves the json metadata of the HuggingFace Model via HuggingFace API.
92
-
93
- Args:
94
- model_id (str): The HuggingFace Model ID
95
- hf_hub_token (str): The HuggingFace Hub Token needed for Private/Gated HuggingFace Models
96
-
97
- Returns:
98
- dict: The model metadata retrieved with the HuggingFace API
99
- """
100
- if not model_id:
101
- raise ValueError("Model ID is empty. Please provide a valid Model ID.")
102
- hf_model_metadata_url = f"https://huggingface.co/api/models/{model_id}"
103
- hf_model_metadata_json = None
104
- try:
105
- if hf_hub_token:
106
- hf_model_metadata_url = urllib.request.Request(
107
- hf_model_metadata_url, None, {"Authorization": "Bearer " + hf_hub_token}
108
- )
109
- with urllib.request.urlopen(hf_model_metadata_url) as response:
110
- hf_model_metadata_json = json.load(response)
111
- except (HTTPError, URLError, TimeoutError, JSONDecodeError) as e:
112
- if "HTTP Error 401: Unauthorized" in str(e):
113
- raise ValueError(
114
- "Trying to access a gated/private HuggingFace model without valid credentials. "
115
- "Please provide a HUGGING_FACE_HUB_TOKEN in env_vars"
116
- )
117
- logger.warning(
118
- "Exception encountered while trying to retrieve HuggingFace model metadata %s. "
119
- "Details: %s",
120
- hf_model_metadata_url,
121
- e,
122
- )
123
- if not hf_model_metadata_json:
124
- raise ValueError(
125
- "Did not find model metadata for the following HuggingFace Model ID %s" % model_id
126
- )
127
- return hf_model_metadata_json
128
-
129
-
130
- def download_huggingface_model_metadata(
131
- model_id: str, model_local_path: str, hf_hub_token: Optional[str] = None
132
- ) -> None:
133
- """Downloads the HuggingFace Model snapshot via HuggingFace API.
134
-
135
- Args:
136
- model_id (str): The HuggingFace Model ID
137
- model_local_path (str): The local path to save the HuggingFace Model snapshot.
138
- hf_hub_token (str): The HuggingFace Hub Token
139
-
140
- Raises:
141
- ImportError: If huggingface_hub is not installed.
142
- """
143
- if not importlib.util.find_spec("huggingface_hub"):
144
- raise ImportError("Unable to import huggingface_hub, check if huggingface_hub is installed")
145
-
146
- from huggingface_hub import snapshot_download
147
-
148
- os.makedirs(model_local_path, exist_ok=True)
149
- logger.info("Downloading model %s from Hugging Face Hub to %s", model_id, model_local_path)
150
- snapshot_download(repo_id=model_id, local_dir=model_local_path, token=hf_hub_token)
@@ -1,139 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You
4
- # may not use this file except in compliance with the License. A copy of
5
- # the License is located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is
10
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- # ANY KIND, either express or implied. See the License for the specific
12
- # language governing permissions and limitations under the License.
13
- """This module contains code related to HuggingFace Processors which are used for Processing jobs.
14
-
15
- These jobs let customers perform data pre-processing, post-processing, feature engineering,
16
- data validation, and model evaluation and interpretation on SageMaker.
17
- """
18
- from __future__ import absolute_import
19
-
20
- from typing import Union, Optional, List, Dict
21
-
22
- from sagemaker.core.helper.session_helper import Session
23
- from sagemaker.core.network import NetworkConfig
24
- from sagemaker.core.processing import FrameworkProcessor
25
- from sagemaker.core.huggingface.estimator import HuggingFace
26
-
27
- from sagemaker.core.helper.pipeline_variable import PipelineVariable
28
- from sagemaker.core.common_utils import format_tags, Tags
29
-
30
-
31
- class HuggingFaceProcessor(FrameworkProcessor):
32
- """Handles Amazon SageMaker processing tasks for jobs using HuggingFace containers."""
33
-
34
- estimator_cls = HuggingFace
35
-
36
- def __init__(
37
- self,
38
- role: Optional[Union[str, PipelineVariable]] = None,
39
- instance_count: Union[int, PipelineVariable] = None,
40
- instance_type: Union[str, PipelineVariable] = None,
41
- transformers_version: Optional[str] = None,
42
- tensorflow_version: Optional[str] = None,
43
- pytorch_version: Optional[str] = None,
44
- py_version: str = "py36",
45
- image_uri: Optional[Union[str, PipelineVariable]] = None,
46
- command: Optional[List[str]] = None,
47
- volume_size_in_gb: Union[int, PipelineVariable] = 30,
48
- volume_kms_key: Optional[Union[str, PipelineVariable]] = None,
49
- output_kms_key: Optional[Union[str, PipelineVariable]] = None,
50
- code_location: Optional[str] = None,
51
- max_runtime_in_seconds: Optional[Union[int, PipelineVariable]] = None,
52
- base_job_name: Optional[str] = None,
53
- sagemaker_session: Optional[Session] = None,
54
- env: Optional[Dict[str, Union[str, PipelineVariable]]] = None,
55
- tags: Optional[Tags] = None,
56
- network_config: Optional[NetworkConfig] = None,
57
- ):
58
- """This processor executes a Python script in a HuggingFace execution environment.
59
-
60
- Unless ``image_uri`` is specified, the environment is an Amazon-built Docker container
61
- that executes functions defined in the supplied ``code`` Python script.
62
-
63
- The arguments have the same meaning as in ``FrameworkProcessor``, with the following
64
- exceptions.
65
-
66
- Args:
67
- transformers_version (str): Transformers version you want to use for
68
- executing your model training code. Defaults to ``None``. Required unless
69
- ``image_uri`` is provided. The current supported version is ``4.4.2``.
70
- tensorflow_version (str): TensorFlow version you want to use for
71
- executing your model training code. Defaults to ``None``. Required unless
72
- ``pytorch_version`` is provided. The current supported version is ``2.4.1``.
73
- pytorch_version (str): PyTorch version you want to use for
74
- executing your model training code. Defaults to ``None``. Required unless
75
- ``tensorflow_version`` is provided. The current supported version is ``1.6.0``.
76
- py_version (str): Python version you want to use for executing your model training
77
- code. Defaults to ``None``. Required unless ``image_uri`` is provided. If
78
- using PyTorch, the current supported version is ``py36``. If using TensorFlow,
79
- the current supported version is ``py37``.
80
-
81
- .. tip::
82
-
83
- You can find additional parameters for initializing this class at
84
- :class:`~sagemaker.processing.FrameworkProcessor`.
85
- """
86
- self.pytorch_version = pytorch_version
87
- self.tensorflow_version = tensorflow_version
88
- super().__init__(
89
- self.estimator_cls,
90
- transformers_version,
91
- role,
92
- instance_count,
93
- instance_type,
94
- py_version,
95
- image_uri,
96
- command,
97
- volume_size_in_gb,
98
- volume_kms_key,
99
- output_kms_key,
100
- code_location,
101
- max_runtime_in_seconds,
102
- base_job_name,
103
- sagemaker_session,
104
- env,
105
- format_tags(tags),
106
- network_config,
107
- )
108
-
109
- def _create_estimator(
110
- self,
111
- entry_point="",
112
- source_dir=None,
113
- dependencies=None,
114
- git_config=None,
115
- ):
116
- """Override default estimator factory function for HuggingFace's different parameters
117
-
118
- HuggingFace estimators have 3 framework version parameters instead of one: The version for
119
- Transformers, PyTorch, and TensorFlow.
120
- """
121
- return self.estimator_cls(
122
- transformers_version=self.framework_version,
123
- tensorflow_version=self.tensorflow_version,
124
- pytorch_version=self.pytorch_version,
125
- py_version=self.py_version,
126
- entry_point=entry_point,
127
- source_dir=source_dir,
128
- dependencies=dependencies,
129
- git_config=git_config,
130
- code_location=self.code_location,
131
- enable_network_isolation=False,
132
- image_uri=self.image_uri,
133
- role=self.role,
134
- instance_count=self.instance_count,
135
- instance_type=self.instance_type,
136
- sagemaker_session=self.sagemaker_session,
137
- debugger_hook_config=False,
138
- disable_profiler=True,
139
- )
File without changes