[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2025-07-17 13:56:44 +00:00
committed by Michel Aractingi
parent e05d22cb7b
commit 788dde3a34
5 changed files with 24 additions and 9 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ import logging
import shutil
import tempfile
from pathlib import Path
from typing import Callable
from collections.abc import Callable
import datasets
import numpy as np
+3 -2
View File
@@ -13,7 +13,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Iterator, Union
from typing import Union
from collections.abc import Iterator
import torch
@@ -23,7 +24,7 @@ class EpisodeAwareSampler:
self,
dataset_from_indices: list[int],
dataset_to_indices: list[int],
episode_indices_to_use: Union[list, None] = None,
episode_indices_to_use: list | None = None,
drop_n_first_frames: int = 0,
drop_n_last_frames: int = 0,
shuffle: bool = False,
+2 -2
View File
@@ -345,7 +345,7 @@ def get_audio_info(video_path: Path | str) -> dict:
"json",
str(video_path),
]
result = subprocess.run(ffprobe_audio_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
result = subprocess.run(ffprobe_audio_cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"Error running ffprobe: {result.stderr}")
@@ -381,7 +381,7 @@ def get_video_info(video_path: Path | str) -> dict:
"json",
str(video_path),
]
result = subprocess.run(ffprobe_video_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
result = subprocess.run(ffprobe_video_cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"Error running ffprobe: {result.stderr}")