CLI Simplification (#449)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-01-17 23:00:33 +01:00
committed by GitHub
parent 454191bd4b
commit 453b5f259a
16 changed files with 218 additions and 132 deletions

View File

@ -160,7 +160,7 @@ class BasePredictor:
return list(chain(*list(self.stream_inference(source, model, verbose)))) # merge list of Result into one
def predict_cli(self):
# Method used for cli prediction. It uses always generator as outputs as not required by cli mode
# Method used for CLI prediction. It uses always generator as outputs as not required by CLI mode
gen = self.stream_inference(verbose=True)
for _ in gen: # running CLI inference without accumulating any outputs (do not modify)
pass