Skip to content

Commit e89752c

Browse files
lint
1 parent 314eaea commit e89752c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

bundle/direct/dresources/experiment.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func (*ResourceExperiment) PrepareState(input *resources.MlflowExperiment) *ml.C
2525
Name: input.Name,
2626
ArtifactLocation: input.ArtifactLocation,
2727
Tags: input.Tags,
28+
ForceSendFields: filterFields[ml.CreateExperiment](input.ForceSendFields),
2829
}
2930
}
3031

@@ -55,10 +56,11 @@ func (r *ResourceExperiment) DoCreate(ctx context.Context, state *ml.CreateExper
5556
return result.ExperimentId, nil
5657
}
5758

58-
func (r *ResourceExperiment) DoUpdate(ctx context.Context, id string, state *ml.CreateExperiment) error {
59+
func (r *ResourceExperiment) DoUpdate(ctx context.Context, id string, config *ml.CreateExperiment) error {
5960
updateReq := ml.UpdateExperiment{
60-
ExperimentId: id,
61-
NewName: state.Name,
61+
ExperimentId: id,
62+
NewName: config.Name,
63+
ForceSendFields: filterFields[ml.UpdateExperiment](config.ForceSendFields),
6264
}
6365

6466
err := r.client.Experiments.UpdateExperiment(ctx, updateReq)

libs/testserver/experiments.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/json"
55
"fmt"
66
"net/http"
7+
"strconv"
78

89
"github.com/databricks/databricks-sdk-go/service/ml"
910
)
@@ -44,7 +45,7 @@ func (s *FakeWorkspace) ExperimentCreate(req Request) Response {
4445
},
4546
}
4647

47-
experimentId := fmt.Sprintf("%d", len(s.Experiments)+1000)
48+
experimentId := strconv.Itoa(len(s.Experiments) + 1000)
4849

4950
// Create the experiment
5051
exp := ml.Experiment{

0 commit comments

Comments
 (0)