Skip to content

Commit 40a7553

Browse files
committed
fix linter
1 parent a60b04a commit 40a7553

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

internal/services/inference/custom_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ func ResourceCustomModelCreate(ctx context.Context, d *schema.ResourceData, m in
142142
modelSource := &inference.ModelSource{
143143
URL: d.Get("url").(string),
144144
}
145+
145146
if secret, ok := d.GetOk("secret"); ok {
146147
secretStr := secret.(string)
147148
modelSource.Secret = &secretStr

internal/services/inference/custom_model_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ func TestAccCustomModel_DeployModelOnServer(t *testing.T) {
9797
Check: resource.ComposeTestCheckFunc(
9898
testAccCheckDeploymentExists(tt, "scaleway_inference_deployment.main"),
9999
resource.TestCheckResourceAttr("scaleway_inference_deployment.main", "model_name", modelName),
100-
resource.TestCheckTypeSetElemAttrPair("scaleway_inference_deployment.main", "model_id", "scaleway_inference_custom_model.test", "id"),
101100
),
102101
},
103102
},

internal/services/inference/testfuncs/sweep.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func testSweepCustomModel(_ string) error {
5858
inferenceAPI := inference.NewAPI(scwClient)
5959

6060
logging.L.Debugf("sweeper: destroying the inference models in (%s)", region)
61+
6162
listModels, err := inferenceAPI.ListModels(&inference.ListModelsRequest{
6263
Region: region,
6364
}, scw.WithAllPages())

internal/services/inference/types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,26 @@ func flattenNodeSupport(nodesSupportInfo []*inference.ModelSupportInfo) []interf
1313
if nodeSupport == nil {
1414
continue
1515
}
16+
1617
for _, node := range nodeSupport.Nodes {
1718
flattenQuantization := make([]interface{}, 0, len(node.Quantizations))
19+
1820
for _, quantization := range node.Quantizations {
1921
if quantization == nil {
2022
continue
2123
}
24+
2225
flattenQuantization = append(flattenQuantization, map[string]interface{}{
2326
"quantization_bits": quantization.QuantizationBits,
2427
"allowed": quantization.Allowed,
2528
"max_context_size": quantization.MaxContextSize,
2629
})
2730
}
31+
2832
result = append(result, map[string]interface{}{
2933
"node_type_name": node.NodeTypeName,
3034
"quantization": flattenQuantization,
3135
})
32-
3336
}
3437
}
3538
return result

0 commit comments

Comments
 (0)