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: lazy check for stubs via path when install local wheels #3180

Merged
merged 1 commit into from Nov 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/bentoml/_internal/bento/build_dev_bentoml_whl.py
Expand Up @@ -43,11 +43,7 @@ def build_bentoml_editable_wheel(target_path: str) -> None:
raise BentoMLException("Could not find bentoml module location.")
bentoml_path = Path(module_location)

try:
from importlib import import_module

_ = import_module("bentoml.grpc.v1alpha1.service_pb2")
except ModuleNotFoundError:
if not Path(module_location, "grpc", "v1alpha1", "service_pb2.py").exists():
raise ModuleNotFoundError(
f"Generated stubs are not found. Make sure to run '{bentoml_path.as_posix()}/scripts/generate_grpc_stubs.sh' beforehand to generate gRPC stubs."
) from None
Expand Down