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

Stubs files for genai bindings #1158

Merged
merged 13 commits into from
Nov 12, 2024
Merged

Conversation

popovaan
Copy link
Contributor

@popovaan popovaan commented Nov 6, 2024

CVS-156607

@github-actions github-actions bot added category: text to image Text 2 image pipeline category: visual language Visual language pipeline category: continuous batching Continuous batching category: LLM LLM pipeline (stateful, static) category: whisper Whisper pipeline category: sampling Sampling / Decoding algorithms category: tokenizers Tokenizer class or submodule update category: Python API Python API for GenAI labels Nov 6, 2024
def __init__(self, models_path: str, scheduler_config: SchedulerConfig, device: str, properties: dict[str, typing.Any] = {}, tokenizer_properties: dict[str, typing.Any] = {}) -> None:
...
@typing.overload
def __init__(self, models_path: str, tokenizer: Tokenizer, scheduler_config: SchedulerConfig, device: str, properties: dict[str, typing.Any] = {}) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

properties are not aligned with other pipelines where we have kwargs.

Maybe we can drop tokenizer_properties (if they are not used anywhere) and use kwargs only

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think tokenizer_properties are needed for OVMS to set throughput hint

src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
@ilya-lavrenov ilya-lavrenov self-assigned this Nov 6, 2024
@ilya-lavrenov ilya-lavrenov added this to the 2025.0 milestone Nov 6, 2024
@github-actions github-actions bot added the category: GenAI C++ API Changes in GenAI C++ public headers label Nov 12, 2024
@popovaan popovaan marked this pull request as ready for review November 12, 2024 12:50
from openvino_genai.py_openvino_genai import draft_model
import os as os
from . import py_openvino_genai
__all__ = ['Adapter', 'AdapterConfig', 'AggregationMode', 'AutoencoderKL', 'CLIPTextModel', 'CLIPTextModelWithProjection', 'CacheEvictionConfig', 'ChunkStreamerBase', 'ContinuousBatchingPipeline', 'CppStdGenerator', 'DecodedResults', 'EncodedResults', 'GenerationConfig', 'GenerationResult', 'Generator', 'ImageGenerationConfig', 'LLMPipeline', 'PerfMetrics', 'RawPerfMetrics', 'Scheduler', 'SchedulerConfig', 'StopCriteria', 'StreamerBase', 'Text2ImagePipeline', 'TokenizedInputs', 'Tokenizer', 'UNet2DConditionModel', 'VLMPipeline', 'WhisperGenerationConfig', 'WhisperPipeline', 'draft_model', 'openvino', 'os', 'py_openvino_genai']
Copy link
Contributor

Choose a reason for hiding this comment

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

should we avoid providing 'os' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it is bybind11-stubgen bug, mypy-stubgen doesn't export os.
Commited mypy-stubgen output for comparison: 1234257

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it's done because of os.PathLike

In general, it's not a problem as os is standard module. I think we can merge pybind11-stubgen output as start point.

src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
src/python/openvino_genai/py_openvino_genai.pyi Outdated Show resolved Hide resolved
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.

Let's commit pybind11-stubgen output

@popovaan
Copy link
Contributor Author

Let's commit pybind11-stubgen output

Done.

@ilya-lavrenov ilya-lavrenov added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
@ilya-lavrenov ilya-lavrenov merged commit fbd6e68 into openvinotoolkit:master Nov 12, 2024
52 checks passed
@ilya-lavrenov ilya-lavrenov added the port to LTS PR needs to be ported to LTS label Nov 19, 2024
ilya-lavrenov pushed a commit to ilya-lavrenov/openvino.genai that referenced this pull request Dec 3, 2024
@ilya-lavrenov ilya-lavrenov mentioned this pull request Dec 3, 2024
ilya-lavrenov added a commit that referenced this pull request Dec 4, 2024
      - #1158
- #1178
- #1214
- #1243
- #1253
- #1259
- #1266
- #1271
- #1278
- #1280
- #1284
- e4a86f6
- #1246
- #958

---------

Co-authored-by: Anastasiia Pnevskaia <[email protected]>
Co-authored-by: Helena Kloosterman <[email protected]>
Co-authored-by: Vladimir Zlobin <[email protected]>
Co-authored-by: Dmitry Matveev <[email protected]>
Co-authored-by: Anna Likholat <[email protected]>
Co-authored-by: Alina Kladieva <[email protected]>
@ilya-lavrenov ilya-lavrenov removed the port to LTS PR needs to be ported to LTS label Dec 4, 2024
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: Python API Python API for GenAI category: sampling Sampling / Decoding algorithms category: text to image Text 2 image pipeline category: tokenizers Tokenizer class or submodule update category: visual language Visual language pipeline category: whisper Whisper pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants