MCPcopy
hub / github.com/hyperopt/hyperopt / delete_all

Method delete_all

hyperopt/mongoexp.py:862–876  ·  view source on GitHub ↗
(self, cond=None)

Source from the content-addressed store, hash-verified

860 return rval
861
862 def delete_all(self, cond=None):
863 cond = {} if cond is None else dict(cond)
864
865 if self._exp_key:
866 cond["exp_key"] = self._exp_key
867 # -- remove all documents matching condition
868 self.handle.delete_all(cond)
869 gfs = self.handle.gfs
870 for filename in gfs.list():
871 try:
872 fdoc = gfs.get_last_version(filename=filename, **cond)
873 except gridfs.errors.NoFile:
874 continue
875 gfs.delete(fdoc._id)
876 self.refresh()
877
878 def new_trial_ids(self, last_id):
879 db = self.handle.db

Callers

nothing calls this directly

Calls 4

refreshMethod · 0.95
listMethod · 0.80
deleteMethod · 0.80
delete_allMethod · 0.45

Tested by

no test coverage detected