From 36da9a600ec5262524197a770fb4b865b204d4f3 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 11 Nov 2024 19:30:15 -0800 Subject: [PATCH 1/4] add explicit platform --- llama_stack/distribution/build_container.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index 81d8811e5..59b19779e 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -147,8 +147,19 @@ else image_name="$image_name-$(curl -s $URL | jq -r '.info.version')" fi +# Detect platform architecture +ARCH=$(uname -m) +if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then + PLATFORM="--platform linux/arm64" +elif [ "$ARCH" = "x86_64" ]; then + PLATFORM="--platform linux/amd64" +else + echo "Unsupported architecture: $ARCH" + exit 1 +fi + set -x -$DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts +$DOCKER_BINARY build $DOCKER_OPTS $PLATFORM -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts # clean up tmp/configs set +x From 506b99242a80e4a5c46cddfb0b9102fbe5cc3294 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 11 Nov 2024 19:55:23 -0800 Subject: [PATCH 2/4] Allow specifying TEST / PYPI VERSION for docker name --- llama_stack/distribution/start_container.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llama_stack/distribution/start_container.sh b/llama_stack/distribution/start_container.sh index fe1b5051f..b9ec9a23d 100755 --- a/llama_stack/distribution/start_container.sh +++ b/llama_stack/distribution/start_container.sh @@ -10,6 +10,8 @@ DOCKER_BINARY=${DOCKER_BINARY:-docker} DOCKER_OPTS=${DOCKER_OPTS:-} LLAMA_CHECKPOINT_DIR=${LLAMA_CHECKPOINT_DIR:-} LLAMA_STACK_DIR=${LLAMA_STACK_DIR:-} +TEST_PYPI_VERSION=${TEST_PYPI_VERSION:-} +PYPI_VERSION=${PYPI_VERSION:-} set -euo pipefail @@ -54,6 +56,12 @@ if [ -n "$LLAMA_CHECKPOINT_DIR" ]; then DOCKER_OPTS="$DOCKER_OPTS --gpus=all" fi +if [ -n "$PYPI_VERSION" ]; then + docker_image="$docker_image-$PYPI_VERSION" +elif [ -n "$TEST_PYPI_VERSION" ]; then + docker_image="$docker_image-test-$TEST_PYPI_VERSION" +fi + $DOCKER_BINARY run $DOCKER_OPTS -it \ -p $port:$port \ -v "$yaml_config:/app/config.yaml" \ From f4426f6a4374449e7c2baa74d23c56f1e2bc8f11 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 11 Nov 2024 20:12:13 -0800 Subject: [PATCH 3/4] Fix bug in `llama stack build`; SERVER_DEPENDENCIES were dropped --- llama_stack/distribution/build.py | 18 ++++-------------- llama_stack/distribution/build_container.sh | 8 ++++---- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/llama_stack/distribution/build.py b/llama_stack/distribution/build.py index 34e953656..92e33b9fd 100644 --- a/llama_stack/distribution/build.py +++ b/llama_stack/distribution/build.py @@ -5,7 +5,7 @@ # the root directory of this source tree. from enum import Enum -from typing import List, Optional +from typing import List import pkg_resources from pydantic import BaseModel @@ -38,11 +38,6 @@ class ImageType(Enum): conda = "conda" -class Dependencies(BaseModel): - pip_packages: List[str] - docker_image: Optional[str] = None - - class ApiInput(BaseModel): api: Api provider: str @@ -103,17 +98,12 @@ def print_pip_install_help(providers: Dict[str, List[Provider]]): def build_image(build_config: BuildConfig, build_file_path: Path): - package_deps = Dependencies( - docker_image=build_config.distribution_spec.docker_image or "python:3.10-slim", - pip_packages=SERVER_DEPENDENCIES, - ) + docker_image = build_config.distribution_spec.docker_image or "python:3.10-slim" - # extend package dependencies based on providers spec normal_deps, special_deps = get_provider_dependencies( build_config.distribution_spec.providers ) - package_deps.pip_packages.extend(normal_deps) - package_deps.pip_packages.extend(special_deps) + normal_deps += SERVER_DEPENDENCIES if build_config.image_type == ImageType.docker.value: script = pkg_resources.resource_filename( @@ -122,7 +112,7 @@ def build_image(build_config: BuildConfig, build_file_path: Path): args = [ script, build_config.name, - package_deps.docker_image, + docker_image, str(build_file_path), str(BUILDS_BASE_DIR / ImageType.docker.value), " ".join(normal_deps), diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index 59b19779e..ba1863e5d 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -150,12 +150,12 @@ fi # Detect platform architecture ARCH=$(uname -m) if [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then - PLATFORM="--platform linux/arm64" + PLATFORM="--platform linux/arm64" elif [ "$ARCH" = "x86_64" ]; then - PLATFORM="--platform linux/amd64" + PLATFORM="--platform linux/amd64" else - echo "Unsupported architecture: $ARCH" - exit 1 + echo "Unsupported architecture: $ARCH" + exit 1 fi set -x From 3d7561e55cf845b55bbb6c3d121c7de822248c29 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 11 Nov 2024 22:19:16 -0800 Subject: [PATCH 4/4] Rename all inline providers with an inline:: prefix (#423) --- distributions/bedrock/run.yaml | 6 +++--- distributions/dell-tgi/run.yaml | 6 +++--- distributions/fireworks/run.yaml | 6 +++--- distributions/inline-vllm/run.yaml | 6 +++--- distributions/meta-reference-gpu/run.yaml | 10 +++++----- distributions/meta-reference-quantized-gpu/run.yaml | 10 +++++----- distributions/ollama-gpu/run.yaml | 6 +++--- distributions/ollama/run.yaml | 6 +++--- distributions/remote-vllm/run.yaml | 6 +++--- distributions/tgi/run.yaml | 6 +++--- distributions/together/run.yaml | 4 ++-- docs/source/distribution_dev/building_distro.md | 12 ++++++------ .../self_hosted_distro/meta-reference-gpu.md | 2 +- docs/source/getting_started/index.md | 2 +- docs/zero_to_hero_guide/06_Safety101.ipynb | 8 ++++---- llama_stack/cli/tests/test_stack_config.py | 12 ++++++------ llama_stack/providers/registry/agents.py | 2 +- llama_stack/providers/registry/eval.py | 2 +- llama_stack/providers/registry/inference.py | 4 ++-- llama_stack/providers/registry/memory.py | 2 +- llama_stack/providers/registry/safety.py | 4 ++-- llama_stack/providers/registry/scoring.py | 2 +- llama_stack/providers/registry/telemetry.py | 2 +- 23 files changed, 63 insertions(+), 63 deletions(-) diff --git a/distributions/bedrock/run.yaml b/distributions/bedrock/run.yaml index bd9a89566..45e8aa7b5 100644 --- a/distributions/bedrock/run.yaml +++ b/distributions/bedrock/run.yaml @@ -23,7 +23,7 @@ providers: region_name: memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} safety: - provider_id: bedrock0 @@ -35,12 +35,12 @@ providers: region_name: agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: type: sqlite db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/dell-tgi/run.yaml b/distributions/dell-tgi/run.yaml index 779750c58..5243f4e69 100644 --- a/distributions/dell-tgi/run.yaml +++ b/distributions/dell-tgi/run.yaml @@ -29,11 +29,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -41,5 +41,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/fireworks/run.yaml b/distributions/fireworks/run.yaml index 1259c9493..d2903aabb 100644 --- a/distributions/fireworks/run.yaml +++ b/distributions/fireworks/run.yaml @@ -31,7 +31,7 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} # Uncomment to use weaviate memory provider # - provider_id: weaviate0 @@ -39,7 +39,7 @@ providers: # config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -47,5 +47,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/inline-vllm/run.yaml b/distributions/inline-vllm/run.yaml index 02499b49a..b998727c0 100644 --- a/distributions/inline-vllm/run.yaml +++ b/distributions/inline-vllm/run.yaml @@ -42,7 +42,7 @@ providers: # model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} # Uncomment to use pgvector # - provider_id: pgvector @@ -55,7 +55,7 @@ providers: # password: mysecretpassword agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -63,5 +63,5 @@ providers: db_path: ~/.llama/runtime/agents_store.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/meta-reference-gpu/run.yaml b/distributions/meta-reference-gpu/run.yaml index 98a52bed1..13d3787e1 100644 --- a/distributions/meta-reference-gpu/run.yaml +++ b/distributions/meta-reference-gpu/run.yaml @@ -14,7 +14,7 @@ apis: providers: inference: - provider_id: inference0 - provider_type: meta-reference + provider_type: inline::meta-reference config: model: Llama3.2-3B-Instruct quantization: null @@ -22,7 +22,7 @@ providers: max_seq_len: 4096 max_batch_size: 1 - provider_id: inference1 - provider_type: meta-reference + provider_type: inline::meta-reference config: model: Llama-Guard-3-1B quantization: null @@ -44,7 +44,7 @@ providers: # model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} # Uncomment to use pgvector # - provider_id: pgvector @@ -57,7 +57,7 @@ providers: # password: mysecretpassword agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -65,5 +65,5 @@ providers: db_path: ~/.llama/runtime/agents_store.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/meta-reference-quantized-gpu/run.yaml b/distributions/meta-reference-quantized-gpu/run.yaml index fa8be277d..d5012852d 100644 --- a/distributions/meta-reference-quantized-gpu/run.yaml +++ b/distributions/meta-reference-quantized-gpu/run.yaml @@ -14,7 +14,7 @@ apis: providers: inference: - provider_id: meta0 - provider_type: meta-reference-quantized + provider_type: inline::meta-reference-quantized config: model: Llama3.2-3B-Instruct:int4-qlora-eo8 quantization: @@ -23,7 +23,7 @@ providers: max_seq_len: 2048 max_batch_size: 1 - provider_id: meta1 - provider_type: meta-reference-quantized + provider_type: inline::meta-reference-quantized config: # not a quantized model ! model: Llama-Guard-3-1B @@ -43,11 +43,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -55,5 +55,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/ollama-gpu/run.yaml b/distributions/ollama-gpu/run.yaml index 46c67a1e5..c702b878e 100644 --- a/distributions/ollama-gpu/run.yaml +++ b/distributions/ollama-gpu/run.yaml @@ -29,11 +29,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -41,5 +41,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/ollama/run.yaml b/distributions/ollama/run.yaml index 46c67a1e5..c702b878e 100644 --- a/distributions/ollama/run.yaml +++ b/distributions/ollama/run.yaml @@ -29,11 +29,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -41,5 +41,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/remote-vllm/run.yaml b/distributions/remote-vllm/run.yaml index 27d60bd6c..4c0a25f56 100644 --- a/distributions/remote-vllm/run.yaml +++ b/distributions/remote-vllm/run.yaml @@ -29,11 +29,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -41,5 +41,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/tgi/run.yaml b/distributions/tgi/run.yaml index dcbb69027..84ec536f8 100644 --- a/distributions/tgi/run.yaml +++ b/distributions/tgi/run.yaml @@ -29,11 +29,11 @@ providers: model: Prompt-Guard-86M memory: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -41,5 +41,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/distributions/together/run.yaml b/distributions/together/run.yaml index 36ef86056..142316a8d 100644 --- a/distributions/together/run.yaml +++ b/distributions/together/run.yaml @@ -34,7 +34,7 @@ providers: config: {} agents: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: persistence_store: namespace: null @@ -42,5 +42,5 @@ providers: db_path: ~/.llama/runtime/kvstore.db telemetry: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: {} diff --git a/docs/source/distribution_dev/building_distro.md b/docs/source/distribution_dev/building_distro.md index 36c504b1b..b5738d998 100644 --- a/docs/source/distribution_dev/building_distro.md +++ b/docs/source/distribution_dev/building_distro.md @@ -35,14 +35,14 @@ the provider types (implementations) you want to use for these APIs. Tip: use to see options for the providers. -> Enter provider for API inference: meta-reference +> Enter provider for API inference: inline::meta-reference > Enter provider for API safety: inline::llama-guard -> Enter provider for API agents: meta-reference +> Enter provider for API agents: inline::meta-reference > Enter provider for API memory: inline::faiss -> Enter provider for API datasetio: meta-reference -> Enter provider for API scoring: meta-reference -> Enter provider for API eval: meta-reference -> Enter provider for API telemetry: meta-reference +> Enter provider for API datasetio: inline::meta-reference +> Enter provider for API scoring: inline::meta-reference +> Enter provider for API eval: inline::meta-reference +> Enter provider for API telemetry: inline::meta-reference > (Optional) Enter a short description for your Llama Stack: diff --git a/docs/source/getting_started/distributions/self_hosted_distro/meta-reference-gpu.md b/docs/source/getting_started/distributions/self_hosted_distro/meta-reference-gpu.md index 44b7c8978..1d5842c07 100644 --- a/docs/source/getting_started/distributions/self_hosted_distro/meta-reference-gpu.md +++ b/docs/source/getting_started/distributions/self_hosted_distro/meta-reference-gpu.md @@ -59,7 +59,7 @@ You may change the `config.model` in `run.yaml` to update the model currently be ``` inference: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: model: Llama3.2-11B-Vision-Instruct quantization: null diff --git a/docs/source/getting_started/index.md b/docs/source/getting_started/index.md index af4edbd1c..d1d61d770 100644 --- a/docs/source/getting_started/index.md +++ b/docs/source/getting_started/index.md @@ -400,7 +400,7 @@ You may change the `config.model` in `run.yaml` to update the model currently be ``` inference: - provider_id: meta0 - provider_type: meta-reference + provider_type: inline::meta-reference config: model: Llama3.2-11B-Vision-Instruct quantization: null diff --git a/docs/zero_to_hero_guide/06_Safety101.ipynb b/docs/zero_to_hero_guide/06_Safety101.ipynb index 94be0baca..e1e9301d3 100644 --- a/docs/zero_to_hero_guide/06_Safety101.ipynb +++ b/docs/zero_to_hero_guide/06_Safety101.ipynb @@ -67,7 +67,7 @@ "providers:\n", " inference:\n", " - provider_id: meta-reference\n", - " provider_type: meta-reference\n", + " provider_type: inline::meta-reference\n", " config:\n", " model: Llama3.1-8B-Instruct\n", " torch_seed: 42\n", @@ -77,7 +77,7 @@ " checkpoint_dir: null\n", " safety:\n", " - provider_id: meta-reference\n", - " provider_type: meta-reference\n", + " provider_type: inline::meta-reference\n", " config:\n", " llama_guard_shield:\n", " model: Llama-Guard-3-1B\n", @@ -94,7 +94,7 @@ "```bash\n", "inference:\n", " - provider_id: meta-reference\n", - " provider_type: meta-reference\n", + " provider_type: inline::meta-reference\n", " config:\n", " model: Llama3.1-8B-Instruct\n", " torch_seed: null\n", @@ -103,7 +103,7 @@ " create_distributed_process_group: true\n", " checkpoint_dir: null\n", " - provider_id: meta1\n", - " provider_type: meta-reference\n", + " provider_type: inline::meta-reference\n", " config:\n", " model: Llama-Guard-3-1B\n", " torch_seed: null\n", diff --git a/llama_stack/cli/tests/test_stack_config.py b/llama_stack/cli/tests/test_stack_config.py index 29c63d26e..138fa098c 100644 --- a/llama_stack/cli/tests/test_stack_config.py +++ b/llama_stack/cli/tests/test_stack_config.py @@ -25,11 +25,11 @@ def up_to_date_config(): providers: inference: - provider_id: provider1 - provider_type: meta-reference + provider_type: inline::meta-reference config: {{}} safety: - provider_id: provider1 - provider_type: meta-reference + provider_type: inline::meta-reference config: llama_guard_shield: model: Llama-Guard-3-1B @@ -39,7 +39,7 @@ def up_to_date_config(): enable_prompt_guard: false memory: - provider_id: provider1 - provider_type: meta-reference + provider_type: inline::meta-reference config: {{}} """.format( version=LLAMA_STACK_RUN_CONFIG_VERSION, built_at=datetime.now().isoformat() @@ -61,13 +61,13 @@ def old_config(): host: localhost port: 11434 routing_key: Llama3.2-1B-Instruct - - provider_type: meta-reference + - provider_type: inline::meta-reference config: model: Llama3.1-8B-Instruct routing_key: Llama3.1-8B-Instruct safety: - routing_key: ["shield1", "shield2"] - provider_type: meta-reference + provider_type: inline::meta-reference config: llama_guard_shield: model: Llama-Guard-3-1B @@ -77,7 +77,7 @@ def old_config(): enable_prompt_guard: false memory: - routing_key: vector - provider_type: meta-reference + provider_type: inline::meta-reference config: {{}} api_providers: telemetry: diff --git a/llama_stack/providers/registry/agents.py b/llama_stack/providers/registry/agents.py index 989b9f077..8b6c9027c 100644 --- a/llama_stack/providers/registry/agents.py +++ b/llama_stack/providers/registry/agents.py @@ -14,7 +14,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.agents, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=[ "matplotlib", "pillow", diff --git a/llama_stack/providers/registry/eval.py b/llama_stack/providers/registry/eval.py index 275cc92db..3fa5c75e0 100644 --- a/llama_stack/providers/registry/eval.py +++ b/llama_stack/providers/registry/eval.py @@ -13,7 +13,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.eval, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=[], module="llama_stack.providers.inline.eval.meta_reference", config_class="llama_stack.providers.inline.eval.meta_reference.MetaReferenceEvalConfig", diff --git a/llama_stack/providers/registry/inference.py b/llama_stack/providers/registry/inference.py index 1d3eabe0d..440d475fe 100644 --- a/llama_stack/providers/registry/inference.py +++ b/llama_stack/providers/registry/inference.py @@ -25,14 +25,14 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.inference, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=META_REFERENCE_DEPS, module="llama_stack.providers.inline.inference.meta_reference", config_class="llama_stack.providers.inline.inference.meta_reference.MetaReferenceInferenceConfig", ), InlineProviderSpec( api=Api.inference, - provider_type="meta-reference-quantized", + provider_type="inline::meta-reference-quantized", pip_packages=( META_REFERENCE_DEPS + [ diff --git a/llama_stack/providers/registry/memory.py b/llama_stack/providers/registry/memory.py index 50fd64d7b..0b98f3368 100644 --- a/llama_stack/providers/registry/memory.py +++ b/llama_stack/providers/registry/memory.py @@ -34,7 +34,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.memory, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=EMBEDDING_DEPS + ["faiss-cpu"], module="llama_stack.providers.inline.memory.faiss", config_class="llama_stack.providers.inline.memory.faiss.FaissImplConfig", diff --git a/llama_stack/providers/registry/safety.py b/llama_stack/providers/registry/safety.py index 63676c4f1..77dd823eb 100644 --- a/llama_stack/providers/registry/safety.py +++ b/llama_stack/providers/registry/safety.py @@ -19,7 +19,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.safety, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=[ "transformers", "torch --index-url https://download.pytorch.org/whl/cpu", @@ -30,7 +30,7 @@ def available_providers() -> List[ProviderSpec]: Api.inference, ], deprecation_error=""" -Provider `meta-reference` for API `safety` does not work with the latest Llama Stack. +Provider `inline::meta-reference` for API `safety` does not work with the latest Llama Stack. - if you are using Llama Guard v3, please use the `inline::llama-guard` provider instead. - if you are using Prompt Guard, please use the `inline::prompt-guard` provider instead. diff --git a/llama_stack/providers/registry/scoring.py b/llama_stack/providers/registry/scoring.py index 70f43ad73..a63b21c65 100644 --- a/llama_stack/providers/registry/scoring.py +++ b/llama_stack/providers/registry/scoring.py @@ -13,7 +13,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.scoring, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=[], module="llama_stack.providers.inline.scoring.meta_reference", config_class="llama_stack.providers.inline.scoring.meta_reference.MetaReferenceScoringConfig", diff --git a/llama_stack/providers/registry/telemetry.py b/llama_stack/providers/registry/telemetry.py index 050d890aa..ac537e076 100644 --- a/llama_stack/providers/registry/telemetry.py +++ b/llama_stack/providers/registry/telemetry.py @@ -13,7 +13,7 @@ def available_providers() -> List[ProviderSpec]: return [ InlineProviderSpec( api=Api.telemetry, - provider_type="meta-reference", + provider_type="inline::meta-reference", pip_packages=[], module="llama_stack.providers.inline.meta_reference.telemetry", config_class="llama_stack.providers.inline.meta_reference.telemetry.ConsoleConfig",