1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-15 00:36:55 +08:00

Update test_qlib_from_source_slow.yml's timeout setting. (#1178)

* Update test_qlib_from_source_slow.yml

* Update test_qlib_from_source.yml

* Update test_pit.py

* Update test_pit.py

* Update test_pit.py

* Update test_pit.py
This commit is contained in:
you-n-g
2022-07-06 20:44:10 +08:00
committed by GitHub
parent 623774d8fb
commit a6700d81ff
3 changed files with 15 additions and 7 deletions

View File

@@ -8,7 +8,8 @@ on:
jobs: jobs:
build: build:
timeout-minutes: 120 timeout-minutes: 180
# we may retry for 3 times for `Unit tests with Pytest`
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
@@ -145,6 +146,10 @@ jobs:
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
- name: Unit tests with Pytest - name: Unit tests with Pytest
run: | uses: nick-fields/retry@v2
cd tests with:
python -m pytest . -m "not slow" --durations=0 timeout_minutes: 60
max_attempts: 3
command: |
cd tests
python -m pytest . -m "not slow" --durations=0

View File

@@ -8,7 +8,8 @@ on:
jobs: jobs:
build: build:
timeout-minutes: 120 timeout-minutes: 360
# we may retry for 3 times for `Unit tests with Pytest`
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@@ -39,8 +39,10 @@ class TestPIT(unittest.TestCase):
cn_data_dir = str(QLIB_DIR.joinpath("cn_data").resolve()) cn_data_dir = str(QLIB_DIR.joinpath("cn_data").resolve())
pit_dir = str(SOURCE_DIR.joinpath("pit").resolve()) pit_dir = str(SOURCE_DIR.joinpath("pit").resolve())
pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve()) pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve())
GetData().qlib_data(name="qlib_data_simple", target_dir=cn_data_dir, region="cn") GetData().qlib_data(
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit") name="qlib_data_simple", target_dir=cn_data_dir, region="cn", delete_old=False, exists_skip=True
)
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit", delete_old=False, exists_skip=True)
# NOTE: This code does the same thing as line 43, but since baostock is not stable in downloading data, we have chosen to download offline data. # NOTE: This code does the same thing as line 43, but since baostock is not stable in downloading data, we have chosen to download offline data.
# bs.login() # bs.login()