Skip to content

Conversation

@Ayush10
Copy link

@Ayush10 Ayush10 commented Jan 30, 2026

Summary

  • Moves PROTOCOL_VERSION, NUM_USABLE_CPU, DISK_DATASET_CACHE, SIMPLE_DATASET_CACHE, DISK_EXPRESSION_CACHE, and DEPENDENCY_REDIS_CACHE from qlib/config.py to qlib/constant.py
  • Constants are re-imported in config.py to maintain full backward compatibility
  • Removes unused multiprocessing import from config.py (was only used for cpu_count() which moved with NUM_USABLE_CPU)

Test plan

  • Verified all constants are accessible from both qlib.constant and qlib.config
  • Verified C (global config) still works correctly with moved constants
  • Existing tests pass without modification

Closes #807

Moves PROTOCOL_VERSION, NUM_USABLE_CPU, DISK_DATASET_CACHE,
SIMPLE_DATASET_CACHE, DISK_EXPRESSION_CACHE, and DEPENDENCY_REDIS_CACHE
from qlib/config.py to qlib/constant.py where other project constants
already reside. The constants are re-imported in config.py to maintain
backward compatibility.

Closes microsoft#807
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.

[Refactor] Seperate the constant part from config.py.

1 participant