File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,8 @@ func (s *Scorch) getInternal(key []byte) ([]byte, error) {
565565
566566 switch string (key ) {
567567 case string (util .BoltTrainCompleteKey ):
568+ fallthrough
569+ case string (util .BoltTrainedSamplesKey ):
568570 return s .trainer .getInternal (key )
569571 }
570572 return nil , nil
Original file line number Diff line number Diff line change @@ -248,9 +248,13 @@ func (t *vectorTrainer) train(batch *index.Batch) error {
248248 }
249249
250250 var seg segment.Segment
251+ var fin bool
252+ var err error
251253 trainComplete := batch .InternalOps [string (util .BoltTrainCompleteKey )]
252-
253- fin , err := strconv .ParseBool (string (trainComplete ))
254+ if trainComplete == nil {
255+ trainComplete = []byte ("false" )
256+ }
257+ fin , err = strconv .ParseBool (string (trainComplete ))
254258 if err != nil {
255259 return fmt .Errorf ("error parsing train complete: %v" , err )
256260 }
You can’t perform that action at this time.
0 commit comments