nv-ingest-api 2025.10.27.dev20251027__py3-none-any.whl → 2025.10.28.dev20251028__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nv-ingest-api might be problematic. Click here for more details.
- nv_ingest_api/util/dataloader/dataloader.py +20 -9
- {nv_ingest_api-2025.10.27.dev20251027.dist-info → nv_ingest_api-2025.10.28.dev20251028.dist-info}/METADATA +1 -1
- {nv_ingest_api-2025.10.27.dev20251027.dist-info → nv_ingest_api-2025.10.28.dev20251028.dist-info}/RECORD +6 -6
- {nv_ingest_api-2025.10.27.dev20251027.dist-info → nv_ingest_api-2025.10.28.dev20251028.dist-info}/WHEEL +0 -0
- {nv_ingest_api-2025.10.27.dev20251027.dist-info → nv_ingest_api-2025.10.28.dev20251028.dist-info}/licenses/LICENSE +0 -0
- {nv_ingest_api-2025.10.27.dev20251027.dist-info → nv_ingest_api-2025.10.28.dev20251028.dist-info}/top_level.txt +0 -0
|
@@ -254,22 +254,29 @@ else:
|
|
|
254
254
|
file = None
|
|
255
255
|
try:
|
|
256
256
|
for file in paths:
|
|
257
|
+
if thread_stop.is_set():
|
|
258
|
+
return
|
|
257
259
|
if isinstance(file, tuple):
|
|
258
260
|
video_file, audio_file = file
|
|
261
|
+
if thread_stop.is_set():
|
|
262
|
+
return
|
|
259
263
|
with open(video_file, "rb") as f:
|
|
260
264
|
video = f.read()
|
|
265
|
+
if thread_stop.is_set():
|
|
266
|
+
return
|
|
261
267
|
with open(audio_file, "rb") as f:
|
|
262
268
|
audio = f.read()
|
|
263
269
|
queue.put((video, audio))
|
|
264
270
|
else:
|
|
265
|
-
if thread_stop:
|
|
271
|
+
if thread_stop.is_set():
|
|
266
272
|
return
|
|
267
273
|
with open(file, "rb") as f:
|
|
268
274
|
queue.put(f.read())
|
|
269
275
|
except Exception as e:
|
|
270
276
|
logging.error(f"Error processing file {file}: {e}")
|
|
271
277
|
queue.put(RuntimeError(f"Error processing file {file}: {e}"))
|
|
272
|
-
|
|
278
|
+
finally:
|
|
279
|
+
queue.put(StopIteration)
|
|
273
280
|
|
|
274
281
|
class DataLoader:
|
|
275
282
|
"""
|
|
@@ -290,7 +297,7 @@ else:
|
|
|
290
297
|
):
|
|
291
298
|
interface = interface if interface else MediaInterface()
|
|
292
299
|
self.thread = None
|
|
293
|
-
self.thread_stop =
|
|
300
|
+
self.thread_stop = threading.Event()
|
|
294
301
|
self.queue = queue.Queue(size)
|
|
295
302
|
self.path = Path(path)
|
|
296
303
|
self.output_dir = output_dir
|
|
@@ -323,16 +330,20 @@ else:
|
|
|
323
330
|
Reset itertor by stopping the thread and clearing the queue.
|
|
324
331
|
"""
|
|
325
332
|
if self.thread:
|
|
326
|
-
self.thread_stop
|
|
333
|
+
self.thread_stop.set()
|
|
327
334
|
self.thread.join()
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
self.queue.
|
|
335
|
+
self.thread = None
|
|
336
|
+
try:
|
|
337
|
+
while True:
|
|
338
|
+
self.queue.get_nowait()
|
|
339
|
+
except Exception:
|
|
340
|
+
pass
|
|
341
|
+
finally:
|
|
342
|
+
self.thread_stop.clear()
|
|
332
343
|
|
|
333
344
|
def __iter__(self):
|
|
334
345
|
self.stop()
|
|
335
|
-
self.thread_stop
|
|
346
|
+
self.thread_stop.clear()
|
|
336
347
|
self.thread = threading.Thread(
|
|
337
348
|
target=load_data,
|
|
338
349
|
args=(
|
|
@@ -116,7 +116,7 @@ nv_ingest_api/util/converters/dftools.py,sha256=FjHjazIeiUd1LdFwWuummJmraqZe1a90
|
|
|
116
116
|
nv_ingest_api/util/converters/formats.py,sha256=L11FtormO2SeHSebbwsGE_uuCv6Jk0D3VvVW2avU0vI,2258
|
|
117
117
|
nv_ingest_api/util/converters/type_mappings.py,sha256=5TVXRyU6BlQvFOdqknEuQw3ss4PXeCvSUynJnjvgQpA,1102
|
|
118
118
|
nv_ingest_api/util/dataloader/__init__.py,sha256=B6ybDORMI9IzXGdhM7w_agcVj1BNYgAlcfTA0lG5jng,308
|
|
119
|
-
nv_ingest_api/util/dataloader/dataloader.py,sha256=
|
|
119
|
+
nv_ingest_api/util/dataloader/dataloader.py,sha256=1SG0cHKo7X_eBRTVMJ9EFJOfpqe37QqfEoMxeAWxkEU,15124
|
|
120
120
|
nv_ingest_api/util/detectors/__init__.py,sha256=HIHfzSig66GT0Uk8qsGBm_f13fKYcPtItBicRUWOOVA,183
|
|
121
121
|
nv_ingest_api/util/detectors/language.py,sha256=TvzcESYY0bn0U4aLY6GjB4VaCWA6XrXxAGZbVzHTMuE,965
|
|
122
122
|
nv_ingest_api/util/exception_handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -165,10 +165,10 @@ nv_ingest_api/util/string_processing/configuration.py,sha256=2HS08msccuPCT0fn_jf
|
|
|
165
165
|
nv_ingest_api/util/string_processing/yaml.py,sha256=4Zdmc4474lUZn6kznqaNTlQJwsmRnnJQZ-DvAWLu-zo,2678
|
|
166
166
|
nv_ingest_api/util/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
167
|
nv_ingest_api/util/system/hardware_info.py,sha256=1UFM8XE6M3pgQcpbVsCsqDQ7Dj-zzptL-XRE-DEu9UA,27213
|
|
168
|
-
nv_ingest_api-2025.10.
|
|
168
|
+
nv_ingest_api-2025.10.28.dev20251028.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
169
169
|
udfs/__init__.py,sha256=pXFqPgXIUqHDfj7SAR1Q19tt8KwGv_iMvhHyziz4AYM,205
|
|
170
170
|
udfs/llm_summarizer_udf.py,sha256=lH5c5NHoT-5ecHC3og_40u1Ujta8SpsKU4X0e4wzbMU,7314
|
|
171
|
-
nv_ingest_api-2025.10.
|
|
172
|
-
nv_ingest_api-2025.10.
|
|
173
|
-
nv_ingest_api-2025.10.
|
|
174
|
-
nv_ingest_api-2025.10.
|
|
171
|
+
nv_ingest_api-2025.10.28.dev20251028.dist-info/METADATA,sha256=75HOt_Se8daleugsYt6wCpwKVP7vkeg_ShJFpFhmPuE,14106
|
|
172
|
+
nv_ingest_api-2025.10.28.dev20251028.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
173
|
+
nv_ingest_api-2025.10.28.dev20251028.dist-info/top_level.txt,sha256=I1lseG9FF0CH93SPx4kFblsxFuv190cfzaas_CLNIiw,19
|
|
174
|
+
nv_ingest_api-2025.10.28.dev20251028.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|