From f84b975a550fa612bb6360fed2411972ab06c107 Mon Sep 17 00:00:00 2001 From: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com> Date: Thu, 8 Jun 2023 19:19:50 +0000 Subject: [PATCH] fix(llm): build to include openllm_client Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com> --- pyproject.toml | 3 +++ src/openllm/_llm.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c13d993d..12bae406 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,9 @@ path = "src/openllm/__about__.py" [tool.hatch.metadata] allow-direct-references = true +[tool.hatch.build.targets.wheel] +packages = ["src/openllm", "src/openllm_client"] + [tool.hatch.envs.default] dependencies = [ "coverage[toml]>=6.5", diff --git a/src/openllm/_llm.py b/src/openllm/_llm.py index f8367240..921293a4 100644 --- a/src/openllm/_llm.py +++ b/src/openllm/_llm.py @@ -26,6 +26,7 @@ from abc import ABC, ABCMeta, abstractmethod import bentoml import inflection +import orjson from bentoml.types import ModelSignature, ModelSignatureDict import openllm @@ -486,7 +487,7 @@ class LLM(LLMInterface, metaclass=LLMMetaclass): @property def identifying_params(self) -> dict[str, t.Any]: - return {"configuration": self.config.model_dump(), "pretrained": self.pretrained} + return {"configuration": self.config.model_dump_json(), "pretrained": orjson.dumps(self.pretrained).decode()} @t.overload def make_tag(