Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: empty doc for bare built bento #5086

Merged
merged 1 commit into from
Nov 14, 2024
Merged

fix: empty doc for bare built bento #5086

merged 1 commit into from
Nov 14, 2024

Conversation

xianml
Copy link
Contributor

@xianml xianml commented Nov 14, 2024

What does this PR address?

Fix exception for build/push bento in codespace

stack trace

Traceback (most recent call last):
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/bin/bentoml", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml_cli/utils.py", line 364, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml_cli/utils.py", line 335, in wrapper
    return_value = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml_cli/deployment.py", line 296, in develop_command
    deployment = create_deployment(
                 ^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml_cli/deployment.py", line 885, in create_deployment
    config_params.verify()
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml/_internal/cloud/deployment.py", line 185, in verify
    bento_info = ensure_bento(
                 ^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml/_internal/cloud/deployment.py", line 350, in ensure_bento
    bento_api.push(bento=bento_obj, bare=bare)
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml/_internal/cloud/bento.py", line 76, in push
    self._do_push_bento(
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml/_internal/cloud/bento.py", line 161, in _do_push_bento
    description=bento.doc,
                ^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/BentoML/src/bentoml/_internal/bento/bento.py", line 552, in doc
    with self._fs.open(BENTO_README_FILENAME, "r") as readme_md:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/fs/osfs.py", line 643, in open
    with convert_os_errors("open", path):
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/fs/error_tools.py", line 89, in __exit__
    reraise(fserror, fserror(self._path, exc=exc_value), traceback)
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/Users/xian/Downloads/workspace/bentoml/src/awesome-ai-apps-internal/.venv/lib/python3.11/site-packages/fs/osfs.py", line 647, in open
    return io.open(
           ^^^^^^^^
fs.errors.ResourceNotFound: resource 'README.md' not found

Fixes #(issue)

Before submitting:

@xianml xianml requested a review from a team as a code owner November 14, 2024 02:02
@xianml xianml requested review from frostming and removed request for a team November 14, 2024 02:02
Copy link

Code Coverage

Package Statements
bentoml 55.40% (9886 / 17843)
Summary 55.40% (9886 / 17843)

@xianml xianml merged commit 99ae64f into main Nov 14, 2024
50 of 51 checks passed
@xianml xianml deleted the fix/bare-doc branch November 14, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants