mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-05-04 13:52:46 -04:00
fix: building mpt dependencies
Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -2056,9 +2056,8 @@ def prune_command(yes: bool, model_store: ModelStore = Provide[BentoMLContainer.
|
||||
"""Remove all saved models locally."""
|
||||
available = [
|
||||
m
|
||||
for t in map(inflection.dasherize, openllm.CONFIG_MAPPING.keys())
|
||||
for m in bentoml.models.list()
|
||||
if t in m.tag.name
|
||||
if 'framework' in m.info.labels and m.info.labels['framework'] == 'openllm'
|
||||
]
|
||||
|
||||
for model in available:
|
||||
|
||||
@@ -230,6 +230,8 @@ def make_attr_tuple_class(cls_name: str, attr_names: t.Sequence[str]):
|
||||
__slots__ = ()
|
||||
x = property(itemgetter(0))
|
||||
"""
|
||||
from . import SHOW_CODEGEN
|
||||
|
||||
attr_class_name = f"{cls_name}Attributes"
|
||||
attr_class_template = [
|
||||
f"class {attr_class_name}(tuple):",
|
||||
@@ -241,7 +243,11 @@ def make_attr_tuple_class(cls_name: str, attr_names: t.Sequence[str]):
|
||||
else:
|
||||
attr_class_template.append(" pass")
|
||||
globs: DictStrAny = {"_attrs_itemgetter": itemgetter, "_attrs_property": property}
|
||||
if SHOW_CODEGEN:
|
||||
logger.info("Generated class for %s:\n\n%s", attr_class_name, "\n".join(attr_class_template))
|
||||
|
||||
_compile_and_eval("\n".join(attr_class_template), globs)
|
||||
|
||||
return globs[attr_class_name]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user