Error registering pytorch workflow

Hi.
I would like to ask for hint/help with my example for torchserve workflow i try to deploy.
I created, archived(torch-archive) 3 models which run as single models correctly.
I did same for workflow archive to create *.war file to be deployed.

I started torchserve server with:
serve$ torchserve --start --model-store model_store/ --models all --workflow-store workflow_store/ --ncs --ts-config config.properties
Server started succesfully, logs are OK without any errors.

I checked the health status of server, it is running correctly.
Models check is also correct:
$ curl “http://localhost:8081/models
{
“models”: [
{
“modelName”: “RNN_HR_model”,
“modelUrl”: “RNN_HR_model.mar”
},
{
“modelName”: “RNN_SAT_model”,
“modelUrl”: “RNN_SAT_model.mar”
},
{
“modelName”: “RNN_TMP_model”,
“modelUrl”: “RNN_TMP_model.mar”
}
]
}

But when i try to register(deploy) workflow i get following:
$ curl -X POST “http://localhost:8081/workflows?url=vital_signs.war
{
“code”: 500,
“type”: “WorkflowException”,
“message”: “Workflow vital_signs has failed to register. Failures: [Workflow Node vital_signs__vital_sign_hr failed to register. Details: Model not found at: handler_RNN_HR.mar, Failed to start workers for model vital_signs__vital_sign_tmp version: 1.0, Failed to start workers for model vital_signs__vital_sign_sat version: 1.0]”*
}

I checked config and *.yaml workflow file definition, eyrything i did according the documentation and example from pytorch trochserve pages.
Any idea?
I tried it on Pytorch 1.13 + Torchserve 0.6 as well as on Pytorch 2.0 + Torchserve 0.7 and i get same results.
Any idea what am I doing wrong?
Thank you very much

EDIT: This is my workflow *.yaml file definition (i tried different URL local path definition, but same result)

models:
min-workers: 1
max-workers: 4
batch-size: 4
max-batch-delay: 100
retry-attempts: 5
timeout-ms: 300000

vital_sign_hr:
  url: ../model_store/RNN_HR_model.mar

vital_sign_tmp:
  url: ../model_store/RNN_TMP_model.mar

vital_sign_sat:
  url: ../model_store/RNN_SAT_model.mar

dag:
pre_processing: [vital_sign_hr, vital_sign_tmp, vital_sign_sat]
vital_sign_hr: [aggregate_func]
vital_sign_tmp: [aggregate_func]
vital_sign_sat: [aggregate_func]

Hi everybody.

I’we got it. Chat GPT gave me hint, my yaml file should look like this:

models:
min-workers: 1
max-workers: 4
batch-size: 4
max-batch-delay: 100
retry-attempts: 5
timeout-ms: 300000

vital_sign_hr:
url: RNN_HR_model.mar

vital_sign_tmp:
url: RNN_TMP_model.mar

vital_sign_sat:
url: RNN_SAT_model.mar

dag:
pre_processing: [vital_sign_hr, vital_sign_tmp, vital_sign_sat]
vital_sign_hr: [aggregate_func]
vital_sign_tmp: [aggregate_func]
vital_sign_sat: [aggregate_func]

1 Like