Optimizer launcher cannot resolve its default grid-search strategy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in Optimizer.Launcher/Program.cs and trace how the launcher chooses the default strategy when optimization-strategy is omitted. Reproduce with the provided config.json and dotnet ... --estimate; compare with the explicitly selected strategy, which produces an estimate of 5. Done means the omitted-setting path resolves the default and a regression test covers it.
Written by the indexing model from the issue text.
Description
Problem
The optimizer launcher supplies QuantConnect.Optimizer.GridSearchOptimizationStrategy when optimization-strategy is omitted (Optimizer.Launcher/Program.cs). The class actually lives in QuantConnect.Optimizer.Strategies, so LeanOptimizer cannot resolve the default type and its constructor throws ArgumentNullException (type).
This default is already present on master.
Reproduction
Build Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj. In a fresh working directory, save this as config.json:
{
"optimization-strategy-settings": {
"$type": "QuantConnect.Optimizer.Strategies.StepBaseOptimizationStrategySettings, QuantConnect.Optimizer"
},
"optimization-criterion": {"target": "Statistics.TotalProfit", "extremum": "max"},
"parameters": [{"name": "x", "min": 0, "max": 4, "step": 1}],
"log-handler": "ConsoleLogHandler"
}
Run:
dotnet /path/to/QuantConnect.Optimizer.Launcher.dll --estimate
Observed: the launcher logs a TargetInvocationException wrapping ArgumentNullException: Value cannot be null. (Parameter 'type') from LeanOptimizer's constructor; no estimate is produced.
Add "optimization-strategy": "QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy" to the same file and rerun. Observed: Optimization estimate: 5, exit 0.
Expected
Omitting the strategy must select a resolvable default and produce the same estimate as explicitly selecting that strategy. A regression test should exercise the omitted-setting path.
- Dominant language
- C#
- Stars
- 22.6k
- Forks
- 5.4k
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 104
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QuantConnect/Lean
-
priority:p2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
QuantConnect/Lean#10216 ·
Maintainers usually reply within 1 day
-
priority:p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuantConnect/Lean#10206 ·
Maintainers usually reply within 1 day
-
priority:p2
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
QuantConnect/Lean#10199 ·
Maintainers usually reply within 1 day
-
priority:p2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
QuantConnect/Lean#10198 ·
Maintainers usually reply within 1 day
-
priority:p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuantConnect/Lean#10197 ·
Maintainers usually reply within 1 day
All issues in QuantConnect/Lean
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
dotnet-outdated/dotnet-outdated#871 ·
Maintainers usually reply within 1 day
-
triage/untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
unoplatform/uno#26676 ·
Maintainers usually reply within 1 day
-
.NET bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
jhaizhou-ops/S2Arm#2177 · 3 comments ·
Maintainers usually reply within 1 day
-
area-CodeGen-coreclr untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dotnet/runtime#138181 · 1 comment ·
Maintainers usually reply within 1 day