r'''Predict method of estimator in HB.
(
self, input_fn,
predict_keys=None,
hooks=None,
checkpoint_path=None,
yield_single_examples=True)
| 1392 | } |
| 1393 | |
| 1394 | def predict( |
| 1395 | self, input_fn, |
| 1396 | predict_keys=None, |
| 1397 | hooks=None, |
| 1398 | checkpoint_path=None, |
| 1399 | yield_single_examples=True): |
| 1400 | r'''Predict method of estimator in HB. |
| 1401 | ''' |
| 1402 | _estimator_lib._estimator_api_gauge.get_cell( |
| 1403 | 'predict').set(True) # pylint: disable=protected-access |
| 1404 | if self.config.cluster_spec: |
| 1405 | if estimator_training.should_run_distribute_coordinator(self.config): |
| 1406 | raise ValueError( |
| 1407 | 'Running `evaluate` with Distribute Coordinator ' |
| 1408 | 'not supported.') |
| 1409 | if not _is_google_env(): |
| 1410 | start_std_server(self.config) |
| 1411 | |
| 1412 | return self._actual_predict( |
| 1413 | input_fn, |
| 1414 | predict_keys=predict_keys, |
| 1415 | hooks=hooks, |
| 1416 | checkpoint_path=checkpoint_path, |
| 1417 | yield_single_examples=yield_single_examples) |
| 1418 | |
| 1419 | return HorovodEstimator |
| 1420 |