Skip to content

Commit

Permalink
fix: typos in examples-go (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phelan164 committed Feb 21, 2022
1 parent 91931e0 commit cb94c9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples-go/deploy-model/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func main() {

uploadResp, err := uploadStream.CloseAndRecv()
if err != nil {
log.Fatalf("errored while copying from file to buf: %v", err)
log.Fatalf("there is an error while creating model: %v", err)
}
log.Printf("model has been created, the response is: %+v", uploadResp)

Expand Down
10 changes: 5 additions & 5 deletions examples-go/test-model/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

func main() {
serverAddress := flag.String("address", "localhost:8445", "the server address")
testIamgePath := flag.String("test-image", "./dog.jpg", "the test image that are going to be sent")
testIamgePath := flag.String("test-image", "./dog.jpg", "the test image that are going to be sent for prediction")
modelName := flag.String("model-name", "", "the name of the model for creating pipeline's recipe")
modelVersion := flag.Int("model-version", 1, "the version of the model for creating pipeline's recipe")
flag.Parse()
Expand Down Expand Up @@ -58,7 +58,7 @@ func main() {
break
}

log.Fatalf("errored while copying from file to buf: %s", errRead.Error())
log.Fatalf("there is an error while copying from file to buf: %s", errRead.Error())
}
if firstChunk {
err = predictStream.Send(&modelPB.PredictModelRequest{
Expand All @@ -67,22 +67,22 @@ func main() {
Content: buf[:n],
})
if err != nil {
log.Fatalf("cfailed to send data via streame: %v", err)
log.Fatalf("failed to send data via streame: %v", err)
}
firstChunk = false
} else {
err = predictStream.Send(&modelPB.PredictModelRequest{
Content: buf[:n],
})
if err != nil {
log.Fatalf("cfailed to send data via streame: %v", err)
log.Fatalf("failed to send data via streame: %v", err)
}
}
}

predictRes, err := predictStream.CloseAndRecv()
if err != nil {
log.Fatalf("error when triggering predict: %v", err)
log.Fatalf("there is an error when triggering predict: %v", err)
}

predictResult, err := json.Marshal(predictRes)
Expand Down

0 comments on commit cb94c9f

Please sign in to comment.