mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-16 17:12:20 +08:00
make the prediction update more friendly (#609)
* make the prediction update more friendly * Update test_storage.py * LabelUpdater * Update test_storage.py * Update test_storage.py * Update test_storage.py * Update test_storage.py * Update setup.py * Update workflow_config_lightgbm_Alpha158.yaml * Update workflow_config_lightgbm_Alpha158.yaml * Update workflow_config_lightgbm_Alpha158.yaml * Update workflow_config_lightgbm_Alpha158.yaml * Update workflow_config_lightgbm_Alpha158.yaml * Update setup.py * Update setup.py * test CI only * test CI only * Update workflow_config_lightgbm_Alpha158.yaml * Update setup.py * fix "Segmentation fault" in macos * Update test.yml github action no longer supported ubuntu-16.04 * Update api.rst update doc with new_lable * Update api.rst Co-authored-by: Wangwuyi123 <51237097+Wangwuyi123@users.noreply.github.com> Co-authored-by: Pengrong Zhu <zhu.pengrong@foxmail.com>
This commit is contained in:
@@ -149,15 +149,15 @@ class TestStorage(TestAutoData):
|
||||
|
||||
"""
|
||||
|
||||
feature = FeatureStorage(instrument="SH600004", field="close", freq="day", provider_uri=self.provider_uri)
|
||||
feature = FeatureStorage(instrument="SZ300677", field="close", freq="day", provider_uri=self.provider_uri)
|
||||
|
||||
with self.assertRaises(IndexError):
|
||||
print(feature[0])
|
||||
assert isinstance(
|
||||
feature[815][1], (float, np.float32)
|
||||
feature[3049][1], (float, np.float32)
|
||||
), f"{feature.__class__.__name__}.__getitem__(i: int) error"
|
||||
assert len(feature[815:818]) == 3, f"{feature.__class__.__name__}.__getitem__(s: slice) error"
|
||||
print(f"feature[815: 818]: \n{feature[815: 818]}")
|
||||
assert len(feature[3049:3052]) == 3, f"{feature.__class__.__name__}.__getitem__(s: slice) error"
|
||||
print(f"feature[3049: 3052]: \n{feature[3049: 3052]}")
|
||||
|
||||
print(f"feature[:].tail(): \n{feature[:].tail()}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user