Skip to content

Commit a979d3a

Browse files
committed
[fix] typo change from ModelGeToModel to ModelGetToModel
1 parent 46fd06e commit a979d3a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

redisai/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (c *Client) ModelGet(keyName string) (data []interface{}, err error) {
104104
return
105105
}
106106

107-
func (c *Client) ModelGeToModel(keyName string, modelIn ModelInterface) (err error) {
107+
func (c *Client) ModelGetToModel(keyName string, modelIn ModelInterface) (err error) {
108108
args := modelGetFlatArgs(keyName)
109109
var reply interface{}
110110
reply, err = c.DoOrSend("AI.MODELGET", args, nil)

redisai/commands_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -455,17 +455,17 @@ func TestCommand_ModelSet(t *testing.T) {
455455
}
456456

457457
func TestCommand_ModelGet(t *testing.T) {
458-
keyModel1 := "test:ModelGeToModel:1"
458+
keyModel1 := "test:ModelGetToModel:1"
459459
keyModelUnexistent1 := "test:ModelGetUnexistent:1"
460460
data, err := ioutil.ReadFile("./../tests/test_data/creditcardfraud.pb")
461461
if err != nil {
462-
t.Errorf("Error preparing for ModelGeToModel(), while issuing ModelSet. error = %v", err)
462+
t.Errorf("Error preparing for ModelGetToModel(), while issuing ModelSet. error = %v", err)
463463
return
464464
}
465465
simpleClient := createTestClient()
466466
err = simpleClient.ModelSet(keyModel1, BackendTF, DeviceCPU, data, []string{"transaction", "reference"}, []string{"output"})
467467
if err != nil {
468-
t.Errorf("Error preparing for ModelGeToModel(), while issuing ModelSet. error = %v", err)
468+
t.Errorf("Error preparing for ModelGetToModel(), while issuing ModelSet. error = %v", err)
469469
return
470470
}
471471
type args struct {
@@ -487,22 +487,22 @@ func TestCommand_ModelGet(t *testing.T) {
487487
client := createTestClient()
488488
gotData, err := client.ModelGet(tt.args.name)
489489
if (err != nil) != tt.wantErr {
490-
t.Errorf("ModelGeToModel() error = %v, wantErr %v", err, tt.wantErr)
490+
t.Errorf("ModelGetToModel() error = %v, wantErr %v", err, tt.wantErr)
491491
return
492492
}
493493
if !tt.wantErr {
494494
if !reflect.DeepEqual(gotData[0], tt.wantBackend) {
495-
t.Errorf("ModelGeToModel() gotBackend = %v, want %v. gotBackend Type %v, want Type %v.", gotData[0], tt.wantBackend, reflect.TypeOf(gotData[0]), reflect.TypeOf(tt.wantBackend))
495+
t.Errorf("ModelGetToModel() gotBackend = %v, want %v. gotBackend Type %v, want Type %v.", gotData[0], tt.wantBackend, reflect.TypeOf(gotData[0]), reflect.TypeOf(tt.wantBackend))
496496
}
497497
}
498498
if !tt.wantErr {
499499
if !reflect.DeepEqual(gotData[1], tt.wantDevice) {
500-
t.Errorf("ModelGeToModel() gotDevice = %v, want %v. gotDevice Type %v, want Type %v.", gotData[1], tt.wantDevice, reflect.TypeOf(gotData[1]), reflect.TypeOf(tt.wantDevice))
500+
t.Errorf("ModelGetToModel() gotDevice = %v, want %v. gotDevice Type %v, want Type %v.", gotData[1], tt.wantDevice, reflect.TypeOf(gotData[1]), reflect.TypeOf(tt.wantDevice))
501501
}
502502
}
503503
if !tt.wantErr {
504504
if !reflect.DeepEqual(gotData[2], tt.wantData) {
505-
t.Errorf("ModelGeToModel() gotData = %v, want %v. gotData Type %v, want Type %v.", gotData[2], tt.wantData, reflect.TypeOf(gotData[2]), reflect.TypeOf(tt.wantData))
505+
t.Errorf("ModelGetToModel() gotData = %v, want %v. gotData Type %v, want Type %v.", gotData[2], tt.wantData, reflect.TypeOf(gotData[2]), reflect.TypeOf(tt.wantData))
506506
}
507507
}
508508

@@ -616,7 +616,7 @@ func TestCommand_FullFromModelFlow(t *testing.T) {
616616
assert.Nil(t, err)
617617
err = client.ModelSetFromModel("financialNet", model)
618618
model1 := implementations.NewEmptyModel()
619-
err = client.ModelGeToModel("financialNet", model1)
619+
err = client.ModelGetToModel("financialNet", model1)
620620
assert.Equal(t, model.Device(), model1.Device())
621621
assert.Nil(t, err)
622622
model1.SetInputs([]string{"transaction", "reference"})

0 commit comments

Comments
 (0)