MCPcopy Index your code
hub / github.com/microsoft/qlib / sync_to_disk

Method sync_to_disk

qlib/data/cache.py:812–818  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

810 return self._data.loc[start_time:end_time].copy()
811
812 def sync_to_disk(self):
813 if self._data is None:
814 raise ValueError("No data to sync to disk.")
815 self._data.sort_index(inplace=True)
816 self._data.to_hdf(self.index_path, key=self.KEY, mode="w", format="table")
817 # The index should be readable for all users
818 self.index_path.chmod(stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
819
820 def sync_from_disk(self):
821 # The file will not be closed directly if we read_hdf from the disk directly

Callers 1

updateMethod · 0.95

Calls 1

sort_indexMethod · 0.45

Tested by

no test coverage detected