File tree Expand file tree Collapse file tree 6 files changed +220
-197
lines changed
src/llama_stack_provider_lmeval Expand file tree Collapse file tree 6 files changed +220
-197
lines changed Original file line number Diff line number Diff line change 11module : llama_stack_provider_lmeval.inline
22config_class : llama_stack_provider_lmeval.config.LMEvalEvalProviderConfig
33pip_packages : ["lm-eval"]
4- api_dependencies : ["inference"]
4+ api_dependencies : ["inference", "files" ]
55optional_api_dependencies : []
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ image_name: trustyai-lmeval
33apis :
44 - inference
55 - eval
6+ - files
67providers :
78 inference :
89 - provider_id : vllm
@@ -18,4 +19,12 @@ providers:
1819 config :
1920 base_url : ${env.BASE_URL:=http://localhost:8321/v1}
2021 use_k8s : ${env.USE_K8S:=false}
22+ files :
23+ - provider_id : meta-reference-files
24+ provider_type : inline::localfs
25+ config :
26+ storage_dir : ${env.FILES_STORAGE_DIR:=~/.llama/distributions/trustyai-lmeval/files}
27+ metadata_store :
28+ type : sqlite
29+ db_path : ${env.METADATA_STORE_DB_PATH:=~/.llama/distributions/trustyai-lmeval}/registry.db}
2130external_providers_dir : ./providers.d
Original file line number Diff line number Diff line change 1212
1313from .errors import LMEvalConfigError
1414
15+
1516@json_schema_type
1617@dataclass
1718class TLSConfig :
@@ -128,7 +129,6 @@ class LMEvalEvalProviderConfig:
128129 base_dir : Path = Path (__file__ ).parent
129130 results_dir : Path = base_dir / "results"
130131
131-
132132 def __post_init__ (self ):
133133 """Validate the configuration"""
134134 if not isinstance (self .use_k8s , bool ):
Original file line number Diff line number Diff line change 1+ """LMEval Inline Eval Llama Stack provider."""
2+
13import logging
24
35from llama_stack .apis .datatypes import Api
911
1012logger = logging .getLogger (__name__ )
1113
14+
1215async def get_provider_impl (
1316 config : LMEvalEvalProviderConfig ,
1417 deps : dict [Api , ProviderSpec ] | None = None ,
@@ -42,6 +45,7 @@ async def get_provider_impl(
4245 except Exception as e :
4346 raise RuntimeError (f"Failed to create LMEval implementation: { str (e )} " ) from e
4447
48+
4549__all__ = [
4650 "get_provider_impl" ,
4751 "LMEvalInline" ,
You can’t perform that action at this time.
0 commit comments