Skip to content

[issue-722] Fix default recorder variable setup#939

Open
lnanduri2005 wants to merge 2 commits into
LikithaDevfrom
issue-722-default-recorder-variables
Open

[issue-722] Fix default recorder variable setup#939
lnanduri2005 wants to merge 2 commits into
LikithaDevfrom
issue-722-default-recorder-variables

Conversation

@lnanduri2005
Copy link
Copy Markdown

Summary

This PR fixes gaps in the default recorder setup for issue #722. The main problem was that some recorder variables were either not registered by default or were registered but not actually being filled with useful data before output was saved.

Changes include:

  • populating STDP/static edge recorder data from active edges each epoch,
  • registering growth variables as dynamic recorder outputs,
  • adding NG911 layout coordinates as constant recorder outputs,
  • updating recorder documentation to match the current generic recorder path.

What changed

For STDP/static edge recording, ConnStatic::updateConnections() now fills the recorder vectors for edge weight, source vertex, and destination vertex. It pushes one value per active edge into three parallel vectors:

  • WCurrentEpoch_
  • sourceVertexIndexCurrentEpoch_
  • destVertexIndexCurrentEpoch_

For the same index, those three values describe the same active edge for that epoch.

For growth simulations, this PR registers the existing growth values radii, rates, outgrowth, and deltaR as dynamic recorder variables.

For NG911, Layout911 already had xloc_ and yloc_, but those are DeviceVector<BGFLOAT> values and cannot be registered directly with the recorder. This PR adds xlocRecorder_ and ylocRecorder_ as recorder-compatible mirrors. These do not replace the original layout coordinates; they only make the coordinates available to the recorder.

The .assign(numVertices_, 0) calls size those recorder mirror vectors to one value per vertex before they are filled from the GraphML coordinates.

Scope

This PR keeps the fix focused. It does not:

  • modify Hdf5Recorder,
  • revive or use Xml911Recorder,
  • record CompleteMatrix fields,
  • change the broader recorder architecture,
  • add a scalar recorder abstraction.

Documentation

Updated docs/Notes/RecordersNotes.md to make the issue #722 recorder behavior easier to follow, including active-edge output, growth dynamic values, NG911 coordinate recording, and Xml911Recorder’s legacy status.

Updated the NG911 user config example to use XmlRecorder.

Verification

  • git diff --check
  • cmake --build build
  • cd build && ./tests — 133 tests passed

Related to #722

@lnanduri2005 lnanduri2005 self-assigned this May 19, 2026
@lnanduri2005 lnanduri2005 added documentation Improvements or additions to documentation NG911 Recorders Re-engineering recorders labels May 19, 2026
@lnanduri2005 lnanduri2005 requested a review from Copilot May 19, 2026 17:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Graphitti’s default recorder variable setup (issue #722) so that key simulation outputs for STDP/static edges, growth simulations, and NG911 layouts are registered and populated with meaningful data before recorder output is saved.

Changes:

  • Populate per-epoch active-edge recorder vectors in ConnStatic::updateConnections() using active edges from AllEdges.
  • Register growth (radii, rates, outgrowth, deltaR) as dynamic recorder variables and NG911 layout coordinates as constant recorder variables via Layout911::registerHistoryVariables().
  • Update recorder documentation and the NG911 configuration example to reflect the current generic XmlRecorder path.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Simulator/Layouts/NG911/Layout911.h Adds recorder mirror vectors and declares registerHistoryVariables() override for NG911 coordinate recording.
Simulator/Layouts/NG911/Layout911.cpp Populates recorder mirrors during setup and registers x_Location/y_Location as constant outputs.
Simulator/Edges/AllEdges.h Adds const accessors for edge source/dest indices, weights, and in-use flags to support recorder extraction.
Simulator/Connections/Neuro/ConnStatic.h Declares updateConnections() override to populate per-epoch edge recorder outputs.
Simulator/Connections/Neuro/ConnStatic.cpp Implements per-epoch active-edge list extraction into recorder vectors.
Simulator/Connections/Neuro/ConnGrowth.cpp Registers growth-related VectorMatrix values as dynamic recorder variables.
docs/User/configuration.md Updates NG911 example to use XmlRecorder instead of legacy Xml911Recorder.
docs/Notes/RecordersNotes.md Updates recorder notes to describe active-edge output, growth variables, NG911 coordinate recording, and legacy Xml911Recorder status.


bool ConnStatic::updateConnections()
{
AllEdges &edges = getEdges();
@lnanduri2005
Copy link
Copy Markdown
Author

I added a USE_GPU-guarded copyEdgeDeviceToHost() call before reading the edge arrays in ConnStatic::updateConnections(). That should make GPU runs record the latest host-side edge state instead of possibly stale values.

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

Labels

documentation Improvements or additions to documentation NG911 Recorders Re-engineering recorders

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants