Skip to content

fix: Let writing data to file at flush#213

Open
filimarc wants to merge 21 commits into
mainfrom
fix/checkpoint_flush
Open

fix: Let writing data to file at flush#213
filimarc wants to merge 21 commits into
mainfrom
fix/checkpoint_flush

Conversation

@filimarc
Copy link
Copy Markdown
Contributor

@filimarc filimarc commented Jan 27, 2026

Describe the work done

Add a fix to the simulation checkpoint integration, since it is the expected behavior. Now when results are flushed they are written to file without storing memory. As discussed backward compatibility is preserved, the new behavior is triggered only when run_simulation method is called specifying output_filename argument, this will be the default when CLI is used.

Refer to issue: #50

Tasks


📚 Documentation preview 📚: https://bsb-nest--213.org.readthedocs.build/en/213/


📚 Documentation preview 📚: https://bsb-neuron--213.org.readthedocs.build/en/213/


📚 Documentation preview 📚: https://bsb-core--213.org.readthedocs.build/en/213/


📚 Documentation preview 📚: https://bsb-arbor--213.org.readthedocs.build/en/213/

@github-actions github-actions Bot added the fix label Jan 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.22%. Comparing base (1f47773) to head (36898eb).

Files with missing lines Patch % Lines
packages/bsb-core/bsb/simulation/results.py 78.57% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
+ Coverage   81.06%   85.22%   +4.15%     
==========================================
  Files         180      123      -57     
  Lines       17815    12596    -5219     
  Branches     2140     1476     -664     
==========================================
- Hits        14442    10735    -3707     
+ Misses       2821     1528    -1293     
+ Partials      552      333     -219     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@filimarc filimarc requested a review from Helveg January 28, 2026 09:20
Copy link
Copy Markdown
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Double check what's going on with multi-sim, and multi-block.

  • Add a test with a 1 sim that writes 3 blocks, and verify data goes into correct blocks
  • Add a test with 3 sims that each write to 2-3 blocks and also verify integrity
  • Add a test that tries to write 10G to disk and check that memory stays flat.

Comment thread packages/bsb-core/bsb/cli/commands/_commands.py Outdated
Comment thread packages/bsb-core/bsb/simulation/results.py
@filimarc filimarc requested a review from Helveg April 17, 2026 10:22
@filimarc
Copy link
Copy Markdown
Contributor Author

I've add the tests suggested, for three sim on the same file and to check the flushing with bsb-neuron.

@Helveg @drodarie why is it compiling bsb-otel readthedocs if is not in this branch?

@drodarie
Copy link
Copy Markdown
Contributor

It is in preparation for the integration of the bsb-otel and related its branch. It is triggered for every PR push so do not worry if it does not pass the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants