Skip to content

8 add more data - #12

Merged
raeesiarya merged 26 commits into
mainfrom
8-add-more-data
Apr 15, 2026
Merged

8 add more data#12
raeesiarya merged 26 commits into
mainfrom
8-add-more-data

Conversation

@raeesiarya

Copy link
Copy Markdown
Owner

No description provided.

raeesiarya and others added 26 commits April 11, 2026 03:20
- Implemented extensive tests for functions in `src/lmlm-audit/run_audit.py`, covering normal, boundary, and edge cases.
- Added logging of diagnostic plots to W&B for visual analysis.
- Created a new test file `test_equivalence.py` with unit tests for all public functions in `src/lmlm-audit/equivalence.py`, ensuring thorough coverage of functionality.
- Included tests for tokenization, normalization, alias handling, and equivalence checking, with W&B visualizations for key metrics.
- tests/conftest.py: new shared W&B session fixture (offline mode by
  default), matplotlib Agg backend, sys.path setup, shared fake DB classes
- tests/test_equivalence.py: new file with 99 tests covering every
  function in equivalence.py including edge cases and two W&B plots
- tests/test_database_states.py: extended from 6 to 65 tests covering
  DatabaseState enum, TargetFact, target_fact_from_prompt_row, all three
  extract_lookup_query patterns, is_deleted_triplet alias/case handling,
  candidate_supports_target_fact all flag combinations, and
  AuditDatabaseManager FULL/DEL-ON/DEL-OFF/no-target-fact paths
- tests/test_metrics.py: extended from 14 to 126 tests covering all rate
  helpers, _group_results_by_fact, _eligible_state_groups, parametric
  leakage/retrieval-mediated-correctness/artifact-rate edge cases, and
  three W&B scatter/bar plots
- tests/test_model_loader.py: filled in from empty to 20 tests for
  _get_best_device (mocked CUDA/MPS), _resolve_database_path (tmp_path),
  and load_model_and_tokenizer import guard + dotenv + pad_token + device
- tests/test_run_audit.py: extended from 2 to 80 tests covering
  clean_answer (20+ cases), extract_lookup_values, choose_answer,
  compute_generation_budget, retrieve_lookup_value fallback policy,
  load_prompts, save_results, and _default_retrieval_trace

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add comprehensive pytest suite with W&B plot logging
@raeesiarya raeesiarya linked an issue Apr 15, 2026 that may be closed by this pull request
@raeesiarya
raeesiarya merged commit e4702a2 into main Apr 15, 2026
1 check passed
@raeesiarya
raeesiarya deleted the 8-add-more-data branch April 15, 2026 20:43
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.

add more data

1 participant