MCPcopy Index your code
hub / github.com/pytorch/pytorch / db_name

Function db_name

caffe2/python/checkpoint.py:128–146  ·  view source on GitHub ↗

Returns the full db name where checkpoint files are saved. Args: epoch: An integer. The checkpoint epoch. node_name: A string. The name of the node. db_prefix: A string. The prefix used to construct full db name. path_prefix: A string. Optional param used to cons

(epoch, node_name, db_prefix, path_prefix=None)

Source from the content-addressed store, hash-verified

126
127
128def db_name(epoch, node_name, db_prefix, path_prefix=None):
129 """Returns the full db name where checkpoint files are saved.
130
131 Args:
132 epoch: An integer. The checkpoint epoch.
133 node_name: A string. The name of the node.
134 db_prefix: A string. The prefix used to construct full db name.
135 path_prefix: A string. Optional param used to construct db name or path
136 where checkpoint files are stored.
137 Returns:
138 db_name: A string. The absolute path of full_db_name where checkpoint
139 files are saved
140 """
141 if path_prefix:
142 db_name = path_prefix + get_ckpt_filename(node_name, epoch)
143 else:
144 ckpt_filename = get_ckpt_filename(node_name, epoch)
145 db_name = os.path.join(db_prefix, ckpt_filename)
146 return db_name
147
148
149class CheckpointManager:

Callers 8

buildMethod · 0.90
initMethod · 0.85
loadMethod · 0.85
check_db_existsMethod · 0.85
saveMethod · 0.85
load_blobs_locallyMethod · 0.85
get_ckpt_db_nameMethod · 0.85

Calls 2

get_ckpt_filenameFunction · 0.85
joinMethod · 0.45

Tested by 1

buildMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…