refactor(generator): remove deterministic speed_profile and hard log_dt clip
These post-processing hacks were added to compensate for small-data training. With Balabit pretraining they suppress the multimodal timing distribution and cause the template-y Δt curves seen in the verify UI.
This commit is contained in:
@@ -104,3 +104,23 @@ class TestGenerate:
|
||||
)
|
||||
# 32 move points + 2 click events = 34
|
||||
assert len(result) == 34
|
||||
|
||||
|
||||
class TestPostProcessing:
|
||||
def test_dt_diversity_preserved(self, model_dir):
|
||||
"""After removing speed_profile + median clip, multiple generations
|
||||
should differ in their Δt sequences (not all identical)."""
|
||||
results = [generate(start=(100, 200), end=(500, 400), model_dir=str(model_dir))
|
||||
for _ in range(5)]
|
||||
# Extract Δt sequences (only move events, not click events)
|
||||
dts = []
|
||||
for r in results:
|
||||
moves = r[:-2]
|
||||
dt_seq = [moves[i+1][2] - moves[i][2] for i in range(len(moves)-1)]
|
||||
dts.append(dt_seq)
|
||||
# At least 2 of the 5 sequences should differ at any given index
|
||||
for i in range(min(len(d) for d in dts)):
|
||||
values = {tuple([d[i]]) for d in dts}
|
||||
if len(values) > 1:
|
||||
return # at least one position has variation — pass
|
||||
pytest.fail("All 5 Δt sequences are identical at every position — diversity collapsed")
|
||||
|
||||
Reference in New Issue
Block a user