From 5e45245457376103b2916c9a436eaff2c430771e Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Fri, 10 Nov 2023 02:33:55 -0500 Subject: [PATCH] package: add openllm core dependencies to labels (#600) Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- openllm-python/src/openllm/bundle/_package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openllm-python/src/openllm/bundle/_package.py b/openllm-python/src/openllm/bundle/_package.py index f6964f71..2b52230b 100644 --- a/openllm-python/src/openllm/bundle/_package.py +++ b/openllm-python/src/openllm/bundle/_package.py @@ -1,5 +1,6 @@ # mypy: disable-error-code="misc" from __future__ import annotations +import importlib.metadata import inspect import logging import os @@ -266,6 +267,10 @@ def create_bento( 'start_name': llm.config['start_name'], 'base_name_or_path': llm.model_id, 'bundler': 'openllm.bundle', + **{ + f'{package.replace("-","_")}_version': importlib.metadata.version(package) + for package in {'openllm', 'openllm-core', 'openllm-client'} + }, } ) if adapter_map: