MCPcopy Create free account
hub / github.com/TPCD/DCCL / VisdomSaver

Class VisdomSaver

project_utils/visualization_utils.py:897–909  ·  view source on GitHub ↗

Serialize the state of the Visdom server to disk. Unless you have a fancy schedule, where different are saved with different frequencies, you probably only need one of these.

Source from the content-addressed store, hash-verified

895
896
897class VisdomSaver(object):
898 ''' Serialize the state of the Visdom server to disk.
899 Unless you have a fancy schedule, where different are saved with different frequencies,
900 you probably only need one of these.
901 '''
902
903 def __init__(self, envs=None, port=8097, server="localhost"):
904 super(VisdomSaver, self).__init__()
905 self.envs = envs
906 self.viz = visdom.Visdom(server="http://" + server, port=port)
907
908 def save(self, *args, **kwargs):
909 self.viz.save(self.envs)
910
911
912class VisdomLogger(BaseVisdomLogger):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected