llama-stack-mirror/tests/integration/recordings/responses/8295382a8e7c.json
Ashwin Bharambe c3d3a0b833
Some checks failed
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 1s
Test External Providers Installed via Module / test-external-providers-from-module (venv) (push) Has been skipped
Integration Tests (Replay) / Integration Tests (, , , client=, vision=) (push) Failing after 3s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 4s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 7s
Update ReadTheDocs / update-readthedocs (push) Failing after 3s
Test External API and Providers / test-external (venv) (push) Failing after 5s
Vector IO Integration Tests / test-matrix (push) Failing after 7s
Python Package Build Test / build (3.13) (push) Failing after 8s
Python Package Build Test / build (3.12) (push) Failing after 8s
Unit Tests / unit-tests (3.13) (push) Failing after 14s
Unit Tests / unit-tests (3.12) (push) Failing after 14s
UI Tests / ui-tests (22) (push) Successful in 1m7s
Pre-commit / pre-commit (push) Successful in 2m34s
feat(tests): auto-merge all model list responses and unify recordings (#3320)
One needed to specify record-replay related environment variables for
running integration tests. We could not use defaults because integration
tests could be run against Ollama instances which could be running
different models. For example, text vs vision tests needed separate
instances of Ollama because a single instance typically cannot serve
both of these models if you assume the standard CI worker configuration
on Github. As a result, `client.list()` as returned by the Ollama client
would be different between these runs and we'd end up overwriting
responses.

This PR "solves" it by adding a small amount of complexity -- we store
model list responses specially, keyed by the hashes of the models they
return. At replay time, we merge all of them and pretend that we have
the union of all models available.

## Test Plan

Re-recorded all the tests using `scripts/integration-tests.sh
--inference-mode record`, including the vision tests.
2025-09-03 11:33:03 -07:00

56 lines
4.2 KiB
JSON

{
"request": {
"method": "POST",
"url": "http://0.0.0.0:11434/v1/v1/chat/completions",
"headers": {},
"body": {
"model": "llama3.2:3b-instruct-fp16",
"messages": [
{
"role": "user",
"content": "Test trace openai 2"
}
],
"stream": false
},
"endpoint": "/v1/chat/completions",
"model": "llama3.2:3b-instruct-fp16"
},
"response": {
"body": {
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
"__data__": {
"id": "chatcmpl-713",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "I'd be happy to help you test the Transformer-XL (denoted as \"Test Trace OpenAI 2\") model, but first I need to clarify a few things:\n\n1. **Transformer-XL** is not an official name from OpenAI. It's actually a variant of the Transformer model proposed in the paper \"Long-Short Term Memory Are General: A Study on The Curvature of Time\" (2017) by Jinyu Chen, et al.\n2. **Trace OpenAI 2** sounds like a specific version or configuration of the Transformer-XL model, possibly developed by OpenAI.\n\nGiven these clarifications, I'll provide you with a general idea of how to test the Transformer-XL (or \"Test Trace OpenAI 2\") model using popular frameworks and libraries. Please note that this is not an exhaustive or definitive guide.\n\nTo test the Transformer-XL model, you can follow these steps:\n\n1. **Install the necessary dependencies**: You'll need a deep learning framework like TensorFlow or PyTorch, as well as a library for natural language processing (NLP) like Hugging Face's transformers.\n2. **Load the pre-trained weights**: You can use a pre-trained model checkpoint from Hugging Face's Transformers library or load your own weights trained on a specific task or dataset.\n3. **Prepare your data**: Load your text data into tokens, such as words or characters, and preprocess it according to the specific requirements of the Transformer-XL architecture (e.g., tokenization, padding, etc.).\n4. **Configure the model**: Adjust the hyperparameters to suit your specific test case, including the model's configuration, batch size, learning rate, etc.\n5. **Run the inference**: Use the loaded pre-trained weights to perform inference on your test data.\n\nHere's some sample Python code using PyTorch and Hugging Face's Transformers library to get you started:\n```python\nimport torch\nfrom transformers import LongformerForSequenceClassification, LongformerTokenizer\n\n# Load pre-trained weights\nmodel = LongformerForSequenceClassification.from_pretrained('test-trace-openai-2')\n\n# Prepare data\ntokenizer = model.tokenizer\ntext = \"This is a test sentence\"\ninputs = tokenizer(text, return_tensors='pt')\noutput = model(inputs['input_ids'], attention_mask=inputs['attention_mask'])\n\n# Print the results\nprint(output.logits)\n```\nPlease note that this code snippet is just an example and may not work as-is. You'll need to adapt it to your specific requirements and test data.\n\nKeep in mind that testing a model's performance on a specific task or dataset requires careful consideration of factors like:\n\n* **Test data quality**: Your test data should accurately represent the underlying distribution of your target dataset.\n* **Model evaluation metrics**: Choose relevant evaluation metrics that measure the model's performance on your specific task, such as accuracy, precision, recall, F1-score, etc.\n\nFeel free to ask if you have any further questions or need more guidance!",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": null
}
}
],
"created": 1756921250,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": "fp_ollama",
"usage": {
"completion_tokens": 614,
"prompt_tokens": 31,
"total_tokens": 645,
"completion_tokens_details": null,
"prompt_tokens_details": null
}
}
},
"is_streaming": false
}
}