fix: custom release strategy for correct naming

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-08-02 03:03:21 -04:00
parent acb81a6e1a
commit d4fbfa5e5c
2 changed files with 2 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ def construct_docker_options(
env_dict = {
env.framework: env.framework_value, env.config: f"'{llm.config.model_dump_json().decode()}'", "OPENLLM_MODEL": llm.config["model_name"], "OPENLLM_SERIALIZATION": serialisation_format,
"OPENLLM_ADAPTER_MAP": f"'{orjson.dumps(adapter_map).decode()}'", "BENTOML_DEBUG": str(True), "BENTOML_QUIET": str(False), "BENTOML_CONFIG_OPTIONS": f"'{_bentoml_config_options}'",
"OPENLLM_USE_LOCAL_LATEST": str(True), env.model_id: f"/home/bentoml/bento/models/{llm.tag.path()}"}
env.model_id: f"/home/bentoml/bento/models/{llm.tag.path()}"}
if adapter_map: env_dict["BITSANDBYTES_NOWELCOME"] = os.environ.get("BITSANDBYTES_NOWELCOME", "1")
# We need to handle None separately here, as env from subprocess doesn't accept None value.

View File

@@ -99,7 +99,7 @@ class Ref:
version = ("", version_str)
if t.TYPE_CHECKING: assert version_str # NOTE: Mypy cannot infer the correct type here. We have handle the cases where version_str is None in L86
if VersionInfo.from_version_string(version_str) < (0, 2, 12): raise VersionNotSupported(f"Version {version_str} doesn't support OpenLLM base container. Consider using 'nightly' or upgrade 'openllm>=0.2.12'")
return _RefTuple((*version, "release" if not _use_base_strategy else "custom"))
return _RefTuple((*version, "release" if _use_base_strategy else "custom"))
@classmethod
def from_strategy(cls, strategy_or_version: t.Literal["release", "nightly"] | str | None = None) -> Ref:
if strategy_or_version is None or strategy_or_version == "release":