From e0a67496c158a95f3ed4fda442fee28f1ab2b1cb Mon Sep 17 00:00:00 2001 From: Botir Khaltaev Date: Fri, 6 Sep 2024 11:53:52 +0100 Subject: [PATCH] Fix linting issues --- huggingface_pipelines/audio.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/huggingface_pipelines/audio.py b/huggingface_pipelines/audio.py index 8eb0bac..3341653 100644 --- a/huggingface_pipelines/audio.py +++ b/huggingface_pipelines/audio.py @@ -240,16 +240,14 @@ def process_batch(self, batch: Dict[str, Any]) -> Dict[str, Any]: try: for column in self.config.columns: if column not in batch: - logger.warning( - f"Column {column} not found in batch. Skipping.") + logger.warning(f"Column {column} not found in batch. Skipping.") continue audio_inputs = self.collect_valid_audio_inputs(batch[column]) if not audio_inputs: - raise ValueError( - f"No valid audio inputs found in column {column}/") + raise ValueError(f"No valid audio inputs found in column {column}/") try: @@ -259,7 +257,7 @@ def process_batch(self, batch: Dict[str, Any]) -> Dict[str, Any]: batch_inputs = [ tensor.to(self.config.device) - for tensor in audio_inputs[i: i + self.config.batch_size] + for tensor in audio_inputs[i : i + self.config.batch_size] ] batch_embeddings = self.model.predict(