Yixin Liu commited on
Commit
996a114
1 Parent(s): c134b6a
Files changed (2) hide show
  1. main.py +0 -3
  2. parse_code.py +3 -0
main.py CHANGED
@@ -78,9 +78,6 @@ memory_rate_max={memory_max_utility}
78
  constrain_total={constrain_total}
79
  constrain_mine={"true" if constrain_mine else "false"}
80
  constrain_rate={"true" if constrain_rate else "false"}
81
- date_stamp=`date '+%Y-%m-%d-%H'`
82
- log_dir="logs/$exp_name/$date_stamp"
83
- mkdir -p $log_dir
84
  """
85
 
86
 
 
78
  constrain_total={constrain_total}
79
  constrain_mine={"true" if constrain_mine else "false"}
80
  constrain_rate={"true" if constrain_rate else "false"}
 
 
 
81
  """
82
 
83
 
parse_code.py CHANGED
@@ -35,6 +35,9 @@ def parse_base_code(contents, debug = False):
35
  """cd $(cd "$(dirname "$0")";pwd); source gpu_utility.sh\n\n"""
36
  , "device_control"))
37
  spans_with_type_added_device_control.append((span, type_))
 
 
 
38
  # spans_with_type_added_device_control.append((gpu_env, "device_control"))
39
  # spans_with_type_added_device_control.append((update_device_func, "device_control"))
40
  elif type_ == "loop":
 
35
  """cd $(cd "$(dirname "$0")";pwd); source gpu_utility.sh\n\n"""
36
  , "device_control"))
37
  spans_with_type_added_device_control.append((span, type_))
38
+ spans_with_type_added_device_control.append(("""date_stamp=`date '+%Y-%m-%d-%H'`
39
+ log_dir="logs/$exp_name/$date_stamp"
40
+ mkdir -p $log_dir\n""", "logging"))
41
  # spans_with_type_added_device_control.append((gpu_env, "device_control"))
42
  # spans_with_type_added_device_control.append((update_device_func, "device_control"))
43
  elif type_ == "loop":