在尝试部署和使用AWS SageMaker模型时,我已经证明了量子力学。请注意,错误似乎表明模型/端点既存在又不存在。
m = MXNet("lstm_trainer.py",
role=role,
train_instance_count=10,
train_instance_type="ml.c4.xlarge",
hyperparameters={'batch_size': 100,
'epochs': 400,
'learning_rate': 0.1,
'momentum': 0.9,
'log_interval': 100})
m.fit(inputs)
运行良好。
predictor = m.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')
收到错误,
ClientError: An error occurred (ValidationException) when calling the CreateModel operation: Cannot create already existing model "arn:aws:sagemaker:us-west-2:01234567890:model/sagemaker-mxnet-py2-cpu-2018-02-13-17-18-59-047".
predictor.predict(np.arange(100))
给出,
ValidationError: An error occurred (ValidationError) when calling the InvokeEndpoint operation: Endpoint sagemaker-mxnet-py2-cpu-2018-02-13-17-18-59-047 of account 01234567890 not found.
sagemaker.Session().delete_endpoint(predictor.endpoint)
给出,
ClientError: An error occurred (ValidationException) when calling the DeleteEndpoint operation: Could not find endpoint "arn:aws:sagemaker:us-west-2:01234567890:endpoint/sagemaker-mxnet-py2-cpu-2018-02-13-17-18-59-047".
我该如何解决这个问题?