Handles task assignment

- handles task assignment properly
pull/613/head
Sambhav Dixit 3 months ago committed by GitHub
parent 8d7e07d046
commit 5d17c50a8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -393,6 +393,9 @@ class ConcurrentWorkflow(BaseSwarm):
ValueError: If an invalid device is specified.
Exception: If any other error occurs during execution.
"""
if task is not None:
self.tasks.append(task)
try:
logger.info(f"Attempting to run on device: {device}")
if device == "cpu":
@ -410,7 +413,6 @@ class ConcurrentWorkflow(BaseSwarm):
count, self._run, task, img, *args, **kwargs
)
# If device gpu
elif device == "gpu":
logger.info("Device set to GPU")
return execute_on_gpu(

Loading…
Cancel
Save