This message was deleted.
# ask-for-help
s
This message was deleted.
k
Full error:
Copy code
+ Exception Group Traceback (most recent call last):
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/bin/bentoml", line 8, in <module>
  |     sys.exit(cli())
  |              ^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
  |     return self.main(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/click/core.py", line 1078, in main
  |     rv = self.invoke(ctx)
  |          ^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
  |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
  |     return ctx.invoke(self.callback, **ctx.params)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
  |     return __callback(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/bentoml_cli/utils.py", line 334, in wrapper
  |     return func(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/bentoml_cli/utils.py", line 305, in wrapper
  |     return_value = func(*args, **kwargs)
  |                    ^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/bentoml_cli/utils.py", line 262, in wrapper
  |     return func(*args, **kwargs)
  |            ^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
  |     return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/bentoml_cli/bentos.py", line 335, in build
  |     build_config = BentoBuildConfig.from_yaml(f)
  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/bentoml/_internal/bento/build_config.py", line 827, in from_yaml
  |     return bentoml_cattr.structure(yaml_content, cls)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Users/khuyentran/Library/Caches/pypoetry/virtualenvs/ml-deployment-tools-T_Sz6NEy-py3.11/lib/python3.11/site-packages/cattrs/converters.py", line 334, in structure
  |     return self._structure_func.dispatch(cl)(obj, cl)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "<cattrs generated structure bentoml._internal.bento.build_config.BentoBuildConfig>", line 60, in structure_BentoBuildConfig
  | cattrs.errors.ClassValidationError: While structuring BentoBuildConfig (1 sub-exception)
  +-+---------------- 1 ----------------
    | cattrs.errors.ForbiddenExtraKeysError: Extra fields in constructor for BentoBuildConfig: models
a
@Frost Ming when did we introduce the recent model optimisation?
t
I am getting the same error as @Khuyen Tran. It also gets resolved when I remove model from the yaml file. For context, I am simply using the tutorial on BentoML's documentation without any changes
c
Looks like it’s a new feature that’s not been released yet but showed up in docs? @Sean @Frost Ming
a
Yes, we have a doc for the main release. Maybe @Chaoyu it is good to have the docs to also show for the latest stable version, instead of setting the main docs as default?
f
yes, there is a mismatch between the docs and code
s
We will release a version soon. Meanwhile, you can workaround this by removing the
models
part in the bentofile.yaml.
Copy code
models: # The model to be used for building the bento.
   - svm:latest
👍 1
t
That's brilliant! Thanks And is it then inferring the model from the service.py script?
c
Yes that’s correct👍 even with the new version, it will do that if the models field is missing and use local model store to infer the models to be packaged