Skip to content

Commit b252038

Browse files
committed
Ruff format
1 parent ad9b639 commit b252038

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

optimum/executorch/modeling.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import logging
1818
import os
19-
import tempfile
2019
import shutil
2120
from abc import ABC, abstractmethod
2221
from pathlib import Path
@@ -120,12 +119,12 @@ def _cleanup_temp_resources(self):
120119
# It's a TemporaryDirectory object
121120
logging.info(f"Cleaning up temporary directory: {self._temp_dir.name}")
122121
self._temp_dir.cleanup()
123-
logging.info(f"Temporary directory cleanup completed")
122+
logging.info("Temporary directory cleanup completed")
124123
elif isinstance(self._temp_dir, (str, Path)):
125124
# It's a path
126125
logging.info(f"Cleaning up temporary path: {self._temp_dir}")
127126
shutil.rmtree(self._temp_dir, ignore_errors=True)
128-
logging.info(f"Temporary path cleanup completed")
127+
logging.info("Temporary path cleanup completed")
129128
except Exception as e:
130129
# Log cleanup errors for debugging
131130
logging.warning(f"Error during temp directory cleanup: {e}")

optimum/exporters/executorch/integrations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
)
2929
from transformers.generation.configuration_utils import GenerationConfig
3030

31-
from executorch import version as executorch_version
3231
from optimum.executorch.attentions.custom_sdpa import get_custom_sdpa_for_ring_kv_cache
3332
from optimum.utils.import_utils import is_transformers_version
3433

optimum/exporters/executorch/quantization.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
from typing import Optional
1717

1818
import torch
19-
import torchao
20-
from packaging.version import parse
2119

2220

2321
def quantize_model_(

0 commit comments

Comments
 (0)