Skip to content

Commit 0d0d814

Browse files
Laure-didependabot[bot]scaleway-botjremy42remyleone
authored
feat(inference): add support v1 (#4765)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Scaleway Bot <github@scaleway.com> Co-authored-by: Jonathan R. <jremy@scaleway.com> Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent 5c03926 commit 0d0d814

12 files changed

+122
-120
lines changed

cmd/scw/testdata/test-all-usage-inference-deployment-create-usage.golden

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ USAGE:
88
ARGS:
99
name=<generated> Name of the deployment
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
model-name Name of the model to use
11+
model-id ID of the model to use
1212
[accept-eula] Accept the model's End User License Agreement (EULA).
13-
node-type Name of the node type to use
13+
node-type-name Name of the node type to use
1414
[tags.{index}] List of tags to apply to the deployment
1515
[min-size] Defines the minimum size of the pool
1616
[max-size] Defines the maximum size of the pool
17-
[endpoints.{index}.is-public=false] Will configure your public endpoint if true
18-
[endpoints.{index}.private-network.private-network-id] ID of the Private Network
17+
[endpoints.{index}.private-network.private-network-id]
1918
[endpoints.{index}.disable-auth=false] Disable the authentication on the endpoint.
19+
[quantization.bits] The number of bits each model parameter should be quantized to. The quantization method is chosen based on this value.
2020
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
2121

2222
FLAGS:
2323
-h, --help help for create
24-
-w, --wait wait until the deployment is ready
2524

2625
GLOBAL FLAGS:
2726
-c, --config string The path to the config file

cmd/scw/testdata/test-all-usage-inference-deployment-delete-usage.golden

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ARGS:
1111

1212
FLAGS:
1313
-h, --help help for delete
14-
-w, --wait wait until the deployment is ready
1514

1615
GLOBAL FLAGS:
1716
-c, --config string The path to the config file

cmd/scw/testdata/test-all-usage-inference-deployment-update-usage.golden

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ USAGE:
66
scw inference deployment update <deployment-id ...> [arg=value ...]
77

88
ARGS:
9-
deployment-id ID of the deployment to update
10-
[name] Name of the deployment
11-
[tags.{index}] List of tags to apply to the deployment
12-
[min-size] Defines the new minimum size of the pool
13-
[max-size] Defines the new maximum size of the pool
14-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
9+
deployment-id ID of the deployment to update
10+
[name] Name of the deployment
11+
[tags.{index}] List of tags to apply to the deployment
12+
[min-size] Defines the new minimum size of the pool
13+
[max-size] Defines the new maximum size of the pool
14+
[model-id] Id of the model to set to the deployment
15+
[quantization.bits] The number of bits each model parameter should be quantized to. The quantization method is chosen based on this value.
16+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
1517

1618
FLAGS:
1719
-h, --help help for update

cmd/scw/testdata/test-all-usage-inference-endpoint-create-usage.golden

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ USAGE:
77

88
ARGS:
99
deployment-id ID of the deployment to create the endpoint for
10-
[endpoint.is-public=false] Will configure your public endpoint if true
11-
[endpoint.private-network.private-network-id] ID of the Private Network
10+
[endpoint.private-network.private-network-id]
1211
[endpoint.disable-auth=false] Disable the authentication on the endpoint.
1312
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
1413

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete an existing model from your model library.
4+
5+
USAGE:
6+
scw inference model delete <model-id ...> [arg=value ...]
7+
8+
ARGS:
9+
model-id ID of the model to delete
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
11+
12+
FLAGS:
13+
-h, --help help for delete
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Import a new model to your model library.
4+
5+
USAGE:
6+
scw inference model import [arg=value ...]
7+
8+
ARGS:
9+
name=<generated> Name of the model
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[source.url]
12+
[source.secret]
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
14+
15+
FLAGS:
16+
-h, --help help for import
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-inference-model-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ USAGE:
66
scw inference model <command>
77

88
AVAILABLE COMMANDS:
9+
delete Delete a model
910
get Get a model
11+
import Import a model
1012
list List models
1113

1214
FLAGS:

cmd/scw/testdata/test-all-usage-inference-usage.golden

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
This API allows you to manage your Inference services.
3+
This API allows you to handle your Managed Inference services.
44

55
USAGE:
66
scw inference <command>
77

88
AVAILABLE COMMANDS:
9-
acl Access Control List (ACL) management commands
109
deployment Deployment commands
1110
endpoint Endpoint management commands
1211
model Models commands

cmd/scw/testdata/test-main-usage-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
USAGE:
44
scw <command>
55

6-
AI COMMANDS:
7-
inference This API allows you to manage your Inference services
6+
AVAILABLE COMMANDS:
7+
inference This API allows you to handle your Managed Inference services
88

99
BAREMETAL COMMANDS:
1010
apple-silicon Apple silicon API

commands/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
function "github.com/scaleway/scaleway-cli/v2/internal/namespaces/function/v1beta1"
2626
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/help"
2727
iam "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iam/v1alpha1"
28-
inference "github.com/scaleway/scaleway-cli/v2/internal/namespaces/inference/v1beta1"
28+
inference "github.com/scaleway/scaleway-cli/v2/internal/namespaces/inference/v1"
2929
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/info"
3030
initNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/init"
3131
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1"

0 commit comments

Comments
 (0)