Skip to content

fix: remove redundant code in memcell extraction#59

Merged
cyfyifanchen merged 1 commit into
EverMind-AI:mainfrom
deadpool66:fix/remove-redundant-code
Feb 11, 2026
Merged

fix: remove redundant code in memcell extraction#59
cyfyifanchen merged 1 commit into
EverMind-AI:mainfrom
deadpool66:fix/remove-redundant-code

Conversation

@deadpool66
Copy link
Copy Markdown
Contributor

Summary

This PR fixes two redundant code issues in the memcell extraction pipeline:

  1. Duplicate summary_text assignment in conv_memcell_extractor.py

    • Removed the duplicate summary_text assignment on lines 514-516
    • This code was already computed earlier in the boundary detection logic
  2. Redundant cluster state file exports in stage1_memcells_extraction.py

    • Removed redundant manual file exports for cluster state and cluster map on lines 533-550
    • The cluster_storage.save_cluster_state() method already handles saving both cluster_state and cluster_map internally
    • These manual exports were duplicating the work already done by InMemoryClusterStorage

Changes Made

Modified Files:

  • src/memory_layer/memcell_extractor/conv_memcell_extractor.py: Removed duplicate summary_text assignment
  • evaluation/src/adapters/evermemos/stage1_memcells_extraction.py: Removed redundant cluster state file exports

Impact:

  • Cleaner, more maintainable code
  • Removes redundant I/O operations for cluster state exports
  • No functional changes - these were purely cosmetic/cleanup changes

Testing

  • Code changes are minimal and safe
  • Memcell extraction functionality remains unchanged
  • Cluster state persistence still works correctly (via InMemoryClusterStorage)
  • Run existing test suite to verify no regressions

Notes

These changes improve code quality by removing unnecessary duplication and leveraging existing storage abstractions. The cluster_storage.save_cluster_state() method is designed to save all necessary cluster-related files, making manual exports redundant.

- Remove duplicate summary_text assignment in conv_memcell_extractor.py
- Remove redundant cluster state file exports in stage1_memcells_extraction.py since cluster_storage.save_cluster_state already handles saving both cluster_state and cluster_map internally

Co-Authored-By: Claude <noreply@anthropic.com>
@cyfyifanchen cyfyifanchen merged commit 679f20e into EverMind-AI:main Feb 11, 2026
wangmax2011 pushed a commit to wangmax2011/EverMemOS that referenced this pull request Feb 27, 2026
- Remove duplicate summary_text assignment in conv_memcell_extractor.py
- Remove redundant cluster state file exports in stage1_memcells_extraction.py since cluster_storage.save_cluster_state already handles saving both cluster_state and cluster_map internally

Co-authored-by: root <root@nlu-guishangtong-sbajo4-0.nlu-guishangtong-sbajo4.lizr-a.svc.dev00-bcebj.local>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants