Skip to content

test: add AssociativeMemoryBank coverage#273

Open
xiaokhkh wants to merge 3 commits into
google-deepmind:mainfrom
xiaokhkh:test-associative-memory-bank
Open

test: add AssociativeMemoryBank coverage#273
xiaokhkh wants to merge 3 commits into
google-deepmind:mainfrom
xiaokhkh:test-associative-memory-bank

Conversation

@xiaokhkh

Copy link
Copy Markdown

Summary

Adds focused unit coverage for AssociativeMemoryBank without changing production behavior.

Covered behavior:

  • duplicate suppression by default
  • duplicate retention with allow_duplicates=True
  • newline normalization during add
  • associative retrieval ordering with deterministic embeddings
  • recent retrieval window ordering
  • non-positive retrieval limit validation
  • get_state / set_state preserving pending memories and duplicate hashes

Part of #205.

Testing

  • PYTHONPATH=. python -m pytest -q concordia/associative_memory/basic_associative_memory_test.py
  • PYTHONPATH=. python -m pylint --errors-only concordia/associative_memory/basic_associative_memory_test.py
  • python -m pyink --check concordia/associative_memory/basic_associative_memory_test.py
  • PYTHONPATH=. python -m pytype concordia/associative_memory/basic_associative_memory.py concordia/associative_memory/basic_associative_memory_test.py

@google-cla

google-cla Bot commented May 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@xiaokhkh xiaokhkh force-pushed the test-associative-memory-bank branch from 18c7d99 to 01fbfaa Compare June 1, 2026 02:49

@jzleibo jzleibo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me

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