override faiss memory provider only in run.yaml

This commit is contained in:
Xi Yan 2024-12-03 20:41:44 -08:00
parent eeb914fe4d
commit a097bfa761
3 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ class FaissImplConfig(BaseModel):
kvstore: KVStoreConfig kvstore: KVStoreConfig
@classmethod @classmethod
def sample_run_config(cls, __distro_dir__: str = "runtime") -> Dict[str, Any]: def sample_run_config(cls, __distro_dir__) -> Dict[str, Any]:
return { return {
"kvstore": SqliteKVStoreConfig.sample_run_config( "kvstore": SqliteKVStoreConfig.sample_run_config(
__distro_dir__=__distro_dir__, __distro_dir__=__distro_dir__,

View file

@ -25,7 +25,7 @@ providers:
kvstore: kvstore:
type: sqlite type: sqlite
namespace: null namespace: null
db_path: ${env.SQLITE_STORE_DIR:~/.llama/runtime}/faiss_store.db db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/together}/faiss_store.db
safety: safety:
- provider_id: llama-guard - provider_id: llama-guard
provider_type: inline::llama-guard provider_type: inline::llama-guard

View file

@ -27,7 +27,7 @@ def get_distribution_template() -> DistributionTemplate:
"datasetio": ["remote::huggingface", "inline::localfs"], "datasetio": ["remote::huggingface", "inline::localfs"],
"scoring": ["inline::basic", "inline::llm-as-judge", "inline::braintrust"], "scoring": ["inline::basic", "inline::llm-as-judge", "inline::braintrust"],
} }
name = "together"
inference_provider = Provider( inference_provider = Provider(
provider_id="together", provider_id="together",
provider_type="remote::together", provider_type="remote::together",
@ -36,7 +36,7 @@ def get_distribution_template() -> DistributionTemplate:
memory_provider = Provider( memory_provider = Provider(
provider_id="faiss", provider_id="faiss",
provider_type="inline::faiss", provider_type="inline::faiss",
config=FaissImplConfig.sample_run_config(), config=FaissImplConfig.sample_run_config(f"distributions/{name}"),
) )
core_model_to_hf_repo = { core_model_to_hf_repo = {
@ -51,7 +51,7 @@ def get_distribution_template() -> DistributionTemplate:
] ]
return DistributionTemplate( return DistributionTemplate(
name="together", name=name,
distro_type="self_hosted", distro_type="self_hosted",
description="Use Together.AI for running LLM inference", description="Use Together.AI for running LLM inference",
docker_image=None, docker_image=None,