-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
component: pipelinesRelates to the SageMaker Pipeline PlatformRelates to the SageMaker Pipeline Platform
Description
| ParameterBoolean = partial(Parameter, parameter_type=ParameterTypeEnum.BOOLEAN) |
When using sagemaker.worflow.parameters.ParameterBoolean as an estimator hyperparameter the pipeline fails since it is not serializable.
train_data = ParameterString(name="TrainData",
default_value="s3://...")
use_fast_tokenizer = ParameterBoolean(name="UseFastTokenzier", default_value=True)
hyperparameters = {
# ...
"use_fast_tokenizer": use_fast_tokenizer,
}
hf_estimator = HuggingFace(
entry_point='train.py',
source_dir='src',
instance_type="...",
instance_count=1,
role="...",
transformers_version='4.4',
pytorch_version='1.6',
py_version='py36',
hyperparameters=hyperparameters
)
training_step = TrainingStep(name="Train",
estimator=hf_estimator,
inputs={"train": TrainingInput(s3_data=train_data)})
pipeline = Pipeline(
name="name",
parameters=[
train_data,
use_fast_tokenizer,
],
steps=[training_step],
)
pipeline.upsert(role_arn=role)The error:
TypeError: Object of type 'Parameter' is not JSON serializable
houman-moallemi
Metadata
Metadata
Assignees
Labels
component: pipelinesRelates to the SageMaker Pipeline PlatformRelates to the SageMaker Pipeline Platform