DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to verify writer-training rewards and trajectories offline with Speaker Mem R1

Run the offline test suite for writer training to confirm rewards and action handling before any RL run.

Short answer: Create the environment with python -m pip install -r code/requirements.txt and python -m pip install -e code/speakermem_pkg; then run PYTHONPATH=code/writer_training:code/speakermem_pkg/src python -m pytest -q code/speakermem_pkg/tests/test_training.py; run python -m py_compile code/writer_training/*.py to check the training scripts compile. All steps.

  • Research
  • Intermediate
  • 30 minutes
  • From the README
  • Any agent

Who it is forAn ML engineer who wants to adapt the SpeakerLevenshtein-based writer training and first confirm the reward and trajectory code behaves as documented.

The problemWriter training involves rewards and action validation, and a silent bug there would waste a full RL run.

The outcomePassing test results for the training module, with no remote model calls needed.

What you need first

  • Python with the ability to create a virtual environment
  • A CPU environment is enough for the quickstart and offline checks
  • Model service credentials (kept outside version control) for full benchmark runs
  • Benchmark payloads placed as described in DATA_SOURCES.md for full evaluations

Steps

  1. Create the environment with python -m pip install -r code/requirements.txt and python -m pip install -e code/speakermem_pkg.
  2. Run PYTHONPATH=code/writer_training:code/speakermem_pkg/src python -m pytest -q code/speakermem_pkg/tests/test_training.py. (inferred, check the README)
  3. Run python -m py_compile code/writer_training/*.py to check the training scripts compile. (inferred, check the README)
  4. Read the reward code in code/writer_training before changing reward weights, since the README only says the tests cover reward behavior. (inferred, check the README)

Prompt for your agent

In the SpeakerMem-R1 repo (2022hpsk/SpeakerMemR1), run the training test file code/speakermem_pkg/tests/test_training.py with the PYTHONPATH the README gives. Expected output is a pytest summary for the training tests. Verify that the test run passes before any change to the writer reward code is accepted.

Caveat. The offline tests do not validate remote model availability or benchmark licensing, and the README reports the RL gain (57.38% to 68.20%) only for a controlled evaluation with retrieval and answering frozen.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for 2022hpsk/SpeakerMemR1 and "Verify writer-training rewards and trajectories offline"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer