Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistics Summary Empty in Live Mode #7855

Open
4 tasks done
AlexCatarino opened this issue Mar 18, 2024 · 0 comments
Open
4 tasks done

Statistics Summary Empty in Live Mode #7855

AlexCatarino opened this issue Mar 18, 2024 · 0 comments

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

Be able to retrieve Statistics.Summary as soon as possible.

Actual Behavior

Statistics.Summary is empty in live mode (at least on deployment day)

Potential Solution

It appears that LEAN doesn't generate statistics because it hasn't sampled the benchmark yet:

charts.TryGetValue(BenchmarkKey, out var benchmarkChart) &&
benchmarkChart.Series.TryGetValue(BenchmarkKey, out var benchmark)

Lean\Engine\Results\BaseResultsHandler.cs line 859

A potential solution is to sample the benchmark or skip statistics that take it into account.

Reproducing the Problem

Live deployment that logs the summary:

statistics = self.Statistics.Summary
statisticsStr = "\n\t".join([f"{kvp.Key}: {kvp.Value}" for kvp in statistics])

statisticsStr is an empty string.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant