TorchServe:latest shows Pydantic Error files on startup, runs fine locally

102 Views Asked by At

I am seeing the following error, when my TorchServe container is starting up.

I was able to spin up the TorchServer locally and submit requests successfully.

However - i see the error below when trying to do it through docker.

Any ideas?

-----Starting handler -----

Backend worker process died.
Traceback (most recent call last):
  File "/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py", line 253, in <module>
    worker.run_server()
  File "/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py", line 221, in run_server
    self.handle_connection(cl_socket)
  File "/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py", line 184, in handle_connection
    service, result, code = self.load_model(msg)
  File "/home/venv/lib/python3.9/site-packages/ts/model_service_worker.py", line 131, in load_model
    service = model_loader.load(
  File "/home/venv/lib/python3.9/site-packages/ts/model_loader.py", line 135, in load
    initialize_fn(service.context)
  File "/home/model-server/tmp/models/72c9eb6e81f24828911500b7883601b0/custom_handler.py", line 55, in initialize
    self.ckpt_cfg = toMyConfig(self.ckpt_cfg)
  File "/home/model-server/tmp/models/72c9eb6e81f24828911500b7883601b0/custom_handler.py", line 30, in toMyConfig
    cfg = MyConfig.parse_obj(cfg)  # to MyConfig
  File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for MyConfig
exp_manager
  field required (type=value_error.missing)

I am not sure how to avoid this step, or if I need to reinstall Pydantic to some specific version so that I do not run into this. But I am suspecting that is is some set up issue.

0

There are 0 best solutions below