mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 19:20:19 +01:00
Add RedisDataStore (#295)
* GraphManager.set_session also sets self.sess * make sure that GraphManager.fetch_from_worker uses training phase * remove unnecessary phase setting in training worker * reorganize rollout worker * provide default name to GlobalVariableSaver.__init__ since it isn't really used anyway * allow dividing TrainingSteps and EnvironmentSteps * add timestamps to the log * added redis data store * conflict merge fix
This commit is contained in:
committed by
shadiendrawis
parent
34e1c04f29
commit
7b0fccb041
@@ -87,13 +87,15 @@ class ScreenLogger(object):
|
||||
print(data)
|
||||
|
||||
def log_dict(self, data, prefix=""):
|
||||
timestamp = datetime.datetime.now().strftime('%Y-%m-%d-%H:%M:%S.%f') + ' '
|
||||
if self._use_colors:
|
||||
str = "{}{}{} - ".format(Colors.PURPLE, prefix, Colors.END)
|
||||
str = timestamp
|
||||
str += "{}{}{} - ".format(Colors.PURPLE, prefix, Colors.END)
|
||||
for k, v in data.items():
|
||||
str += "{}{}: {}{} ".format(Colors.BLUE, k, Colors.END, v)
|
||||
print(str)
|
||||
else:
|
||||
logentries = []
|
||||
logentries = [timestamp]
|
||||
for k, v in data.items():
|
||||
logentries.append("{}={}".format(k, v))
|
||||
logline = "{}> {}".format(prefix, ", ".join(logentries))
|
||||
|
||||
Reference in New Issue
Block a user