Skip to content

Commit

Permalink
goldens and cassettes inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed May 29, 2024
1 parent ee340e6 commit 8b87a25
Show file tree
Hide file tree
Showing 8 changed files with 199 additions and 3,187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func Test_DeploymentCreate(t *testing.T) {
//t.Skip("Out of stock")
cmds := inference.GetCommands()

t.Run("Single public endpoint", core.Test(&core.TestConfig{
t.Run("Simple deployment", core.Test(&core.TestConfig{
Commands: cmds,
Cmd: "scw inference deployment create node-type=L4 model-name=meta/llama-3-8b-instruct:bf16 accept-eula=true",
Check: core.TestCheckGolden(),
Expand All @@ -21,7 +21,7 @@ func Test_DeploymentCreate(t *testing.T) {

t.Run("Deployment with wait flag", core.Test(&core.TestConfig{
Commands: cmds,
Cmd: "scw inference deployment create model-name=meta/llama-2-7b-chat:fp16 node-type=L4 accept-eula=true -w",
Cmd: "scw inference deployment create node-type=L4 model-name=meta/llama-3-8b-instruct:bf16 accept-eula=true --wait",
Check: core.TestCheckGolden(),
AfterFunc: core.ExecAfterCmd("scw inference deployment delete {{ .CmdResult.ID }}"),
}))
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 8625d6ae-7e86-4ffc-99b8-f3cedd2a53a2
Name cli-llm-laughing-wescoff
ProjectID 894cc948-1194-4357-9320-57cefcb7b0e5
Status ready
NodeType L4
Size 1
MinSize 1
MaxSize 1
ModelName meta/llama-2-7b-chat:fp16
CreatedAt few seconds ago
UpdatedAt few seconds ago
Region fr-srr
🎲🎲🎲 EXIT CODE: 1 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Resource out of stock 'L4'

Endpoints:
ID URL DISABLE AUTH
49609c7e-e93e-4fc4-b800-0b7a2204f7ac https://8625d6ae-7e86-4ffc-99b8-f3cedd2a53a2.ifr.fr-srr.scw.cloud false
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
Hint:
Try again later :-)
🟥🟥🟥 JSON STDERR 🟥🟥🟥
{
"id": "8625d6ae-7e86-4ffc-99b8-f3cedd2a53a2",
"name": "cli-llm-laughing-wescoff",
"project_id": "894cc948-1194-4357-9320-57cefcb7b0e5",
"status": "ready",
"tags": [],
"node_type": "L4",
"endpoints": [
{
"id": "49609c7e-e93e-4fc4-b800-0b7a2204f7ac",
"url": "https://8625d6ae-7e86-4ffc-99b8-f3cedd2a53a2.ifr.fr-srr.scw.cloud",
"public_access": {},
"disable_auth": false
}
],
"size": 1,
"min_size": 1,
"max_size": 1,
"error_message": null,
"model_name": "meta/llama-2-7b-chat:fp16",
"created_at": "1970-01-01T00:00:00.0Z",
"updated_at": "1970-01-01T00:00:00.0Z",
"region": "fr-srr"
"message": "resource out of stock 'L4'",
"error": {
"resource": "L4"
},
"hint": "Try again later :-)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
version: 1
interactions:
- request:
body: '{"id":"d76467d6-ab64-4a28-be5e-5e4c7c72c826","name":"cli-llm-gallant-euler","project_id":"d3520a52-2c75-4ba0-bda8-82dd087f07f2","status":"creating","tags":[],"node_type":"L4","endpoints":[{"id":"c1e652a2-349e-4be0-86c1-2835f2a8f4bc","url":"https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud","public_access":{},"disable_auth":false}],"size":0,"min_size":1,"max_size":1,"error_message":null,"model_name":"meta/llama-3-8b-instruct:bf16","created_at":"2024-05-28T13:26:57.601436Z","updated_at":null,"region":"fr-par"}'
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.2; darwin; amd64) cli-e2e-test
url: https://api.scaleway.com/llm-inference/v1beta1/regions/fr-par/deployments
method: POST
response:
body: '{"id":"d76467d6-ab64-4a28-be5e-5e4c7c72c826","name":"cli-llm-gallant-euler","project_id":"d3520a52-2c75-4ba0-bda8-82dd087f07f2","status":"creating","tags":[],"node_type":"L4","endpoints":[{"id":"c1e652a2-349e-4be0-86c1-2835f2a8f4bc","url":"https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud","public_access":{},"disable_auth":false}],"size":0,"min_size":1,"max_size":1,"error_message":null,"model_name":"meta/llama-3-8b-instruct:bf16","created_at":"2024-05-28T13:26:57.601436Z","updated_at":null,"region":"fr-par"}'
headers:
Content-Length:
- "529"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Tue, 28 May 2024 13:26:57 GMT
Server:
- Scaleway API Gateway (fr-par-1;edge02)
Strict-Transport-Security:
- max-age=63072000
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
X-Request-Id:
- 07cb539e-e4ad-4252-ab5f-16245230d431
status: 200 OK
code: 200
duration: ""
- request:
body: '{"id":"d76467d6-ab64-4a28-be5e-5e4c7c72c826","name":"cli-llm-gallant-euler","project_id":"d3520a52-2c75-4ba0-bda8-82dd087f07f2","status":"deleting","tags":[],"node_type":"L4","endpoints":[{"id":"c1e652a2-349e-4be0-86c1-2835f2a8f4bc","url":"https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud","public_access":{},"disable_auth":false}],"size":0,"min_size":1,"max_size":1,"error_message":null,"model_name":"meta/llama-3-8b-instruct:bf16","created_at":"2024-05-28T13:26:57.601436Z","updated_at":"2024-05-28T13:26:57.956172Z","region":"fr-par"}'
form: {}
headers:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.2; darwin; amd64) cli-e2e-test
url: https://api.scaleway.com/llm-inference/v1beta1/regions/fr-par/deployments/d76467d6-ab64-4a28-be5e-5e4c7c72c826
method: DELETE
response:
body: '{"id":"d76467d6-ab64-4a28-be5e-5e4c7c72c826","name":"cli-llm-gallant-euler","project_id":"d3520a52-2c75-4ba0-bda8-82dd087f07f2","status":"deleting","tags":[],"node_type":"L4","endpoints":[{"id":"c1e652a2-349e-4be0-86c1-2835f2a8f4bc","url":"https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud","public_access":{},"disable_auth":false}],"size":0,"min_size":1,"max_size":1,"error_message":null,"model_name":"meta/llama-3-8b-instruct:bf16","created_at":"2024-05-28T13:26:57.601436Z","updated_at":"2024-05-28T13:26:57.956172Z","region":"fr-par"}'
headers:
Content-Length:
- "554"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Tue, 28 May 2024 13:26:57 GMT
Server:
- Scaleway API Gateway (fr-par-1;edge02)
Strict-Transport-Security:
- max-age=63072000
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
X-Request-Id:
- 9e7a4132-952b-442c-91ba-328397ea80ea
status: 200 OK
code: 200
duration: ""
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 9880f7f0-ed6a-495c-99fa-d4ff4b80e648
Name cli-llm-gifted-liskov
ProjectID 894cc948-1194-4357-9320-57cefcb7b0e5
ID d76467d6-ab64-4a28-be5e-5e4c7c72c826
Name cli-llm-gallant-euler
ProjectID d3520a52-2c75-4ba0-bda8-82dd087f07f2
Status creating
NodeType L4
Size 0
MinSize 1
MaxSize 1
ModelName meta/llama-3-8b-instruct:bf16
CreatedAt few seconds ago
Region fr-srr
Region fr-par

Endpoints:
ID URL DISABLE AUTH
eefe321d-9a57-4388-bc37-5ecc3b94fb0e https://9880f7f0-ed6a-495c-99fa-d4ff4b80e648.ifr.fr-srr.scw.cloud false
c1e652a2-349e-4be0-86c1-2835f2a8f4bc https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud false
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "9880f7f0-ed6a-495c-99fa-d4ff4b80e648",
"name": "cli-llm-gifted-liskov",
"project_id": "894cc948-1194-4357-9320-57cefcb7b0e5",
"id": "d76467d6-ab64-4a28-be5e-5e4c7c72c826",
"name": "cli-llm-gallant-euler",
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2",
"status": "creating",
"tags": [],
"node_type": "L4",
"endpoints": [
{
"id": "eefe321d-9a57-4388-bc37-5ecc3b94fb0e",
"url": "https://9880f7f0-ed6a-495c-99fa-d4ff4b80e648.ifr.fr-srr.scw.cloud",
"id": "c1e652a2-349e-4be0-86c1-2835f2a8f4bc",
"url": "https://d76467d6-ab64-4a28-be5e-5e4c7c72c826.ifr.fr-par.scw.cloud",
"public_access": {},
"disable_auth": false
}
Expand All @@ -38,5 +38,5 @@ eefe321d-9a57-4388-bc37-5ecc3b94fb0e https://9880f7f0-ed6a-495c-99fa-d4ff4b80e6
"model_name": "meta/llama-3-8b-instruct:bf16",
"created_at": "1970-01-01T00:00:00.0Z",
"updated_at": null,
"region": "fr-srr"
"region": "fr-par"
}

This file was deleted.

Loading

0 comments on commit 8b87a25

Please sign in to comment.