mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-18 01:44:34 +08:00
Saurabh12571257/main (#1866)
* Update README.md * test macos ci * test macos ci * test macos ci * fix ci error * fix ci error --------- Co-authored-by: saurabh dave <87791567+saurabh12571257@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/python-publish.yml
vendored
2
.github/workflows/python-publish.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, macos-11]
|
os: [windows-latest, macos-13]
|
||||||
# FIXME: macos-latest will raise error now.
|
# FIXME: macos-latest will raise error now.
|
||||||
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
||||||
python-version: [3.7, 3.8]
|
python-version: [3.7, 3.8]
|
||||||
|
|||||||
15
.github/workflows/test_qlib_from_pip.yml
vendored
15
.github/workflows/test_qlib_from_pip.yml
vendored
@@ -15,8 +15,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
||||||
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
||||||
# so we limit the macos version to macos-12.
|
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
|
||||||
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
|
# after macos-13 python 3.7 is no longer supported.
|
||||||
|
# so we limit the macos version to macos-13.
|
||||||
|
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
||||||
python-version: [3.7, 3.8]
|
python-version: [3.7, 3.8]
|
||||||
|
|
||||||
@@ -28,13 +30,13 @@ jobs:
|
|||||||
# So we make the version number of python 3.7 for MacOS more specific.
|
# So we make the version number of python 3.7 for MacOS more specific.
|
||||||
# refs: https://github.com/actions/setup-python/issues/682
|
# refs: https://github.com/actions/setup-python/issues/682
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
|
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.16"
|
python-version: "3.7.16"
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
|
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
@@ -51,7 +53,7 @@ jobs:
|
|||||||
python -m pip install pyqlib
|
python -m pip install pyqlib
|
||||||
|
|
||||||
- name: Install Lightgbm for MacOS
|
- name: Install Lightgbm for MacOS
|
||||||
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
|
||||||
run: |
|
run: |
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
||||||
@@ -68,8 +70,5 @@ jobs:
|
|||||||
cd qlib
|
cd qlib
|
||||||
|
|
||||||
- name: Test workflow by config
|
- name: Test workflow by config
|
||||||
# On macos-11 system, it will lead to "Segmentation fault: 11" error,
|
|
||||||
# which may be caused by the excessive memory overhead of macos-11 system, so we disable macos-11 temporarily here.
|
|
||||||
if: ${{ matrix.os != 'macos-11' }}
|
|
||||||
run: |
|
run: |
|
||||||
qrun examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
qrun examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
||||||
|
|||||||
19
.github/workflows/test_qlib_from_source.yml
vendored
19
.github/workflows/test_qlib_from_source.yml
vendored
@@ -16,8 +16,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
||||||
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
||||||
# so we limit the macos version to macos-12.
|
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
|
||||||
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
|
# after macos-13 python 3.7 is no longer supported.
|
||||||
|
# so we limit the macos version to macos-13.
|
||||||
|
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
||||||
python-version: [3.7, 3.8]
|
python-version: [3.7, 3.8]
|
||||||
|
|
||||||
@@ -29,13 +31,13 @@ jobs:
|
|||||||
# So we make the version number of python 3.7 for MacOS more specific.
|
# So we make the version number of python 3.7 for MacOS more specific.
|
||||||
# refs: https://github.com/actions/setup-python/issues/682
|
# refs: https://github.com/actions/setup-python/issues/682
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
|
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.16"
|
python-version: "3.7.16"
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
|
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
@@ -45,7 +47,7 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|
||||||
- name: Installing pytorch for macos
|
- name: Installing pytorch for macos
|
||||||
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
|
||||||
run: |
|
run: |
|
||||||
python -m pip install torch torchvision torchaudio
|
python -m pip install torch torchvision torchaudio
|
||||||
|
|
||||||
@@ -149,7 +151,7 @@ jobs:
|
|||||||
python scripts/get_data.py download_data --file_name rl_data.zip --target_dir tests/.data/rl
|
python scripts/get_data.py download_data --file_name rl_data.zip --target_dir tests/.data/rl
|
||||||
|
|
||||||
- name: Install Lightgbm for MacOS
|
- name: Install Lightgbm for MacOS
|
||||||
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
|
||||||
run: |
|
run: |
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
||||||
@@ -161,16 +163,11 @@ jobs:
|
|||||||
|
|
||||||
# Run after data downloads
|
# Run after data downloads
|
||||||
- name: Check Qlib ipynb with nbconvert
|
- name: Check Qlib ipynb with nbconvert
|
||||||
# Running the nbconvert check on a macos-11 system results in a "Kernel died" error, so we've temporarily disabled macos-11 here.
|
|
||||||
if: ${{ matrix.os != 'macos-11' }}
|
|
||||||
run: |
|
run: |
|
||||||
# add more ipynb files in future
|
# add more ipynb files in future
|
||||||
jupyter nbconvert --to notebook --execute examples/workflow_by_code.ipynb
|
jupyter nbconvert --to notebook --execute examples/workflow_by_code.ipynb
|
||||||
|
|
||||||
- name: Test workflow by config (install from source)
|
- name: Test workflow by config (install from source)
|
||||||
# On macos-11 system, it will lead to "Segmentation fault: 11" error,
|
|
||||||
# which may be caused by the excessive memory overhead of macos-11 system, so we disable macos-11 temporarily here.
|
|
||||||
if: ${{ matrix.os != 'macos-11' }}
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install numba
|
python -m pip install numba
|
||||||
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
|
||||||
|
|||||||
12
.github/workflows/test_qlib_from_source_slow.yml
vendored
12
.github/workflows/test_qlib_from_source_slow.yml
vendored
@@ -16,8 +16,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
# Since macos-latest changed from 12.7.4 to 14.4.1,
|
||||||
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
|
||||||
# so we limit the macos version to macos-12.
|
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
|
||||||
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
|
# after macos-13 python 3.7 is no longer supported.
|
||||||
|
# so we limit the macos version to macos-13.
|
||||||
|
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
|
||||||
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
|
||||||
python-version: [3.7, 3.8]
|
python-version: [3.7, 3.8]
|
||||||
|
|
||||||
@@ -29,13 +31,13 @@ jobs:
|
|||||||
# So we make the version number of python 3.7 for MacOS more specific.
|
# So we make the version number of python 3.7 for MacOS more specific.
|
||||||
# refs: https://github.com/actions/setup-python/issues/682
|
# refs: https://github.com/actions/setup-python/issues/682
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
|
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.7.16"
|
python-version: "3.7.16"
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
|
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
@@ -51,7 +53,7 @@ jobs:
|
|||||||
python scripts/get_data.py qlib_data --name qlib_data_simple --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 --interval 1d --region cn
|
||||||
|
|
||||||
- name: Install Lightgbm for MacOS
|
- name: Install Lightgbm for MacOS
|
||||||
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
|
||||||
run: |
|
run: |
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ Here is a quick **[demo](https://terminalizer.com/view/3f24561a4470)** shows how
|
|||||||
|
|
||||||
This table demonstrates the supported Python version of `Qlib`:
|
This table demonstrates the supported Python version of `Qlib`:
|
||||||
| | install with pip | install from source | plot |
|
| | install with pip | install from source | plot |
|
||||||
| ------------- |:---------------------:|:--------------------:|:----:|
|
| ------------- |:---------------------:|:--------------------:|:------------------:|
|
||||||
| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Python 3.8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
| Python 3.8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| Python 3.9 | :x: | :heavy_check_mark: | :x: |
|
| Python 3.9 | :x: | :heavy_check_mark: | :x: |
|
||||||
|
|||||||
Reference in New Issue
Block a user