Coverage for lab/objectives.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.17.3, created at 2026-11-22 12:55 +0000

1"""The names of the ranking objectives the trainers accept (torch-free, so configs validate without torch).""" 

2 

3from __future__ import annotations 

4 

5CONTEXT_OBJECTIVES = frozenset({"ls_sharpe", "class_balanced", "cost_aware"}) # objectives that read the row context (asset class, ticker, forward return) 

6RANKING_OBJECTIVES = ("mse", "soft_spearman", "listnet", "ic_pearson", "ls_sharpe", "class_balanced", "cost_aware") 

7CONTEXT_CLASSES = ("equity", "bond", "forex", "crypto")