pytorch/serve

curl 404 ResourceNotFoundException

Open

#1,701 创建于 2022年6月21日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)Java (3,844 star) (790 fork)batch import
help wantedquestion

描述

Hello, I am stuck with an error that I am not sure what does it mean. when I do curl "http://localhost:8080/models" I get : { "code": 404, "type": "ResourceNotFoundException", "message": "Requested resource is not found, please refer to API document." }

I make an .mar file for my model with torch-model-archiver -f \ --model-name=classifier \ --version=1.0 \ --serialized-file=pytorch_model.bin \ --handler=custom_handler.py \ --extra-files "config.json,index_to_name.json,special_tokens_map.json,tokenizer_config.json,tokenizer.json,training_args.bin,vocab.txt" \ --export-path=model_store All of those files are stored in the same directory.

When i run the serve torchserve --start --model-store model_store --models classifier=classifier.mar I dont get any error. normally when I do curl "http://localhost:8080/models" I will get my classifier but I instead I get that message.

is there anything that I am missing here? or should I add something? I want to mention that I am using a handler (custom_handler.py) from GoogleCloudPlatform. also, curl localhost:8080/ping give me Healthy Thanks!

贡献者指南

curl 404 ResourceNotFoundException · pytorch/serve#1701 | Good First Issue