Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run Safety example #17

Open
tnsai opened this issue Nov 12, 2024 · 2 comments
Open

Can't run Safety example #17

tnsai opened this issue Nov 12, 2024 · 2 comments

Comments

@tnsai
Copy link

tnsai commented Nov 12, 2024

I can run the examples (with some small fixes for the latest Llama Stack). However, the safety example errors at the point:

response = client.safety.run_shield

with:

fastapi.exceptions.RequestValidationError: [{'type': 'missing', 'loc': ('body', 'identifier'), 'msg': 'Field required', 'input': None}]

The preceding code that lists the available shields outputs:

{
    "identifier": "llama_guard",
    "params": {},
    "provider_id": "meta-reference",
    "type": "shield",
    "shield_type": "llama_guard"
}

llama-guard is running fine, llama-stack is running on localhost port 5000 and the safety examples is called with:

python safety.py 127.0.0.1 5000

What to do?

@ashwinb
Copy link
Contributor

ashwinb commented Nov 12, 2024

@tnsai what version of the llama stack server / llama stack client package are you running?

The error message indicates you are using a newer version of the stack-client than the server. We deprecated the identifier field and renamed it shield_id.

cc @dineshyv in any case

@tnsai
Copy link
Author

tnsai commented Nov 12, 2024

@dineshyv I'm running pip installed version from last week, with some PR amends for remote::vllm committed a few days ago and the latest available pip installed client from yesterday.

When was identifier renamed (so that I can feed back to vllm provider contributors)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants