Predict on known inputs. Args: inputs: input examples **kw: unused Returns: predictions Raises: KeyError if input not recognized
(self, inputs: Iterable[JsonDict], **kw)
| 89 | return list(self.predict(inputs)) |
| 90 | |
| 91 | def predict(self, inputs: Iterable[JsonDict], **kw) -> Iterator[JsonDict]: |
| 92 | """Predict on known inputs. |
| 93 | |
| 94 | Args: |
| 95 | inputs: input examples |
| 96 | **kw: unused |
| 97 | |
| 98 | Returns: |
| 99 | predictions |
| 100 | |
| 101 | Raises: |
| 102 | KeyError if input not recognized |
| 103 | """ |
| 104 | # Implement predict() directly, since there's no need to batch. |
| 105 | return map(self._predict_single, inputs) |
no outgoing calls