Skip to content

Commit af4b877

Browse files
Saurabh12571257/main (microsoft#1866)
* Update README.md * test macos ci * test macos ci * test macos ci * fix ci error * fix ci error --------- Co-authored-by: saurabh dave <[email protected]>
1 parent 18fcdf1 commit af4b877

File tree

5 files changed

+26
-28
lines changed

5 files changed

+26
-28
lines changed

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [windows-latest, macos-11]
15+
os: [windows-latest, macos-13]
1616
# FIXME: macos-latest will raise error now.
1717
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
1818
python-version: [3.7, 3.8]

.github/workflows/test_qlib_from_pip.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ jobs:
1515
matrix:
1616
# Since macos-latest changed from 12.7.4 to 14.4.1,
1717
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
18-
# so we limit the macos version to macos-12.
19-
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
18+
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
19+
# after macos-13 python 3.7 is no longer supported.
20+
# so we limit the macos version to macos-13.
21+
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
2022
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
2123
python-version: [3.7, 3.8]
2224

@@ -28,13 +30,13 @@ jobs:
2830
# So we make the version number of python 3.7 for MacOS more specific.
2931
# refs: https://github.com/actions/setup-python/issues/682
3032
- name: Set up Python ${{ matrix.python-version }}
31-
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
33+
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
3234
uses: actions/setup-python@v4
3335
with:
3436
python-version: "3.7.16"
3537

3638
- name: Set up Python ${{ matrix.python-version }}
37-
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
39+
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
3840
uses: actions/setup-python@v4
3941
with:
4042
python-version: ${{ matrix.python-version }}
@@ -51,7 +53,7 @@ jobs:
5153
python -m pip install pyqlib
5254
5355
- name: Install Lightgbm for MacOS
54-
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
56+
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
5557
run: |
5658
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
5759
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
@@ -68,8 +70,5 @@ jobs:
6870
cd qlib
6971
7072
- name: Test workflow by config
71-
# On macos-11 system, it will lead to "Segmentation fault: 11" error,
72-
# which may be caused by the excessive memory overhead of macos-11 system, so we disable macos-11 temporarily here.
73-
if: ${{ matrix.os != 'macos-11' }}
7473
run: |
7574
qrun examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml

.github/workflows/test_qlib_from_source.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
matrix:
1717
# Since macos-latest changed from 12.7.4 to 14.4.1,
1818
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
19-
# so we limit the macos version to macos-12.
20-
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
19+
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
20+
# after macos-13 python 3.7 is no longer supported.
21+
# so we limit the macos version to macos-13.
22+
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
2123
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
2224
python-version: [3.7, 3.8]
2325

@@ -29,13 +31,13 @@ jobs:
2931
# So we make the version number of python 3.7 for MacOS more specific.
3032
# refs: https://github.com/actions/setup-python/issues/682
3133
- name: Set up Python ${{ matrix.python-version }}
32-
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
34+
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
3335
uses: actions/setup-python@v4
3436
with:
3537
python-version: "3.7.16"
3638

3739
- name: Set up Python ${{ matrix.python-version }}
38-
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
40+
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
3941
uses: actions/setup-python@v4
4042
with:
4143
python-version: ${{ matrix.python-version }}
@@ -45,7 +47,7 @@ jobs:
4547
python -m pip install --upgrade pip
4648
4749
- name: Installing pytorch for macos
48-
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
50+
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
4951
run: |
5052
python -m pip install torch torchvision torchaudio
5153
@@ -149,7 +151,7 @@ jobs:
149151
python scripts/get_data.py download_data --file_name rl_data.zip --target_dir tests/.data/rl
150152
151153
- name: Install Lightgbm for MacOS
152-
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
154+
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
153155
run: |
154156
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
155157
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
@@ -161,16 +163,11 @@ jobs:
161163
162164
# Run after data downloads
163165
- name: Check Qlib ipynb with nbconvert
164-
# Running the nbconvert check on a macos-11 system results in a "Kernel died" error, so we've temporarily disabled macos-11 here.
165-
if: ${{ matrix.os != 'macos-11' }}
166166
run: |
167167
# add more ipynb files in future
168168
jupyter nbconvert --to notebook --execute examples/workflow_by_code.ipynb
169169
170170
- name: Test workflow by config (install from source)
171-
# On macos-11 system, it will lead to "Segmentation fault: 11" error,
172-
# which may be caused by the excessive memory overhead of macos-11 system, so we disable macos-11 temporarily here.
173-
if: ${{ matrix.os != 'macos-11' }}
174171
run: |
175172
python -m pip install numba
176173
python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml

.github/workflows/test_qlib_from_source_slow.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
matrix:
1717
# Since macos-latest changed from 12.7.4 to 14.4.1,
1818
# the minimum python version that matches a 14.4.1 version of macos is 3.10,
19-
# so we limit the macos version to macos-12.
20-
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-12]
19+
# If you want to use python 3.7 in github action, then the latest macos system version is macos-13,
20+
# after macos-13 python 3.7 is no longer supported.
21+
# so we limit the macos version to macos-13.
22+
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13]
2123
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
2224
python-version: [3.7, 3.8]
2325

@@ -29,13 +31,13 @@ jobs:
2931
# So we make the version number of python 3.7 for MacOS more specific.
3032
# refs: https://github.com/actions/setup-python/issues/682
3133
- name: Set up Python ${{ matrix.python-version }}
32-
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7')
34+
if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-13' && matrix.python-version == '3.7')
3335
uses: actions/setup-python@v4
3436
with:
3537
python-version: "3.7.16"
3638

3739
- name: Set up Python ${{ matrix.python-version }}
38-
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7')
40+
if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-13' || matrix.python-version != '3.7')
3941
uses: actions/setup-python@v4
4042
with:
4143
python-version: ${{ matrix.python-version }}
@@ -51,7 +53,7 @@ jobs:
5153
python scripts/get_data.py qlib_data --name qlib_data_simple --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
5254
5355
- name: Install Lightgbm for MacOS
54-
if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-latest' }}
56+
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
5557
run: |
5658
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
5759
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ Here is a quick **[demo](https://terminalizer.com/view/3f24561a4470)** shows how
152152
## Installation
153153

154154
This table demonstrates the supported Python version of `Qlib`:
155-
| | install with pip | install from source | plot |
156-
| ------------- |:---------------------:|:--------------------:|:----:|
155+
| | install with pip | install from source | plot |
156+
| ------------- |:---------------------:|:--------------------:|:------------------:|
157157
| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
158158
| Python 3.8 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
159-
| Python 3.9 | :x: | :heavy_check_mark: | :x: |
159+
| Python 3.9 | :x: | :heavy_check_mark: | :x: |
160160

161161
**Note**:
162162
1. **Conda** is suggested for managing your Python environment. In some cases, using Python outside of a `conda` environment may result in missing header files, causing the installation failure of certain packages.

0 commit comments

Comments
 (0)