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

Add a choice of how to end streaming from callback: STOP or CANCEL #1476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbalandi
Copy link
Contributor

@sbalandi sbalandi commented Jan 3, 2025

No description provided.

@github-actions github-actions bot added category: visual language Visual language pipeline category: continuous batching Continuous batching category: LLM LLM pipeline (stateful, static) category: speculative decoding Speculative decoding category: GenAI C++ API Changes in GenAI C++ public headers no-match-files category: prompt lookup labels Jan 3, 2025
@sbalandi
Copy link
Contributor Author

sbalandi commented Jan 3, 2025

TODO: add CANCEL for ContinuousBatching

@ilya-lavrenov ilya-lavrenov added this to the 2025.0 milestone Jan 4, 2025
@ilya-lavrenov ilya-lavrenov self-assigned this Jan 6, 2025
@sbalandi sbalandi force-pushed the callback branch 5 times, most recently from 454cdd9 to 1592ed0 Compare January 8, 2025 19:38
@github-actions github-actions bot added category: Python API Python API for GenAI category: samples GenAI samples labels Jan 8, 2025
@sbalandi sbalandi force-pushed the callback branch 3 times, most recently from 10a755b to d18fe16 Compare January 8, 2025 22:19
@sbalandi
Copy link
Contributor Author

sbalandi commented Jan 8, 2025

TODO: add CANCEL for ContinuousBatching

done

@sbalandi sbalandi marked this pull request as ready for review January 8, 2025 22:43
@sbalandi sbalandi force-pushed the callback branch 3 times, most recently from 2758f6b to 03ca3ce Compare January 9, 2025 21:56
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov left a comment

Choose a reason for hiding this comment

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

Please, add tests for new functionality.

samples/cpp/chat_sample/chat_sample.cpp Outdated Show resolved Hide resolved
src/cpp/include/openvino/genai/generation_handle.hpp Outdated Show resolved Hide resolved
src/python/openvino_genai/__init__.py Show resolved Hide resolved
src/cpp/src/text_callback_streamer.hpp Outdated Show resolved Hide resolved
src/cpp/include/openvino/genai/streamer_base.hpp Outdated Show resolved Hide resolved
src/cpp/include/openvino/genai/streamer_base.hpp Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
@andrei-kochin andrei-kochin modified the milestones: 2025.0, 2025.1 Jan 13, 2025
src/cpp/include/openvino/genai/streamer_base.hpp Outdated Show resolved Hide resolved
src/cpp/src/visual_language/pipeline.cpp Outdated Show resolved Hide resolved

namespace ov {
namespace genai {

enum class StreamerRunningStatus {
UNDEF = 0, // Streaming is not run
RUNNING = 1, // Continue to run of inference
Copy link
Collaborator

Choose a reason for hiding this comment

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

RUNNING and UNDEF seem to be equivalent. In that case you should keep only one of them. Moreover callback should never return UNDEF, so merging them fixes the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it , moved to GenerationStatus

Copy link
Collaborator

Choose a reason for hiding this comment

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

Merging with GenerationStatus allows a callback to return FINISHED and IGNORED which aren't related to this. I'd guess #1476 (comment) was about aligning API but not merging. @ilya-lavrenov, is that so?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@sbalandi sbalandi force-pushed the callback branch 11 times, most recently from 17a9501 to 8975221 Compare January 21, 2025 13:16
@sbalandi sbalandi force-pushed the callback branch 3 times, most recently from 591c81a to 8c6ff44 Compare January 24, 2025 17:31
@github-actions github-actions bot added the category: whisper Whisper pipeline label Jan 24, 2025
@sbalandi sbalandi force-pushed the callback branch 4 times, most recently from cac1834 to 408e4a3 Compare January 27, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: continuous batching Continuous batching category: GenAI C++ API Changes in GenAI C++ public headers category: LLM LLM pipeline (stateful, static) category: prompt lookup category: Python API Python API for GenAI category: samples GenAI samples category: speculative decoding Speculative decoding category: visual language Visual language pipeline category: whisper Whisper pipeline no-match-files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants