refactor: deduplicate and restructure test suite
- extract preprocessing config factories into tests/data/factories.py - keep conftest.py fixtures-only; stop importing builders from it - promote temp_dir fixture to root conftest for cross-directory reuse - unify duplicate BPE tokenizer builders into build_test_tokenizer - merge grpo/dpo online e2e tests into one parametrized integration test - extract engine mock factory and shared model batch builders - drop local tempfile usage in favor of shared fixtures No behavior change: 519 tests pass.
This commit is contained in:
@@ -24,7 +24,7 @@ from astrai.serialization import (
|
||||
load_bin,
|
||||
save_bin,
|
||||
)
|
||||
from tests.data.conftest import make_grpo_no_template_config
|
||||
from tests.data.factories import make_grpo_config
|
||||
|
||||
|
||||
def _rand_seq(length, vocab=1000):
|
||||
@@ -797,7 +797,7 @@ def test_grpo_builder_preserves_response_boundaries(base_test_env):
|
||||
_save_test_tokenizer(base_test_env["test_dir"], tokenizer)
|
||||
|
||||
builder = SectionedMaskBuilder()
|
||||
config = make_grpo_no_template_config()
|
||||
config = make_grpo_config(template=False)
|
||||
config.preprocessing.max_seq_len = 128
|
||||
|
||||
item = {
|
||||
|
||||
Reference in New Issue
Block a user