Skip to content

fix: keep TCN TS singleton batch outputs 1d#2219

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/tcn-ts-single-batch-output
Open

fix: keep TCN TS singleton batch outputs 1d#2219
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/tcn-ts-single-batch-output

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • Keep the time-series TCN model output as a 1-D batch vector for singleton batches.
  • Add a regression test that checks batch size 1 and batch size 2 both keep the batch dimension.

Fixes #1752.

To verify

  • python -m ruff check qlib/contrib/model/pytorch_tcn_ts.py tests/model/test_pytorch_tcn_ts.py
  • python -m py_compile qlib/contrib/model/pytorch_tcn_ts.py tests/model/test_pytorch_tcn_ts.py

Notes

  • python -m pytest tests/model/test_pytorch_tcn_ts.py -q is blocked in my Windows checkout because qlib requires its Cython extensions to be compiled before import. python -m pip install -e . --no-deps reaches the qlib.data._libs.rolling build, but MSVC fails while reading the Python headers with missing io.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qlib/qlib/contrib/model /pytorch_tcn_ts.py error

1 participant