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

Write Detailed Version To XML #372

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion python/openvino_tokenizers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
from functools import lru_cache
from typing import Any, Dict, Optional, Sequence, Tuple, Union

import openvino
from openvino import Model, Type
from openvino.preprocess import PrePostProcessor
from openvino.runtime import opset12 as opset

from .__version__ import __version__ as openvino_tokenizers_version
from .constants import (
LOGITS_OUTPUT_NAME,
ORIGINAL_TOKENIZER_CLASS_NAME,
Expand Down Expand Up @@ -244,7 +246,11 @@ def update_rt_info_with_environment(ov_tokenizer: Model) -> None:
:param ov_tokenizer: Thes OpenVINO tokenizer model to update.
:type ov_tokenizer: openvino.Model
"""
packages = ["openvino_tokenizers", "transformers", "tiktoken", "sentencepiece", "openvino", "tokenizers"]
ov_tokenizer.set_rt_info(openvino.get_version(), f"openvino_version")
ov_tokenizer.set_rt_info(openvino_tokenizers_version, f"openvino_tokenizers_version")

packages = ["transformers", "tiktoken", "sentencepiece", "tokenizers"]

for name in packages:
version = get_package_version(name)
if version is not None:
Expand Down
Loading