Skip to content

Commit 6d4e98d

Browse files
committed
Fix some test outputs with slight deviations
1 parent f7b7d43 commit 6d4e98d

File tree

8 files changed

+56
-57
lines changed

8 files changed

+56
-57
lines changed

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_base64_rgb_jpg.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image.\n\nThe image is a solid, bright white color. There is nothing else visible within it. \n\nIt's essentially a blank white canvas or a completely white square. \n\nIs there anything specific you'd like me to do with this image, such as describe it further or imagine what it might represent?",
8+
"content": "Okay, let's analyze the image.\n\nThe image is a solid, bright white color. There is nothing else visible within it. \n\nIt's essentially a blank white square or rectangle.",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1741965894,
16+
"created": 1747062956,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
20-
"system_fingerprint": "3.2.1-dev0-native",
20+
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 74,
22+
"completion_tokens": 42,
2323
"prompt_tokens": 277,
24-
"total_tokens": 351
24+
"total_tokens": 319
2525
}
2626
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"choices": [
33
{
4-
"finish_reason": "length",
4+
"finish_reason": "stop",
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image. \n\nThe image is entirely white, with a very subtle, faint outline of a stylized, cartoonish figure. It appears to be a simplified depiction of a person, likely a child, with a wide-eyed expression and a small, rounded body. \n\nIt's almost like a minimalist, iconic representation. \n\nDo you want me to try and describe it in more detail, or perhaps suggest what this image might represent (e.g",
8+
"content": "Okay, let's analyze the image. \n\nThe image is a very plain, solid white square. That's it! \n\nIt's essentially a blank canvas. \n\nDo you want me to describe it in more detail, or are you interested in something else regarding this image?",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396706,
16+
"created": 1747062955,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 100,
22+
"completion_tokens": 62,
2323
"prompt_tokens": 277,
24-
"total_tokens": 377
24+
"total_tokens": 339
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_base64_rgba.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image. \n\nThe transparent image reveals a stylized depiction of **a human head**. It's a minimalist, geometric representation, showing the basic shapes of the skull, eye sockets, and head outline. \n\nIf you'd like, you can give me more details about the image or ask me to focus on a specific aspect of it.",
8+
"content": "Okay, let's analyze the image. \n\nThe transparent image reveals a stylized depiction of **a human head**. It's a minimalist, geometric representation, showing the basic shapes of the skull, eye sockets, and head outline. \n\nDo you want me to describe any specific element of the image in more detail?",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396703,
16+
"created": 1747062952,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 78,
22+
"completion_tokens": 67,
2323
"prompt_tokens": 277,
24-
"total_tokens": 355
24+
"total_tokens": 344
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The beach has turquoise water and a distant island visible in the background. The sky is bright blue with some white clouds. \n\nIt's a quite a humorous and unusual scene – a cow enjoying a day at the beach!",
8+
"content": "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The cow has white markings on its face and ears. Behind the cow is a clear blue ocean with a distant island, and a bright blue sky with some scattered clouds. \n\nIt's a rather charming and unexpected sight – a cow enjoying a beach day!",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396699,
16+
"created": 1747123513,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 74,
22+
"completion_tokens": 81,
2323
"prompt_tokens": 275,
24-
"total_tokens": 349
24+
"total_tokens": 356
2525
}
2626
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"choices": [
33
{
4-
"finish_reason": "stop",
4+
"finish_reason": "length",
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "That's a fantastic question! However, the image doesn't show a dog. It shows a **Brown Swiss cow** standing on a beach. \n\nBrown Swiss cows are known for their reddish-brown color and distinctive white markings. \n\nIf you'd like, you can send me another image and I’ll do my best to identify it!",
8+
"content": "Based on the image, the animal is a cow, not a dog! It appears to be a **Brazilian Fandangos** cow. \n\nHere's why:\n\n* **Color and markings:** The reddish-brown color and white markings are characteristic of this breed.\n* **Body shape:** They have a distinctive, sturdy build.\n* **Origin:** The Brazilian Fandangos breed originated in Brazil and is known for its ability to thrive in hot, tropical climates",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396697,
16+
"created": 1747123510,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 75,
22+
"completion_tokens": 100,
2323
"prompt_tokens": 279,
24-
"total_tokens": 354
24+
"total_tokens": 379
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,43 @@
1414
},
1515
{
1616
"id": 30234,
17-
"logprob": -2.328125,
17+
"logprob": -2.265625,
1818
"special": false,
1919
"text": "Brown"
2020
},
2121
{
2222
"id": 108,
23-
"logprob": -0.12060547,
23+
"logprob": -0.123535156,
2424
"special": false,
2525
"text": "\n"
2626
},
2727
{
2828
"id": 3726,
29-
"logprob": -1.7734375,
29+
"logprob": -1.7109375,
3030
"special": false,
3131
"text": "Car"
3232
},
3333
{
3434
"id": 108,
35-
"logprob": -0.041503906,
35+
"logprob": -0.036132812,
3636
"special": false,
3737
"text": "\n"
3838
},
3939
{
4040
"id": 2915,
41-
"logprob": -1.796875,
41+
"logprob": -1.765625,
4242
"special": false,
4343
"text": "Color"
4444
},
4545
{
4646
"id": 108,
47-
"logprob": -0.039794922,
47+
"logprob": -0.044433594,
4848
"special": false,
4949
"text": "\n"
5050
},
5151
{
5252
"id": 19178,
53-
"logprob": -1.96875,
53+
"logprob": -2.0,
5454
"special": false,
5555
"text": "Cool"
5656
},
@@ -62,7 +62,7 @@
6262
},
6363
{
6464
"id": 40544,
65-
"logprob": -2.1875,
65+
"logprob": -2.125,
6666
"special": false,
6767
"text": "Decor"
6868
},
@@ -73,61 +73,61 @@
7373
"text": "\n"
7474
},
7575
{
76-
"id": 13936,
77-
"logprob": -1.6328125,
76+
"id": 108,
77+
"logprob": -1.625,
7878
"special": false,
79-
"text": "Green"
79+
"text": "\n"
8080
},
8181
{
8282
"id": 108,
83-
"logprob": -0.16210938,
83+
"logprob": -1.921875,
8484
"special": false,
8585
"text": "\n"
8686
},
8787
{
88-
"id": 955,
89-
"logprob": -2.015625,
88+
"id": 108,
89+
"logprob": -1.5546875,
9090
"special": false,
91-
"text": "..."
91+
"text": "\n"
9292
},
9393
{
9494
"id": 108,
95-
"logprob": -0.14746094,
95+
"logprob": -1.2265625,
9696
"special": false,
9797
"text": "\n"
9898
},
9999
{
100-
"id": 955,
101-
"logprob": -0.73828125,
100+
"id": 108,
101+
"logprob": -0.94921875,
102102
"special": false,
103-
"text": "..."
103+
"text": "\n"
104104
},
105105
{
106106
"id": 108,
107-
"logprob": -0.051513672,
107+
"logprob": -1.078125,
108108
"special": false,
109109
"text": "\n"
110110
},
111111
{
112-
"id": 955,
113-
"logprob": -0.34765625,
112+
"id": 235336,
113+
"logprob": -1.2265625,
114114
"special": false,
115-
"text": "..."
115+
"text": "?"
116116
},
117117
{
118118
"id": 108,
119-
"logprob": -0.020141602,
119+
"logprob": -0.3203125,
120120
"special": false,
121121
"text": "\n"
122122
},
123123
{
124-
"id": 955,
125-
"logprob": -0.11767578,
124+
"id": 235336,
125+
"logprob": -0.07861328,
126126
"special": false,
127-
"text": "..."
127+
"text": "?"
128128
}
129129
],
130130
"top_tokens": null
131131
},
132-
"generated_text": "\nBrown\nCar\nColor\nCool\nDecor\nGreen\n...\n...\n...\n..."
132+
"generated_text": "\nBrown\nCar\nColor\nCool\nDecor\n\n\n\n\n\n\n?\n?"
133133
}

integration-tests/models/test_flash_gemma3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ async def test_flash_gemma3_image_cow_dog(flash_gemma3, response_snapshot):
5353

5454
assert (
5555
response.choices[0].message.content
56-
== "That's a fantastic question! However, the image doesn't show a dog. It shows a **Brown Swiss cow** standing on a beach. \n\nBrown Swiss cows are known for their reddish-brown color and distinctive white markings. \n\nIf you'd like, you can send me another image and I’ll do my best to identify it!"
56+
== "Based on the image, the animal is a cow, not a dog! It appears to be a **Brazilian Fandangos** cow. \n\nHere's why:\n\n* **Color and markings:** The reddish-brown color and white markings are characteristic of this breed.\n* **Body shape:** They have a distinctive, sturdy build.\n* **Origin:** The Brazilian Fandangos breed originated in Brazil and is known for its ability to thrive in hot, tropical climates"
5757
)
58-
assert response.usage["completion_tokens"] == 75
58+
assert response.usage["completion_tokens"] == 100
5959
assert response == response_snapshot
6060

6161

@@ -76,9 +76,9 @@ async def test_flash_gemma3_image_cow(flash_gemma3, response_snapshot):
7676
)
7777
assert (
7878
response.choices[0].message.content
79-
== "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The beach has turquoise water and a distant island visible in the background. The sky is bright blue with some white clouds. \n\nIt's a quite a humorous and unusual scene – a cow enjoying a day at the beach!"
79+
== "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The cow has white markings on its face and ears. Behind the cow is a clear blue ocean with a distant island, and a bright blue sky with some scattered clouds. \n\nIt's a rather charming and unexpected sight – a cow enjoying a beach day!"
8080
)
81-
assert response.usage["completion_tokens"] == 74
81+
assert response.usage["completion_tokens"] == 81
8282
assert response == response_snapshot
8383

8484

integration-tests/models/test_flash_pali_gemma2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ async def test_flash_pali_gemma_image(flash_pali_gemma, response_snapshot):
2222
max_new_tokens=20,
2323
)
2424
assert (
25-
response.generated_text
26-
== "\nBrown\nCar\nColor\nCool\nDecor\nGreen\n...\n...\n...\n..."
25+
response.generated_text == "\nBrown\nCar\nColor\nCool\nDecor\n\n\n\n\n\n\n?\n?"
2726
)
2827

2928
assert response == response_snapshot

0 commit comments

Comments
 (0)