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

Method set_params

caffe2/python/checkpoint.py:395–414  ·  view source on GitHub ↗

Set parameters associated with CP manager Args: nodes: An array of nodes where this checkpoint manager is running. path_prefix: Used to construct db name or path where checkpoint files are stored. path_type: Indicate the type of path where

(self, nodes, path_prefix=None, path_type=None)

Source from the content-addressed store, hash-verified

393 return last_epoch
394
395 def set_params(self, nodes, path_prefix=None, path_type=None):
396 """Set parameters associated with CP manager
397
398 Args:
399 nodes: An array of nodes where this checkpoint manager is running.
400 path_prefix: Used to construct db name or path where checkpoint files are
401 stored.
402 path_type: Indicate the type of path where checkpoint files are stored.
403 """
404 if path_prefix:
405 self._path_prefix = path_prefix
406 if path_type:
407 self._path_type = path_type
408 if self._metadata_handler:
409 self._metadata_handler.set_params(
410 db_prefix=self._db_prefix,
411 db_type=self._db_type,
412 node_names=[str(self._node_name)],
413 path_prefix=self._path_prefix,
414 path_type=self._path_type)
415
416 def cp_accessible(self, epoch=None):
417 """Returns True if Checkpoint data is accessible

Callers 2

set_paramsMethod · 0.45
trainMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected