pytorch/serve

curl 404 ResourceNotFoundException

Open

#1,701 opened on Jun 21, 2022

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Java (790 forks)batch import
help wantedquestion

Repository metrics

Stars
 (3,844 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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!

Contributor guide