mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-04 11:30:57 +08:00
@@ -359,7 +359,7 @@ class ExpressionCache(BaseProviderCache):
|
||||
def update(self, cache_uri: Union[str, Path], freq: str = "day"):
|
||||
"""Update expression cache to latest calendar.
|
||||
|
||||
Overide this method to define how to update expression cache corresponding to users' own cache mechanism.
|
||||
Override this method to define how to update expression cache corresponding to users' own cache mechanism.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@@ -445,7 +445,7 @@ class DatasetCache(BaseProviderCache):
|
||||
def update(self, cache_uri: Union[str, Path], freq: str = "day"):
|
||||
"""Update dataset cache to latest calendar.
|
||||
|
||||
Overide this method to define how to update dataset cache corresponding to users' own cache mechanism.
|
||||
Override this method to define how to update dataset cache corresponding to users' own cache mechanism.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@@ -543,7 +543,7 @@ class DiskExpressionCache(ExpressionCache):
|
||||
# instance
|
||||
series = self.provider.expression(instrument, field, _calendar[0], _calendar[-1], freq)
|
||||
if not series.empty:
|
||||
# This expresion is empty, we don't generate any cache for it.
|
||||
# This expression is empty, we don't generate any cache for it.
|
||||
with CacheUtils.writer_lock(self.r, f"{str(C.dpm.get_data_uri(freq))}:expression-{_cache_uri}"):
|
||||
self.gen_expression_cache(
|
||||
expression_data=series,
|
||||
@@ -858,7 +858,7 @@ class DiskDatasetCache(DatasetCache):
|
||||
"""gen_dataset_cache
|
||||
|
||||
.. note:: This function does not consider the cache read write lock. Please
|
||||
Aquire the lock outside this function
|
||||
Acquire the lock outside this function
|
||||
|
||||
The format the cache contains 3 parts(followed by typical filename).
|
||||
|
||||
@@ -1035,7 +1035,7 @@ class DiskDatasetCache(DatasetCache):
|
||||
# FIXME:
|
||||
# Because the feature cache are stored as .bin file.
|
||||
# So the series read from features are all float32.
|
||||
# However, the first dataset cache is calulated based on the
|
||||
# However, the first dataset cache is calculated based on the
|
||||
# raw data. So the data type may be float64.
|
||||
# Different data type will result in failure of appending data
|
||||
if "/{}".format(DatasetCache.HDF_KEY) in store.keys():
|
||||
|
||||
Reference in New Issue
Block a user