Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Sep 8, 2023
1 parent 1a7e27d commit 0b0b7d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions optimum/intel/openvino/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class PreTrainedModel(OptimizedModel):
""",
)
class OVBaseModel(PreTrainedModel):
_AUTOMODELS_TO_TASKS = {cls_name: task for task, cls_name in TasksManager._TASKS_TO_AUTOMODELS.items()}
auto_model_class = None
export_feature = None

Expand Down Expand Up @@ -391,13 +390,6 @@ def _ensure_supported_device(self, device: str = None):
def forward(self, *args, **kwargs):
raise NotImplementedError

@classmethod
def _auto_model_to_task(cls, auto_model_class):
"""
Get the task corresponding to a class (for example AutoModelForXXX in transformers).
"""
return cls._AUTOMODELS_TO_TASKS[auto_model_class.__name__]

def can_generate(self) -> bool:
"""
Returns whether this model can generate sequences with `.generate()`.
Expand Down
1 change: 0 additions & 1 deletion tests/openvino/test_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def callback_fn(step: int, timestep: int, latents: np.ndarray) -> None:
self.assertEqual(callback_fn.number_of_steps, inputs["num_inference_steps"])

@parameterized.expand(SUPPORTED_ARCHITECTURES)
@require_diffusers
def test_shape(self, model_arch: str):
height, width, batch_size = 128, 64, 1
pipeline = self.MODEL_CLASS.from_pretrained(MODEL_NAMES[model_arch], export=True)
Expand Down

0 comments on commit 0b0b7d3

Please sign in to comment.