Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test df from alstm code #1499

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Conversation

chenditc
Copy link
Contributor

@chenditc chenditc commented Apr 20, 2023

Remove test df from alstm, it's not used.

Description

Remove test df from alstm, it's not used.

Motivation and Context

To prevent information leak, model should still be able to train even when test segment is not defined.

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:
    qrun completed with a config which has no test segment sepcified:
qlib_init:
    provider_uri: "~/.qlib/qlib_data/cn_data"
    region: cn
market: &market csi300
benchmark: &benchmark SH000300
data_handler_config: &data_handler_config
    start_time: 2005-05-01
    end_time: 2022-08-01
    fit_start_time: &fit_start_time 2005-05-01
    fit_end_time: &fit_end_time 2018-12-31
    instruments: *market
    infer_processors:
        - class: RobustZScoreNorm
          kwargs:
              fields_group: feature
              clip_outlier: true
        - class: Fillna
          kwargs:
              fields_group: feature
    learn_processors:
        - class: DropnaLabel
        - class: CSRankNorm
          kwargs:
              fields_group: label
task:
    model:
        class: ALSTM
        module_path: qlib.contrib.model.pytorch_alstm
        kwargs:
            d_feat: 6
            hidden_size: 64
            num_layers: 2
            dropout: 0.0
            n_epochs: 200
            lr: 1.0e-3
            early_stop: 20
            batch_size: 800
            metric: loss
            loss: mse
            GPU: 0
            rnn_type: GRU
    dataset:
        class: DatasetH
        module_path: qlib.data.dataset
        kwargs:
            handler:
                class: Alpha360
                module_path: qlib.contrib.data.handler
                kwargs: *data_handler_config
            segments:
                train: [*fit_start_time, *fit_end_time]
                valid: [2019-01-01, 2022-08-01]

image

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Apr 20, 2023
@chenditc chenditc changed the title Remove test df, not used Remove test df from alstm code Apr 20, 2023
@Fivele-Li Fivele-Li merged commit 9260626 into microsoft:main Apr 27, 2023
@Fivele-Li Fivele-Li added maintenance improving code readability and maintainability and removed waiting for triage Cannot auto-triage, wait for triage. labels Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance improving code readability and maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants