mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:27:14 +00:00
add docs
This commit is contained in:
parent
544a2d5fc9
commit
8c60118afc
2 changed files with 41 additions and 2 deletions
|
|
@ -60,7 +60,9 @@ FIREWORKS_API_KEY=your_key pytest -sv tests/integration/inference --stack-config
|
||||||
|
|
||||||
### Re-recording tests
|
### Re-recording tests
|
||||||
|
|
||||||
If you want to re-record tests, you can do so with:
|
#### Local Re-recording (Manual Setup Required)
|
||||||
|
|
||||||
|
If you want to re-record tests locally, you can do so with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
LLAMA_STACK_TEST_INFERENCE_MODE=record \
|
LLAMA_STACK_TEST_INFERENCE_MODE=record \
|
||||||
|
|
@ -71,7 +73,6 @@ LLAMA_STACK_TEST_INFERENCE_MODE=record \
|
||||||
|
|
||||||
This will record new API responses and overwrite the existing recordings.
|
This will record new API responses and overwrite the existing recordings.
|
||||||
|
|
||||||
|
|
||||||
```{warning}
|
```{warning}
|
||||||
|
|
||||||
You must be careful when re-recording. CI workflows assume a specific setup for running the replay-mode tests. You must re-record the tests in the same way as the CI workflows. This means
|
You must be careful when re-recording. CI workflows assume a specific setup for running the replay-mode tests. You must re-record the tests in the same way as the CI workflows. This means
|
||||||
|
|
@ -79,6 +80,35 @@ You must be careful when re-recording. CI workflows assume a specific setup for
|
||||||
- you are using the `starter` distribution.
|
- you are using the `starter` distribution.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Remote Re-recording (Recommended)
|
||||||
|
|
||||||
|
**For easier re-recording without local setup**, use the automated recording workflow:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Record tests for specific test subdirectories
|
||||||
|
./scripts/github/schedule-record-workflow.sh --test-subdirs "agents,inference"
|
||||||
|
|
||||||
|
# Record with vision tests enabled
|
||||||
|
./scripts/github/schedule-record-workflow.sh --test-subdirs "inference" --run-vision-tests
|
||||||
|
|
||||||
|
# Record with specific provider
|
||||||
|
./scripts/github/schedule-record-workflow.sh --test-subdirs "agents" --test-provider vllm
|
||||||
|
```
|
||||||
|
|
||||||
|
This script:
|
||||||
|
- 🚀 **Runs in GitHub Actions** - no local Ollama setup required
|
||||||
|
- 🔍 **Auto-detects your branch** and associated PR
|
||||||
|
- 🍴 **Works from forks** - handles repository context automatically
|
||||||
|
- ✅ **Commits recordings back** to your branch
|
||||||
|
- 🛡️ **Validates inputs** - prevents common mistakes
|
||||||
|
|
||||||
|
**Prerequisites:**
|
||||||
|
- GitHub CLI: `brew install gh && gh auth login`
|
||||||
|
- jq: `brew install jq`
|
||||||
|
- Your branch pushed to a remote
|
||||||
|
|
||||||
|
**Supported providers:** `vllm`, `ollama`
|
||||||
|
|
||||||
|
|
||||||
### Next Steps
|
### Next Steps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,15 @@ cat recordings/responses/abc123.json | jq '.'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Re-recording Tests
|
### Re-recording Tests
|
||||||
|
|
||||||
|
#### Remote Re-recording (Recommended)
|
||||||
|
Use the automated workflow script for easier re-recording:
|
||||||
|
```bash
|
||||||
|
./scripts/github/schedule-record-workflow.sh --test-subdirs "inference,agents"
|
||||||
|
```
|
||||||
|
See the [main testing guide](../README.md#remote-re-recording-recommended) for full details.
|
||||||
|
|
||||||
|
#### Local Re-recording
|
||||||
```bash
|
```bash
|
||||||
# Re-record specific tests
|
# Re-record specific tests
|
||||||
LLAMA_STACK_TEST_INFERENCE_MODE=record \
|
LLAMA_STACK_TEST_INFERENCE_MODE=record \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue