Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbenayoun committed Dec 12, 2024
1 parent b947760 commit 301bbcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions optimum/executorchruntime/modeling_executorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import warnings
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING, List, Optional, Union
from typing import List, Optional, Union

import torch
from executorch.extension.pybindings.portable_lib import (
Expand All @@ -35,10 +35,6 @@
from ..modeling_base import OptimizedModel


if TYPE_CHECKING:
from transformers import PretrainedConfig


logger = logging.getLogger(__name__)


Expand Down
6 changes: 3 additions & 3 deletions optimum/onnxruntime/runs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def __init__(self, run_config):
model_class = FeaturesManager.get_model_class_for_feature(get_autoclass_name(self.task))
self.torch_model = model_class.from_pretrained(run_config["model_name_or_path"])

self.return_body["model_type"] = (
self.torch_model.config.model_type
) # return_body is initialized in parent class
self.return_body[
"model_type"
] = self.torch_model.config.model_type # return_body is initialized in parent class

def _launch_time(self, trial):
batch_size = trial.suggest_categorical("batch_size", self.batch_sizes)
Expand Down

0 comments on commit 301bbcf

Please sign in to comment.