Record bounded Qwen3.5-2B pilot and stratified diagnostics
This commit is contained in:
@@ -107,6 +107,25 @@ class PilotTests(unittest.TestCase):
|
||||
plot_main()
|
||||
self.assertTrue(validate(root)['passed'])
|
||||
self.assertEqual(len(list((root / 'figures').glob('*.pdf'))), 6)
|
||||
import csv
|
||||
from collections import defaultdict
|
||||
with (root / 'analysis/null_histograms.csv').open() as f:
|
||||
bins = list(csv.DictReader(f))
|
||||
areas = defaultdict(float)
|
||||
counts = defaultdict(int)
|
||||
sizes = {}
|
||||
for row in bins:
|
||||
key = (row['mode'], row['ndim'], row['method'])
|
||||
areas[key] += float(row['density']) * (float(row['bin_right']) - float(row['bin_left']))
|
||||
counts[key] += int(row['count'])
|
||||
sizes[key] = int(row['samples'])
|
||||
self.assertTrue(areas)
|
||||
for key in areas:
|
||||
self.assertAlmostEqual(areas[key], 1.)
|
||||
self.assertEqual(counts[key], sizes[key])
|
||||
with (root / 'analysis/heatmap_pairs.csv').open() as f:
|
||||
cells = list(csv.DictReader(f))
|
||||
self.assertTrue(all(row['verified'] == 'False' for row in cells if row['identity'] == 'True'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user