Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
speedup for demo!
Browse files
backend/tasks/create_bench_config_file.py
CHANGED
@@ -311,12 +311,12 @@ class CreateBenchConfigTask:
|
|
311 |
|
312 |
self._add_log(f"[INFO] Organization: {org_name}")
|
313 |
|
314 |
-
time.sleep(0.5) # Simulate delay
|
315 |
|
316 |
# Save the uploaded file
|
317 |
saved_file_path = self.save_uploaded_file(file_path)
|
318 |
|
319 |
-
time.sleep(1) # Simulate delay
|
320 |
|
321 |
# Path for the config file
|
322 |
config_dir = pathlib.Path(f"uploaded_files/{self.session_uid}")
|
@@ -326,7 +326,7 @@ class CreateBenchConfigTask:
|
|
326 |
dataset_name = f"yourbench_{self.session_uid}"
|
327 |
self._add_log(f"[INFO] Dataset name: {dataset_name}")
|
328 |
|
329 |
-
time.sleep(0.8) # Simulate delay
|
330 |
|
331 |
# Log the start of finding providers
|
332 |
self._add_log("[INFO] Finding available providers for models...")
|
@@ -334,20 +334,20 @@ class CreateBenchConfigTask:
|
|
334 |
# Generate and save the configuration
|
335 |
config = self.generate_base_config(org_name, dataset_name)
|
336 |
|
337 |
-
time.sleep(1.2) # Simulate delay
|
338 |
|
339 |
config_file_path = self.save_yaml_file(config, str(config_path))
|
340 |
|
341 |
self._add_log(f"[INFO] Configuration generated successfully: {config_file_path}")
|
342 |
|
343 |
# Simulate additional processing
|
344 |
-
time.sleep(1.5) # Simulate delay
|
345 |
self._add_log("[INFO] Starting ingestion")
|
346 |
|
347 |
-
time.sleep(2) # Simulate delay
|
348 |
self._add_log(f"[INFO] Processing file: {dataset_name}")
|
349 |
|
350 |
-
time.sleep(2) # Simulate delay
|
351 |
self._add_log("[SUCCESS] Stage completed: config_generation")
|
352 |
|
353 |
# Tâche terminée
|
|
|
311 |
|
312 |
self._add_log(f"[INFO] Organization: {org_name}")
|
313 |
|
314 |
+
# time.sleep(0.5) # Simulate delay
|
315 |
|
316 |
# Save the uploaded file
|
317 |
saved_file_path = self.save_uploaded_file(file_path)
|
318 |
|
319 |
+
# time.sleep(1) # Simulate delay
|
320 |
|
321 |
# Path for the config file
|
322 |
config_dir = pathlib.Path(f"uploaded_files/{self.session_uid}")
|
|
|
326 |
dataset_name = f"yourbench_{self.session_uid}"
|
327 |
self._add_log(f"[INFO] Dataset name: {dataset_name}")
|
328 |
|
329 |
+
# time.sleep(0.8) # Simulate delay
|
330 |
|
331 |
# Log the start of finding providers
|
332 |
self._add_log("[INFO] Finding available providers for models...")
|
|
|
334 |
# Generate and save the configuration
|
335 |
config = self.generate_base_config(org_name, dataset_name)
|
336 |
|
337 |
+
# time.sleep(1.2) # Simulate delay
|
338 |
|
339 |
config_file_path = self.save_yaml_file(config, str(config_path))
|
340 |
|
341 |
self._add_log(f"[INFO] Configuration generated successfully: {config_file_path}")
|
342 |
|
343 |
# Simulate additional processing
|
344 |
+
# time.sleep(1.5) # Simulate delay
|
345 |
self._add_log("[INFO] Starting ingestion")
|
346 |
|
347 |
+
# time.sleep(2) # Simulate delay
|
348 |
self._add_log(f"[INFO] Processing file: {dataset_name}")
|
349 |
|
350 |
+
# time.sleep(2) # Simulate delay
|
351 |
self._add_log("[SUCCESS] Stage completed: config_generation")
|
352 |
|
353 |
# Tâche terminée
|