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

bug: Error when calling "bentoml.bentos.build_bentofile()" #4632

Open
holzweber opened this issue Apr 3, 2024 · 0 comments
Open

bug: Error when calling "bentoml.bentos.build_bentofile()" #4632

holzweber opened this issue Apr 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@holzweber
Copy link
Contributor

Describe the bug

When i try to create a bento in python, i get the following error:

bentoml.exceptions.BentoMLException: Failed to build BentoService bundle (Lookup for traceback):
Command '['/opt/conda/bin/python', '-m', 'bentoml', 'build', '/tmp/tmptp9t2mki/src', '--bentofile', '/tmp/tmptp9t2mki/bentofile.yaml', '--output', 'tag']' returned non-zero exit status 1.
  File "/opt/conda/lib/python3.10/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
    yield
  File "/opt/conda/lib/python3.10/site-packages/dagster/_utils/__init__.py", line 467, in iterate_with_context
    next_output = next(iterator)
  File "/opt/conda/lib/python3.10/site-packages/dagster/_core/execution/plan/compute_generator.py", line 131, in _coerce_op_compute_fn_to_iterator
    result = invoke_compute_fn(
  File "/opt/conda/lib/python3.10/site-packages/dagster/_core/execution/plan/compute_generator.py", line 125, in invoke_compute_fn
    return fn(context, **args_to_pass) if context_arg_provided else fn(**args_to_pass)
  File "/eppnext/epp-dagster/epp_dagster/ops/_export_model.py", line 124, in create_bento
    s = bentoml.bentos.build_bentofile(bentofile=str(tmp_dir / "bentofile.yaml"), build_ctx=str(tmp_dir / "src"))
  File "/opt/conda/lib/python3.10/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  File "/opt/conda/lib/python3.10/site-packages/bentoml/bentos.py", line 451, in build_bentofile
    raise BentoMLException(
The above exception was caused by the following exception:
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', '-m', 'bentoml', 'build', '/tmp/tmptp9t2mki/src', '--bentofile', '/tmp/tmptp9t2mki/bentofile.yaml', '--output', 'tag']' returned non-zero exit status 1.
  File "/opt/conda/lib/python3.10/site-packages/bentoml/bentos.py", line 447, in build_bentofile
    _parse_tag_from_outputs(subprocess.check_output(build_args, env=copied)),
  File "/opt/conda/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/conda/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,

To reproduce

import bentoml
tmp_dir = Path("mypath")
s = bentoml.bentos.build_bentofile(bentofile=str(tmp_dir / "bentofile.yaml"), build_ctx=str(tmp_dir / "src"))

Expected behavior

Create a bento

Environment

bentoml version: 1.2.9
Python 3.10.14

@holzweber holzweber added the bug Something isn't working label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant