MCPcopy Create free account
hub / github.com/deepdrive/deepdrive / maybe_save

Method maybe_save

tensorflow_agent/agent.py:137–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 return action
136
137 def maybe_save(self):
138 if (
139 self.should_record and self.recorded_obz_count % c.FRAMES_PER_HDF5_FILE == 0 and
140 self.recorded_obz_count != 0
141 ):
142 filename = os.path.join(self.sess_dir, '%s.hdf5' %
143 str(self.recorded_obz_count // c.FRAMES_PER_HDF5_FILE).zfill(10))
144 save_hdf5(self.obz_recording, filename=filename)
145 log.info('Flushing output data')
146 self.obz_recording = []
147
148 def toggle_random_action(self):
149 """Reduce sampling error by diversifying experience"""

Callers 1

actMethod · 0.95

Calls 1

save_hdf5Function · 0.90

Tested by

no test coverage detected