Skip to content

Commit

Permalink
Check for "vector" predicted field before record sensor compute. (#3754)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyolight authored Aug 8, 2017
1 parent d809fb1 commit c2967d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nupic/regions/record_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,10 @@ def compute(self, inputs, outputs):
self.encoder.encodeIntoArray(data, outputs["dataOut"])

# If there is a field to predict, set bucketIdxOut and actValueOut.
if self.predictedField is not None:
# There is a special case where a predicted field might be a vector, as in
# the CoordinateEncoder. Since this encoder does not provide bucket
# indices for prediction, we will ignore it.
if self.predictedField is not None and self.predictedField != "vector":
allEncoders = list(self.encoder.encoders)
if self.disabledEncoder is not None:
allEncoders.extend(self.disabledEncoder.encoders)
Expand Down

0 comments on commit c2967d9

Please sign in to comment.