Skip to content

Commit

Permalink
Add deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
as-suvorov committed Jan 10, 2025
1 parent 445ce5a commit 5bdd695
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,9 @@ jobs:
python -m pip install . --verbose --find-links ${env:OV_INSTALL_DIR}/wheels
python -m pip install ./tools/who_what_benchmark --find-links ${env:OV_INSTALL_DIR}/wheels
# will install transformers 4.46.3 version
# transformers 4.46.3 will enable return_timestamps tests
# this check enabled for windows only. Ticket: 160205.
python -m pip install git+https://github.com/huggingface/optimum-intel.git@753f84db6e0966580eb9eaa74a808213be730631
python -m pip install transformers==4.46.3
python -m pytest -v ./tests/python_tests/test_whisper_pipeline.py -k "not test_smoke"
Expand Down
17 changes: 17 additions & 0 deletions src/cpp/src/logger.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (C) 2025 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once
#include <iostream>
#include <string>

namespace ov::genai {

class Logger {
public:
static void warn(std::string message) {
std::cout << "[WARN] " << message << '\n';
};
};

} // namespace ov::genai
5 changes: 5 additions & 0 deletions src/cpp/src/whisper/models/with_past_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <regex>

#include "logger.hpp"
#include "utils.hpp"

namespace {
Expand Down Expand Up @@ -40,6 +41,10 @@ namespace ov::genai {
WhisperWithPastDecoder::WhisperWithPastDecoder(const std::filesystem::path& models_path,
const std::string& device,
const ov::AnyMap& properties) {
Logger::warn("Whisper decoder models with past is deprecated. Support will be removed in 2026.0.0 release.\n"
"To obtain stateful decoder model use latest `optimum-intel` package:\n"
"pip install optimum-intel@git+https://github.com/huggingface/optimum-intel.git\n"
"optimum-cli export openvino --trust-remote-code --model openai/whisper-tiny whisper-tiny");
ov::Core core = utils::singleton_core();

auto compiled_model = core.compile_model(models_path / "openvino_decoder_model.xml", device, properties);
Expand Down

0 comments on commit 5bdd695

Please sign in to comment.