![](/img/trans.png)
[英]How do I deploy a pre trained sklearn model on AWS sagemaker? (Endpoint stuck on creating)
[英]Unable to deploy locally trained Logistic Regression model on AWS Sagemaker
我在我的本地機器上訓練了邏輯回歸 model。 使用 Joblib 保存 model 並嘗試使用“線性學習器”圖像將其部署在 Aws Sagemaker 上。
由於部署過程繼續進行並且狀態始終為“正在創建”並且不會變為“服務中”,因此在部署時面臨問題。
endpoint_name = "DEMO-LogisticEndpoint" + strftime("%Y-%m-%d-%H-%M-%S", gmtime())
print(endpoint_name)
create_endpoint_response = sm_client.create_endpoint(
EndpointName=endpoint_name, EndpointConfigName=endpoint_config_name
)
print(create_endpoint_response["EndpointArn"])
resp = sm_client.describe_endpoint(EndpointName=endpoint_name)
status = resp["EndpointStatus"]
print("Status: " + status)
while status == "Creating":
time.sleep(60)
resp = sm_client.describe_endpoint(EndpointName=endpoint_name)
status = resp["EndpointStatus"]
print("Status: " + status)
while 循環一直執行,狀態永遠不會改變。
背景:重要的是要了解端點運行一個包含服務軟件的容器。 每個容器都需要某種類型的 model。您需要確保您是 model 以及您的 package 如何與容器的預期相匹配。
兩條簡單的前進道路:
否則,您始終可以 go 更高級,並通過使用自己的容器來使用自己的自定義算法/框架來使用任何自定義算法。 谷歌現有的實現(例如, CatBoost/SageMaker )。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.