Skip to content

Commit

Permalink
do not use TaskManager for getting task constant
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Dec 4, 2024
1 parent 3181535 commit e26f516
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions optimum/intel/openvino/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
XVectorOutput,
)

from optimum.exporters import TasksManager

from ..utils.import_utils import is_timm_available, is_timm_version
from .modeling_base import OVBaseModel
from .utils import _is_timm_ov_dir
Expand Down Expand Up @@ -695,7 +693,7 @@ class OVModelForCTC(OVModel):
"""

auto_model_class = AutoModelForCTC
export_feature = TasksManager.infer_task_from_model(auto_model_class)
export_feature = "automatic-speech-recognition"

@add_start_docstrings_to_model_forward(
AUDIO_INPUTS_DOCSTRING.format("batch_size, sequence_length")
Expand Down Expand Up @@ -775,7 +773,7 @@ class OVModelForAudioXVector(OVModel):
"""

auto_model_class = AutoModelForAudioXVector
export_feature = TasksManager.infer_task_from_model(auto_model_class)
export_feature = "audio-xvector"

@add_start_docstrings_to_model_forward(
AUDIO_INPUTS_DOCSTRING.format("batch_size, sequence_length")
Expand Down Expand Up @@ -851,7 +849,7 @@ class OVModelForAudioFrameClassification(OVModel):
"""

auto_model_class = AutoModelForAudioFrameClassification
export_feature = TasksManager.infer_task_from_model(auto_model_class)
export_feature = "audio-frame-classification"

@add_start_docstrings_to_model_forward(
AUDIO_INPUTS_DOCSTRING.format("batch_size, sequence_length")
Expand Down

0 comments on commit e26f516

Please sign in to comment.