From f0ab6d44fa751a96ecc2c8d8a1c33f8aa8f5e2fd Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:11:53 +0000 Subject: [PATCH] fix: make sure to include new implementation in bundle build Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> --- openllm-python/pyproject.toml | 4 ++-- openllm-python/src/_openllm_tiny/_entrypoint.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openllm-python/pyproject.toml b/openllm-python/pyproject.toml index cdb24897..f4d920d1 100644 --- a/openllm-python/pyproject.toml +++ b/openllm-python/pyproject.toml @@ -144,7 +144,7 @@ root = ".." [tool.hatch.metadata] allow-direct-references = true [tool.hatch.build.targets.wheel] -only-include = ["src/openllm", "src/openllm_cli"] +only-include = ["src/openllm", "src/openllm_cli", "src/_openllm_tiny"] sources = ["src"] [tool.hatch.build.targets.sdist] exclude = ["/.git_archival.txt", "tests", "/.python-version-default"] @@ -163,7 +163,7 @@ dependencies = [ "types-protobuf", ] enable-by-default = false -exclude = ["src/openllm/_service.py", "src/openllm/utils/__init__.py"] +exclude = ["src/_openllm_tiny/_service.py", "src/openllm/utils/__init__.py"] include = [ "src/openllm/__init__.py", "src/openllm/_quantisation.py", diff --git a/openllm-python/src/_openllm_tiny/_entrypoint.py b/openllm-python/src/_openllm_tiny/_entrypoint.py index f5aaeaa6..51b7748d 100644 --- a/openllm-python/src/_openllm_tiny/_entrypoint.py +++ b/openllm-python/src/_openllm_tiny/_entrypoint.py @@ -291,7 +291,9 @@ def construct_python_options(llm_config, llm_fs): from bentoml._internal.bento.build_config import PythonOptions from openllm.bundle._package import build_editable - packages = ['scipy', 'bentoml[tracing]==1.2.8', 'openllm[vllm]>0.5', 'vllm==0.3.0'] + # TODO: Add this line back once 0.5 is out, for now depends on OPENLLM_DEV_BUILD + # packages = ['scipy', 'bentoml[tracing]>=1.2.8', 'openllm[vllm]>0.4', 'vllm>=0.3'] + packages = ['scipy', 'bentoml[tracing]>=1.2.8', 'vllm>=0.3'] if llm_config['requirements'] is not None: packages.extend(llm_config['requirements']) built_wheels = [build_editable(llm_fs.getsyspath('/'), p) for p in ('openllm_core', 'openllm_client', 'openllm')] @@ -299,7 +301,6 @@ def construct_python_options(llm_config, llm_fs): packages=packages, wheels=[llm_fs.getsyspath(f"/{i.split('/')[-1]}") for i in built_wheels] if all(i for i in built_wheels) else None, lock_packages=False, - pip_args='--pre', )