Canonical docs
In the research projects
The Compiled project walk_forward scenario establishes the recorded fold identities that compatible Cohort members retain. These selectors are optional Python component APIs. The YAML assessment path exposes metric, direction, top_k and folds; it does not load this selector registry. The Cohort component boundary distinguishes those controls.
What this package owns
Owns the built-in selector strategies that turn completed-experiment artifacts into a list of permutation ids for Cohort, plus the BUILTIN_SELECTORS registry that names them.
Does not own cohort aggregation itself (owned by limen.cohort.Cohort) or experiment execution.
Key entry points
| Entry point | Use case | Notes |
|---|---|---|
BUILTIN_SELECTORS |
Name-to-selector registry | Maps 'all', 'top_n', 'backtest_pareto', 'diverse_metrics' |
all.select |
Use every round | Default; preserves omitted-permutation_ids behavior |
top_n.select |
Rank by one numeric results.csv column |
Requires results.csv in context |
backtest_pareto.select |
Trading-metric Pareto selection | Uses backtest return/risk columns |
diverse_metrics.select |
Spread selection across metric space | Favors complementary rather than similar rounds |
Adjacent modules
limen.cohort.Cohortconsumes the ids these selectors return.limen.experimentproduces the artifacts (results.csv, backtest columns) selectors read.
Quick orientation
| Module or family | Responsibility |
|---|---|
all.py |
Select every permutation |
top_n.py |
Rank by a numeric results column |
backtest_pareto.py |
Pareto front over trading metrics |
diverse_metrics.py |
Diverse spread across metric space |
sfc/├── README.md├── __init__.py├── all.py├── backtest_pareto.py├── diverse_metrics.py└── top_n.pyMerged source PR · 87894eb8Package layout · Limen 6.0.1 · current package validation · package source
Things to know
- Every selector shares the signature
select(context, *, ...). The selector result must ultimately contain nonempty string permutation IDs becauseCohortrejects non-string entries during binding. contextis aSelectorContext(dict[str, Any]) carrying artifacts such ascontext['results']; each selector validates the keys it needs and raisesValueErrorwhen they are missing.top_nrequires a Polarsresults.csvframe. A frame with no usable numeric ranking rows returns[];Cohortthen rejects the empty selection. A missing or wrong-typed frame raises immediately.