i'm getting a weird error when trying to migrate a...
# ask-for-help
м
i'm getting a weird error when trying to migrate an old service i wrote to the modern APIs:
Copy code
import bentoml
resnet_runner = bentoml.onnx.get('resnet:latest').to_runner()
resnet_svc = bentoml.runner_service(runner=resnet_runner)
Fails with
Copy code
/home/user/dev/sig_deploy/infer_svc/t.py:2: BentoMLDeprecationWarning: `bentoml.onnx` is deprecated since v1.4 and will be removed in a future version.
  resnet_runner = bentoml.onnx.get('resnet:latest').to_runner()
/home/user/.local/lib/python3.11/site-packages/bentoml/_internal/models/model.py:354: BentoMLDeprecationWarning: `Runner` is deprecated since BentoML v1.4 and will be removed in a future version. Please upgrade to new style services.
  return Runner(
/home/user/dev/sig_deploy/infer_svc/t.py:3: BentoMLDeprecationWarning: `runner_service` is deprecated since BentoML v1.4 and will be removed in a future version.
  resnet_svc = bentoml.runner_service(runner=resnet_runner)
Traceback (most recent call last):
  File "/home/user/dev/sig_deploy/infer_svc/t.py", line 3, in <module>
    resnet_svc = bentoml.runner_service(runner=resnet_runner)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/bentoml/_internal/utils/__init__.py", line 578, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/_bentoml_sdk/service/factory.py", line 473, in runner_service
    api = APIMethod(  # type: ignore
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: APIMethod.__init__() got an unexpected keyword argument 'name'