|
100 | 100 | INFERENCE_SPECIFICATION = "InferenceSpecification" |
101 | 101 | PROFILER_CONFIG = "ProfilerConfig" |
102 | 102 | DISABLE_PROFILER = "DisableProfiler" |
| 103 | +ESTIMATOR = "Estimator" |
| 104 | +DEBUG_HOOK_CONFIG = "DebugHookConfig" |
103 | 105 |
|
104 | 106 |
|
105 | 107 | def _simple_path(*args: str): |
@@ -338,6 +340,9 @@ def _simple_path(*args: str): |
338 | 340 | SESSION_DEFAULT_S3_OBJECT_KEY_PREFIX_PATH = _simple_path( |
339 | 341 | SAGEMAKER, PYTHON_SDK, MODULES, SESSION, DEFAULT_S3_OBJECT_KEY_PREFIX |
340 | 342 | ) |
| 343 | +ESTIMATOR_DEBUG_HOOK_CONFIG_PATH = _simple_path( |
| 344 | + SAGEMAKER, PYTHON_SDK, MODULES, ESTIMATOR, DEBUG_HOOK_CONFIG |
| 345 | +) |
341 | 346 |
|
342 | 347 |
|
343 | 348 | SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA = { |
@@ -645,6 +650,27 @@ def _simple_path(*args: str): |
645 | 650 | }, |
646 | 651 | }, |
647 | 652 | }, |
| 653 | + ESTIMATOR: { |
| 654 | + TYPE: OBJECT, |
| 655 | + ADDITIONAL_PROPERTIES: False, |
| 656 | + PROPERTIES: { |
| 657 | + DEBUG_HOOK_CONFIG: { |
| 658 | + TYPE: "boolean", |
| 659 | + "description": ( |
| 660 | + "Sets a boolean for `debugger_hook_config` of" |
| 661 | + "Estimator which will be then used for training job" |
| 662 | + "API call. Today, the config_schema doesn't support" |
| 663 | + "a dictionary as a valid value to be provided." |
| 664 | + "In the future to add support for DebugHookConfig" |
| 665 | + "as a dictionary, schema should be added under" |
| 666 | + "the config path `SageMaker.TrainingJob` instead of" |
| 667 | + "here, since the TrainingJob API supports" |
| 668 | + "DebugHookConfig as a dictionary, we can add" |
| 669 | + "a schema for it at API level." |
| 670 | + ), |
| 671 | + }, |
| 672 | + }, |
| 673 | + }, |
648 | 674 | REMOTE_FUNCTION: { |
649 | 675 | TYPE: OBJECT, |
650 | 676 | ADDITIONAL_PROPERTIES: False, |
@@ -990,6 +1016,11 @@ def _simple_path(*args: str): |
990 | 1016 | }, |
991 | 1017 | # Training Job |
992 | 1018 | # https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html |
| 1019 | + # Please note that we currently support 'DebugHookConfig' as a boolean value |
| 1020 | + # which can be provided under [SageMaker.PythonSDK.Modules.Estimator] config path. |
| 1021 | + # As of today, config_schema does not support the dict as a valid value to be |
| 1022 | + # provided. In case, we decide to support it in the future, we can add a new schema |
| 1023 | + # for it under [SageMaker.TrainingJob] config path. |
993 | 1024 | TRAINING_JOB: { |
994 | 1025 | TYPE: OBJECT, |
995 | 1026 | ADDITIONAL_PROPERTIES: False, |
|
0 commit comments