File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,10 @@ def parse_arguments():
509509 args .experiment = f"{ args .mode } -{ id } "
510510 else :
511511 args .experiment += f"-{ args .mode } "
512- args .experiment += f"-{ args .mode } -{ DATE } "
512+
513+ # Append a date for non-resume mode to ensure unique experiment dirs.
514+ if not args .resume :
515+ args .experiment += f"-{ DATE } "
513516
514517 # Convert time to seconds
515518 if args .timeout_per_trial is not None :
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class ResumeCheck(unittest.TestCase):
3030 design = "gcd"
3131 samples = 5
3232 iterations = 2
33+ timeout = 120
3334
3435 def setUp (self ):
3536 self .config = os .path .join (
@@ -38,7 +39,7 @@ def setUp(self):
3839 self .jobs = self .samples
3940 self .num_cpus = os .cpu_count ()
4041
41- # How it works: Say we have 5 samples and 5 iterations.
42+ # How it works: Say we have 5 samples and 5 iterations and 16 cores .
4243 # If we want to limit to only 5 trials (and avoid any parallelism magic by Ray)
4344 # We can set resources_per_trial = NUM_CORES/5 = 3.2 (fractional resources_per_trial are allowed!)
4445
@@ -66,7 +67,7 @@ def test_tune_resume(self):
6667 # Run the first config asynchronously.
6768 print ("Running the first config" )
6869 with managed_process (self .commands [0 ], shell = True ) as proc :
69- time .sleep (120 )
70+ time .sleep (self . timeout )
7071
7172 # Keep trying to stop the ray cluster until it is stopped
7273 while 1 :
You can’t perform that action at this time.
0 commit comments