You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Botocore ParamValidationError when Calling fit on SageMaker Estimator Object #2068
I'm a developer working on AWS SageMaker Studio. We have two environments that have botocore==1.19.48 and sagemaker==2.23.1 installed, and one system is able to call the SageMaker function fit on an estimator object, while the other system produces the following botocore error:
botocore.exceptions.ParamValidationError: Parameter validation failed:\nUnknown parameter in input: 'ProfilerRuleConfigurations', must be one of: TrainingJobName, HyperParameters, AlgorithmSpecification, RoleArn, InputDataConfig, OutputDataConfig, ResourceConfig, VpcConfig, StoppingCondition, Tags, EnableNetworkIsolation, EnableInterContainerTrafficEncryption, EnableManagedSpotTraining, CheckpointConfig, DebugHookConfig, DebugRuleConfigurations, TensorBoardOutputConfig, ExperimentConfig\nUnknown parameter in input: 'ProfilerConfig', must be one of: TrainingJobName, HyperParameters, AlgorithmSpecification, RoleArn, InputDataConfig, OutputDataConfig, ResourceConfig, VpcConfig, StoppingCondition, Tags, EnableNetworkIsolation, EnableInterContainerTrafficEncryption, EnableManagedSpotTraining, CheckpointConfig, DebugHookConfig, DebugRuleConfigurations, TensorBoardOutputConfig, ExperimentConfig
To solve this issue, we have tried re-installing the libraries and confirming that the versions are up-to-date, but the problem persists. Are there other dependencies that must be checked, or is there any way to identify why this problem occurs on just 1 system? We do not know how to reproduce this problem on another system.
I am seeing same error on a SMStudio environment I just restarted today (Data Science kernel), using the XGBoost algorithm and not manually configuring anything to do with ProfilerRuleConfigurations:
# Instantiate an XGBoost estimator objectestimator=sagemaker.estimator.Estimator(
image_uri=training_image, # XGBoost algorithm containerinstance_type="ml.m5.xlarge", # type of training instanceinstance_count=1, # number of instances to be usedrole=sgmk_role, # IAM role to be usedmax_run=20*60, # Maximum allowed active runtimeuse_spot_instances=True, # Use spot instances to reduce costmax_wait=30*60, # Maximum clock time (including spot delays)
)
# define its hyperparametersestimator.set_hyperparameters(
num_round=150,
max_depth=5,
alpha=2.5,
eta=0.5,
objective="binary:logistic",
)
# start a training (fitting) jobestimator.fit({ "train": s3_input_train, "validation": s3_input_validation })
Throws:
ParamValidationError: Parameter validation failed:
Unknown parameter in input: "ProfilerRuleConfigurations", must be one of: TrainingJobName, HyperParameters, AlgorithmSpecification, RoleArn, InputDataConfig, OutputDataConfig, ResourceConfig, VpcConfig, StoppingCondition, Tags, EnableNetworkIsolation, EnableInterContainerTrafficEncryption, EnableManagedSpotTraining, CheckpointConfig, DebugHookConfig, DebugRuleConfigurations, TensorBoardOutputConfig, ExperimentConfig, ProfilerConfig
I tried running a !pip install --upgrade awscli boto3 but no luck. Current versions are:
awscli @ 1.19.3
boto3 @ 1.17.3
botocore @ 1.20.3
sagemaker @ 2.23.5
Upgrading to sagemaker @ 2.24.3 does not help either. Please re-open this issue - any help appreciated!
PS: @evakravi I guess you're probably observing this on just one system because the container images of SageMaker "apps" (kernel images) pull the latest image only when they're re-started (e.g. "deleted" through the SMStudio AWS console or the stop button tab in Studio? So maybe other environments are still running on an older image where the installed libs didn't have an issue. If it does turn out to be a bug and updating libs to latest-as-possible doesn't work, there might be a solution by downgrading instead...
botocore incorrectly loads the shape of SageMaker.CreateTrainingJob, even though the parameter is present in the service JSON at 1.20.3, because it loads from /root/.aws/models/sagemaker/2017-07-24/service-2.json in Studio which I see on my user profile is stale (does not include the ProfilerRuleConfigurations key).
/root in this case is the SageMaker Studio base user directory (i.e. the top level one we see in JupyterLab).
I was able to fix this issue by:
Running !rm -rf /root/.aws/models/sagemaker from my notebook to clear this cache (check the folder gets deleted)
Restarting my notebook kernel so the botocore would get re-initialized and fetch the new models.
Reacted by Rahul Huilgol, Shelbee Eigenbrode and Sambhu Sai
Activity
icywang86rui commentedon Jan 6, 2021
This seems like a custom model override issue instead of a python sdk issue. Resolving.
athewsey commentedon Feb 8, 2021
I am seeing same error on a SMStudio environment I just restarted today (Data Science kernel), using the XGBoost algorithm and not manually configuring anything to do with
ProfilerRuleConfigurations:Throws:
I tried running a
!pip install --upgrade awscli boto3but no luck. Current versions are:Upgrading to sagemaker @ 2.24.3 does not help either. Please re-open this issue - any help appreciated!
PS: @evakravi I guess you're probably observing this on just one system because the container images of SageMaker "apps" (kernel images) pull the latest image only when they're re-started (e.g. "deleted" through the SMStudio AWS console or the stop button tab in Studio? So maybe other environments are still running on an older image where the installed libs didn't have an issue. If it does turn out to be a bug and updating libs to latest-as-possible doesn't work, there might be a solution by downgrading instead...
athewsey commentedon Feb 8, 2021
An update, since I came across and investigated boto/botocore#2260:
botocore incorrectly loads the shape of
SageMaker.CreateTrainingJob, even though the parameter is present in the service JSON at 1.20.3, because it loads from/root/.aws/models/sagemaker/2017-07-24/service-2.jsonin Studio which I see on my user profile is stale (does not include theProfilerRuleConfigurationskey)./rootin this case is the SageMaker Studio base user directory (i.e. the top level one we see in JupyterLab).I was able to fix this issue by:
!rm -rf /root/.aws/models/sagemakerfrom my notebook to clear this cache (check the folder gets deleted)fix: skip model_package_group validation when HyperPod compute is pro…
Nova release (#5969)