AWS SageMaker模型弹出真空

时间:2018-02-13 19:24:34

标签: python amazon-sagemaker

在尝试部署和使用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".

我该如何解决这个问题?

0 个答案:

没有答案