Skip to content

Commit cbd8ac0

Browse files
committed
fix documentation
1 parent 5fc6d9b commit cbd8ac0

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

docs/resources/inference_custom_model.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ page_title: "Scaleway: scaleway_inference_deployment"
77

88
The scaleway_inference_custom_model resource allows you to upload and manage custom inference models in the Scaleway Inference ecosystem. Once registered, a custom model can be used in an scaleway_inference_deployment resource.
99

10-
## Exemple Usage
10+
## Example Usage
1111

1212
### Basic
1313

@@ -58,8 +58,8 @@ resource "scaleway_inference_deployment" "main" {
5858
- `parameter_size_bits` - Size, in bits, of the model parameters.
5959
- `size_bits` - Total size, in bytes, of the model archive.
6060
- `nodes_support` - List of supported node types and their quantization options. Each entry contains:
61-
- `node_type_name` - The type of node supported.
62-
- `quantization` - A list of supported quantization options, including:
63-
- `quantization_bits` - Number of bits used for quantization (e.g., 8, 16).
64-
- `allowed` - Whether this quantization is allowed.
65-
- `max_context_size` - Maximum context length supported by this quantization.
61+
- `node_type_name` - The type of node supported.
62+
- `quantization` - A list of supported quantization options, including:
63+
- `quantization_bits` - Number of bits used for quantization (e.g., 8, 16).
64+
- `allowed` - Whether this quantization is allowed.
65+
- `max_context_size` - Maximum context length supported by this quantization.

internal/services/inference/deployment.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ func ResourceDeployment() *schema.Resource {
5555
Type: schema.TypeString,
5656
Required: true,
5757
Description: "The model id used for the deployment",
58+
ForceNew: true,
59+
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
60+
if old == "" || new == "" {
61+
return false
62+
}
63+
if !scwvalidation.IsUUID(new) {
64+
newID := regional.ExpandID(new).ID
65+
66+
return old == newID
67+
}
68+
69+
return old == new
70+
},
5871
},
5972
"accept_eula": {
6073
Type: schema.TypeBool,

internal/services/inference/helpers_inference.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
const (
1414
defaultInferenceDeploymentTimeout = 80 * time.Minute
1515
defaultDeploymentRetryInterval = 1 * time.Minute
16-
defaultCustomModelTimeout = 40 * time.Minute
16+
defaultCustomModelTimeout = 180 * time.Minute
1717
defaultCustomModelRetryInterval = 1 * time.Minute
1818
)
1919

internal/services/inference/testfuncs/sweep.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func testSweepCustomModel(_ string) error {
7777
return fmt.Errorf("error deleting model in sweeper: %w", err)
7878
}
7979
}
80+
8081
return nil
8182
})
8283
}

internal/services/inference/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ func flattenNodeSupport(nodesSupportInfo []*inference.ModelSupportInfo) []interf
3535
})
3636
}
3737
}
38+
3839
return result
3940
}

0 commit comments

Comments
 (0)