Functions | Variables
train_latest_snapshot Namespace Reference

Functions

def findLatest (paths)
 

Variables

 parser
 
 type
 
 help
 
 str
 
 default
 
list required = ["solver"]
 
 args
 
 options
 
 None
 
 values
 
 argDict = vars(args)
 
list snapshotDirLine
 
 prefix = snapshotDirLine.split(":")[1].strip().strip('"').strip("'")
 
string pattern = prefix+"*_iter_*.solverstate"
 
 snapshot = findLatest(glob.glob(pattern))
 
string jobid = os.environ["PBS_JOBID"]if"PBS_JOBID"
 
string logName = "train_latest_snapshot_%s.out"
 
 logPath = os.path.join(args.logDir, logName)
 
list command
 

Function Documentation

def train_latest_snapshot.findLatest (   paths)

Definition at line 23 of file train_latest_snapshot.py.

References next().

23 def findLatest(paths):
24  if len(paths) is 0:
25  return None
26  mtime = lambda path: os.stat(path).st_mtime
27  return next(reversed(sorted(paths, key=mtime)))
28 
29 
void next()
Definition: show_event.C:84

Variable Documentation

train_latest_snapshot.argDict = vars(args)

Definition at line 30 of file train_latest_snapshot.py.

train_latest_snapshot.args

Definition at line 21 of file train_latest_snapshot.py.

list train_latest_snapshot.command
Initial value:
1 = ["caffe.bin", "--gpu", "all", "train",
2  "--solver", args.solver, "--snapshot", snapshot , ">>", logPath,
3  "2>&1"]

Definition at line 52 of file train_latest_snapshot.py.

train_latest_snapshot.default

Definition at line 15 of file train_latest_snapshot.py.

train_latest_snapshot.help

Definition at line 14 of file train_latest_snapshot.py.

string train_latest_snapshot.jobid = os.environ["PBS_JOBID"]if"PBS_JOBID"

Definition at line 46 of file train_latest_snapshot.py.

Referenced by FCTutorial2020(), and TestMatrix().

string train_latest_snapshot.logName = "train_latest_snapshot_%s.out"

Definition at line 48 of file train_latest_snapshot.py.

train_latest_snapshot.logPath = os.path.join(args.logDir, logName)

Definition at line 49 of file train_latest_snapshot.py.

train_latest_snapshot.None

Definition at line 21 of file train_latest_snapshot.py.

train_latest_snapshot.options

Definition at line 21 of file train_latest_snapshot.py.

train_latest_snapshot.parser
Initial value:
1 = optparse.OptionParser(description=,
2  add_help_option=True)

Definition at line 9 of file train_latest_snapshot.py.

string train_latest_snapshot.pattern = prefix+"*_iter_*.solverstate"

Definition at line 40 of file train_latest_snapshot.py.

train_latest_snapshot.prefix = snapshotDirLine.split(":")[1].strip().strip('"').strip("'")

Definition at line 38 of file train_latest_snapshot.py.

list train_latest_snapshot.required = ["solver"]

Definition at line 19 of file train_latest_snapshot.py.

train_latest_snapshot.snapshot = findLatest(glob.glob(pattern))
list train_latest_snapshot.snapshotDirLine
Initial value:
1 = [line for line in open(args.solver).readlines()
2  if "snapshot_prefix" in line][0]
procfile open("FD_BRL_v0.txt")

Definition at line 35 of file train_latest_snapshot.py.

train_latest_snapshot.str

Definition at line 15 of file train_latest_snapshot.py.

train_latest_snapshot.type

Definition at line 13 of file train_latest_snapshot.py.

train_latest_snapshot.values