-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Please fill out the form below.
System Information
Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans):
I'm using from sklearn with IsolationForest
Framework Version:
Python Version: Python 3.8
CPU or GPU: CPU
Python SDK Version:
Are you using a custom image: Yes. I started from your example scikit_bring_your_own and modified it from there.
Describe the problem
I want to update an endpoint that already exists. According to your docs, this should be easy. https://sagemaker.readthedocs.io/en/stable/overview.html
Where the example given is
Deploys the model that was generated by fit() to an existing SageMaker endpoint
mxnet_predictor = mxnet_estimator.deploy(initial_instance_count=1,
instance_type='ml.p2.xlarge',
update_endpoint=True,
endpoint_name='existing-endpoint')
However, I when I try the deploy method it does not recognize update_endpoint (where sklearn_estimator is create with from sagemaker.sklearn.estimator import SKLearn ):
predictor = sklearn_estimator.deploy(instance_type="ml.t2.medium", initial_instance_count=1,endpoint_name=endpoint_name,update_endpoint=True)
Minimal repro / logs
TypeError Traceback (most recent call last)
in ()
----> 3 predictor = sklearn_estimator.deploy(instance_type="ml.t2.medium", initial_instance_count=1,endpoint_name=endpoint_name,update_endpoint=True)
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in deploy(self, initial_instance_count, instance_type, accelerator_type, endpoint_name, use_compiled_model, **kwargs)
362 model = self._compiled_models[family]
363 else:
--> 364 model = self.create_model(**kwargs)
365 return model.deploy(
366 instance_type=instance_type,
~/anaconda3/envs/python3/lib/python3.6/site-packages/sagemaker/estimator.py in create_model(self, role, image, predictor_cls, serializer, deserializer, content_type, accept, vpc_config_override, **kwargs)
706 return Model(self.model_data, image or self.train_image(), role,
707 vpc_config=self.get_vpc_config(vpc_config_override),
--> 708 sagemaker_session=self.sagemaker_session, predictor_cls=predictor_cls, **kwargs)
709
710 @classmethod
TypeError: init() got an unexpected keyword argument 'update_endpoint'
Exact command to reproduce:
----> 3 sklearn_estimator.deploy(instance_type="ml.t2.medium", initial_instance_count=1,endpoint_name=endpoint_name,update_endpoint=True)