mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-12 07:16:54 +08:00
fix_download_data_for_CI
This commit is contained in:
committed by
you-n-g
parent
30e457119c
commit
5200ff520a
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -92,7 +92,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Test data downloads
|
- name: Test data downloads
|
||||||
run: |
|
run: |
|
||||||
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
|
python scripts/get_data.py qlib_data --name qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data_simple --interval 1d --region cn
|
||||||
|
python -c "import os; userpath=os.path.expanduser('~'); os.rename(userpath + '/.qlib/qlib_data/cn_data_simple', userpath + '/.qlib/qlib_data/cn_data')"
|
||||||
|
|
||||||
- name: Test workflow by config (install from pip)
|
- name: Test workflow by config (install from pip)
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
3
.github/workflows/test_macos.yml
vendored
3
.github/workflows/test_macos.yml
vendored
@@ -56,7 +56,8 @@ jobs:
|
|||||||
brew install libomp.rb
|
brew install libomp.rb
|
||||||
- name: Test data downloads
|
- name: Test data downloads
|
||||||
run: |
|
run: |
|
||||||
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
|
python scripts/get_data.py qlib_data --name qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data_simple --interval 1d --region cn
|
||||||
|
python -c "import os; userpath=os.path.expanduser('~'); os.rename(userpath + '/.qlib/qlib_data/cn_data_simple', userpath + '/.qlib/qlib_data/cn_data')"
|
||||||
- name: Test workflow by config (install from pip)
|
- name: Test workflow by config (install from pip)
|
||||||
run: |
|
run: |
|
||||||
python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class Signal(metaclass=abc.ABCMeta):
|
|||||||
Union[pd.Series, pd.DataFrame, None]:
|
Union[pd.Series, pd.DataFrame, None]:
|
||||||
returns None if no signal in the specific day
|
returns None if no signal in the specific day
|
||||||
"""
|
"""
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
class SignalWCache(Signal):
|
class SignalWCache(Signal):
|
||||||
|
|||||||
@@ -126,12 +126,10 @@ class CalendarStorage(BaseStorage):
|
|||||||
@overload
|
@overload
|
||||||
def __setitem__(self, i: int, value: CalVT) -> None:
|
def __setitem__(self, i: int, value: CalVT) -> None:
|
||||||
"""x.__setitem__(i, o) <==> (x[i] = o)"""
|
"""x.__setitem__(i, o) <==> (x[i] = o)"""
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def __setitem__(self, s: slice, value: Iterable[CalVT]) -> None:
|
def __setitem__(self, s: slice, value: Iterable[CalVT]) -> None:
|
||||||
"""x.__setitem__(s, o) <==> (x[s] = o)"""
|
"""x.__setitem__(s, o) <==> (x[s] = o)"""
|
||||||
...
|
|
||||||
|
|
||||||
def __setitem__(self, i, value) -> None:
|
def __setitem__(self, i, value) -> None:
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
||||||
@@ -141,12 +139,10 @@ class CalendarStorage(BaseStorage):
|
|||||||
@overload
|
@overload
|
||||||
def __delitem__(self, i: int) -> None:
|
def __delitem__(self, i: int) -> None:
|
||||||
"""x.__delitem__(i) <==> del x[i]"""
|
"""x.__delitem__(i) <==> del x[i]"""
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def __delitem__(self, i: slice) -> None:
|
def __delitem__(self, i: slice) -> None:
|
||||||
"""x.__delitem__(slice(start: int, stop: int, step: int)) <==> del x[start:stop:step]"""
|
"""x.__delitem__(slice(start: int, stop: int, step: int)) <==> del x[start:stop:step]"""
|
||||||
...
|
|
||||||
|
|
||||||
def __delitem__(self, i) -> None:
|
def __delitem__(self, i) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -162,12 +158,10 @@ class CalendarStorage(BaseStorage):
|
|||||||
@overload
|
@overload
|
||||||
def __getitem__(self, s: slice) -> Iterable[CalVT]:
|
def __getitem__(self, s: slice) -> Iterable[CalVT]:
|
||||||
"""x.__getitem__(slice(start: int, stop: int, step: int)) <==> x[start:stop:step]"""
|
"""x.__getitem__(slice(start: int, stop: int, step: int)) <==> x[start:stop:step]"""
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def __getitem__(self, i: int) -> CalVT:
|
def __getitem__(self, i: int) -> CalVT:
|
||||||
"""x.__getitem__(i) <==> x[i]"""
|
"""x.__getitem__(i) <==> x[i]"""
|
||||||
...
|
|
||||||
|
|
||||||
def __getitem__(self, i) -> CalVT:
|
def __getitem__(self, i) -> CalVT:
|
||||||
"""
|
"""
|
||||||
@@ -467,12 +461,10 @@ class FeatureStorage(BaseStorage):
|
|||||||
-------
|
-------
|
||||||
pd.Series(values, index=pd.RangeIndex(start, len(values))
|
pd.Series(values, index=pd.RangeIndex(start, len(values))
|
||||||
"""
|
"""
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def __getitem__(self, i: int) -> Tuple[int, float]:
|
def __getitem__(self, i: int) -> Tuple[int, float]:
|
||||||
"""x.__getitem__(y) <==> x[y]"""
|
"""x.__getitem__(y) <==> x[y]"""
|
||||||
...
|
|
||||||
|
|
||||||
def __getitem__(self, i) -> Union[Tuple[int, float], pd.Series]:
|
def __getitem__(self, i) -> Union[Tuple[int, float], pd.Series]:
|
||||||
"""x.__getitem__(y) <==> x[y]
|
"""x.__getitem__(y) <==> x[y]
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ def sum_by_index(data_list: Union["SingleData"], new_index: list, fill_value=0)
|
|||||||
new_index : list
|
new_index : list
|
||||||
the new_index of new SingleData.
|
the new_index of new SingleData.
|
||||||
fill_value : float
|
fill_value : float
|
||||||
fill the missing values or replace np.NaN.
|
fill the missing values or replace np.NaN.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ class RecordUpdater(metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Update info for specific recorder
|
Update info for specific recorder
|
||||||
"""
|
"""
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
class DSBasedUpdater(RecordUpdater, metaclass=ABCMeta):
|
class DSBasedUpdater(RecordUpdater, metaclass=ABCMeta):
|
||||||
@@ -248,7 +247,6 @@ class DSBasedUpdater(RecordUpdater, metaclass=ABCMeta):
|
|||||||
- `update_date` only include some data specific feature
|
- `update_date` only include some data specific feature
|
||||||
- `update` include some general routine steps(e.g. prepare dataset, checking)
|
- `update` include some general routine steps(e.g. prepare dataset, checking)
|
||||||
"""
|
"""
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
def _replace_range(data, new_data):
|
def _replace_range(data, new_data):
|
||||||
|
|||||||
Reference in New Issue
Block a user