Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a way to check if streaming is supported #2518

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

zachgk
Copy link
Contributor

@zachgk zachgk commented Apr 10, 2023

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@zachgk zachgk requested review from frankfliu and a team as code owners April 10, 2023 17:56
@@ -49,6 +49,7 @@ public void testSequential() throws TranslateException {

try (Predictor<Double, DoubleStream> predictor =
model.newPredictor(new TestTranslator())) {
Assert.assertTrue(predictor.supportsStreaming());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does python engine support streaming by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really follow this path of using predictor.streamingPredict(). This is more for Java-side streaming. Since the Python engine internally handles the use of ChunkedByteSupplier, I'm not sure if it is worth it to unify the paths.

@zachgk zachgk merged commit 07fb2dd into deepjavalibrary:master Apr 10, 2023
@zachgk zachgk deleted the streamingSupported branch April 10, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants