Skip to content

Commit

Permalink
fix: pin pydantic to < 2.10 and restore cwd when building bento (#5093)
Browse files Browse the repository at this point in the history
* fix: set standalone_build to False to allow build many times

Signed-off-by: Frost Ming <me@frostming.com>

* fix: pin pydantic < 2.10

Signed-off-by: Frost Ming <me@frostming.com>

* fix: deps

Signed-off-by: Frost Ming <me@frostming.com>

---------

Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming authored Nov 21, 2024
1 parent 9cfcf72 commit eb15e32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies = [
"pip-requirements-parser>=31.2.0",
"prometheus-client>=0.10.0",
"psutil",
"pydantic<3",
"pydantic<2.10",
"python-dateutil",
"python-multipart",
"python-json-logger",
Expand Down
7 changes: 1 addition & 6 deletions src/bentoml/_internal/bento/bento.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,7 @@ def create(

BentoMLContainer.model_aliases.set(build_config.model_aliases)
# This also verifies that svc can be imported correctly
svc = import_service(
build_config.service,
working_dir=build_ctx,
reload=reload,
standalone_load=True,
)
svc = import_service(build_config.service, working_dir=build_ctx, reload=reload)
is_legacy = isinstance(svc, Service)
# Apply default build options
image: Image | None = None
Expand Down
1 change: 1 addition & 0 deletions tests/monitoring/task_classification/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies = [
"scikit-learn",
"pandas",
"bentoml[monitor-otlp]>=1.0.19",
"pydantic<2.10",
]

[dependency-groups]
Expand Down

0 comments on commit eb15e32

Please sign in to comment.