diff deep/stacked_dae/utils.py @ 278:43afd29f3dbd

Ajouté fonctionnalité pour réinsérer de nouvelles jobs aux paramètres choisis manuellement, en liste, pour repartir des jobs spécifiques qui ont crashé
author fsavard
date Wed, 24 Mar 2010 14:35:11 -0400
parents c8fe09a65039
children 206374eed2fb
line wrap: on
line diff
--- a/deep/stacked_dae/utils.py	Fri Mar 19 11:31:57 2010 -0400
+++ b/deep/stacked_dae/utils.py	Wed Mar 24 14:35:11 2010 -0400
@@ -41,6 +41,16 @@
     print produit_cartesien_jobs(vals)
 
 
+def jobs_from_reinsert_list(cols, job_vals):
+    job_list = []
+    for vals in job_vals:
+        job = DD()
+        for i, col in enumerate(cols):
+            job[col] = vals[i]
+        job_list.append(job)
+
+    return job_list
+
 # taken from http://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python
 """Simple module for getting amount of memory used by a specified user's
 processes on a UNIX system.