Skip to content

refactor(token-capture): deduplicate fingerprint helpers - #2996

Merged
ananthsub merged 1 commit into
NVIDIA-NeMo:mainfrom
ananthsub:ansubramania/deduplicate-lineage-utils
Sep 3, 2026
Merged

ananthsub merged 1 commit into
NVIDIA-NeMo:mainfrom
ananthsub:ansubramania/deduplicate-lineage-utils

Conversation

@ananthsub

Copy link
Copy Markdown
Contributor

Summary

  • use nemo_gym.token_id_capture.fingerprint as the single implementation of conversation fingerprinting, context digests, and tool-argument canonicalization
  • preserve imports from lineage for compatibility while routing package, sink, and test imports to the implementation module

Test plan

  • uv run pytest tests/unit_tests/test_conversation_fingerprint.py tests/unit_tests/test_token_capture_golden_vectors.py tests/unit_tests/test_terminal_attribution.py -q
  • uv run pytest tests/unit_tests/test_token_id_capture.py -q
  • uv run pre-commit run --all-files

Use the standalone fingerprint module as the single implementation while preserving lineage import compatibility.

Signed-off-by: Ananth Subramaniam <[email protected]>
@ananthsub
ananthsub merged commit 9287fb7 into NVIDIA-NeMo:main Sep 3, 2026
39 checks passed
@ananthsub
ananthsub deleted the ansubramania/deduplicate-lineage-utils branch September 3, 2026 03:53
pthombre added a commit that referenced this pull request Sep 3, 2026
Resolve conflicts with the fingerprint helper dedup (#2996): lineage.py keeps
the ledger custody helpers and imports the fingerprint functions from
nemo_gym.token_id_capture.fingerprint; sink.py imports assistant_fingerprint
from the new module and keeps the LineageResolver/CaptureLedger protocol names.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Pranav Thombre <[email protected]>
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
## Summary
- use `nemo_gym.token_id_capture.fingerprint` as the single
implementation of conversation fingerprinting, context digests, and
tool-argument canonicalization
- preserve imports from `lineage` for compatibility while routing
package, sink, and test imports to the implementation module

## Test plan
- [x] `uv run pytest tests/unit_tests/test_conversation_fingerprint.py
tests/unit_tests/test_token_capture_golden_vectors.py
tests/unit_tests/test_terminal_attribution.py -q`
- [x] `uv run pytest tests/unit_tests/test_token_id_capture.py -q`
- [x] `uv run pre-commit run --all-files`

Signed-off-by: Ananth Subramaniam <[email protected]>
Signed-off-by: Junkeun Yi <[email protected]>

This branch was previously deployed

1 inactive deployment
public — a7d82440 Deployed Sep 3, 2026 by copy-pr-bot[bot] via release / finalize / notify #2464
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