Skip to content

Add source-inner stacker postprocessing#298

Open
FlorianPfaff wants to merge 1 commit into
mainfrom
codex/pymegdec-source-inner-postprocessing-20260606
Open

Add source-inner stacker postprocessing#298
FlorianPfaff wants to merge 1 commit into
mainfrom
codex/pymegdec-source-inner-postprocessing-20260606

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Member

Summary

  • add optional source-inner stacker prediction postprocessing using latent-AE postprocessing helpers
  • select postprocessing from source-inner validation scores and export stable metadata
  • add focused coverage for no-op and source-prior balanced-assignment stacker postprocessing

Validation

  • Not run per request
  • Syntax checked with python -m py_compile src/pymegdec/stimulus_source_inner_stacking.py tests/test_stimulus_source_inner_stacking_postprocessing.py
  • Checked diff with git diff --check

@FlorianPfaff FlorianPfaff enabled auto-merge (squash) June 6, 2026 19:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
❌ COPYPASTE jscpd yes 38 no 4.18s
⚠️ MARKDOWN markdownlint 17 0 1 0 1.06s
✅ PYTHON ruff 146 0 0 0 0.32s
✅ REPOSITORY git_diff yes no no 0.03s
✅ YAML prettier 7 0 0 0 0.54s
✅ YAML v8r 7 0 0 4.11s
✅ YAML yamllint 7 0 0 0.48s

Detailed Issues

❌ COPYPASTE / jscpd - 38 errors
Clone found (python):
 - src/pymegdec/stimulus_logit_stacking.py [249:58 - 260:10] (11 lines, 137 tokens)
   src/pymegdec/stimulus_logit_stacking.py [209:6 - 220:8]

Clone found (python):
 - src/pymegdec/stimulus_cue_low_capacity.py [500:5 - 513:80] (13 lines, 114 tokens)
   src/pymegdec/stimulus_cue_low_capacity.py [188:9 - 201:84]

Clone found (python):
 - src/pymegdec/stimulus_cue_calibration.py [180:84 - 196:52] (16 lines, 123 tokens)
   src/pymegdec/stimulus_cue_low_capacity.py [284:30 - 300:30]

Clone found (python):
 - src/pymegdec/stimulus_covariance_features.py [194:9 - 211:43] (17 lines, 117 tokens)
   src/pymegdec/stimulus_full_epoch_lowrank_neureptrace.py [99:47 - 110:128]

Clone found (python):
 - src/pymegdec/stimulus_covariance_features.py [457:5 - 466:19] (9 lines, 92 tokens)
   src/pymegdec/stimulus_full_epoch_lowrank_neureptrace.py [200:5 - 209:12]

Clone found (python):
 - src/pymegdec/classifiers.py [157:55 - 164:25] (7 lines, 87 tokens)
   src/pymegdec/classifiers.py [95:35 - 102:20]

Clone found (python):
 - src/pymegdec/alpha_metrics.py [445:5 - 461:37] (16 lines, 161 tokens)
   src/pymegdec/alpha_signal.py [65:5 - 81:35]

Clone found (python):
 - src/pymegdec/_stimulus_cross_subject_timefix.py [86:33 - 94:11] (8 lines, 83 tokens)
   src/pymegdec/alpha_signal.py [113:30 - 121:7]

Clone found (python):
 - src/pymegdec/_stimulus_cross_subject_core.py [340:87 - 350:29] (10 lines, 75 tokens)
   src/pymegdec/stimulus_cue_calibration.py [264:91 - 274:37]

Clone found (python):
 - tests/test_stimulus_summary_chance.py [86:68 - 94:3] (8 lines, 89 tokens)
   tests/test_stimulus_summary_chance.py [44:66 - 51:8]

Clone found (python):
 - tests/test_stimulus_source_inner_stacking_postprocessing.py [39:75 - 53:48] (14 lines, 114 tokens)
   tests/test_stimulus_source_inner_stacking_postprocessing.py [18:64 - 32:24]

Clone found (python):
 - tests/test_stimulus_source_inner_stacking.py [81:80 - 86:21] (5 lines, 79 tokens)
   tests/test_stimulus_source_inner_stacking.py [39:78 - 44:21]

Clone found (python):
 - tests/test_stimulus_source_inner_stacking.py [102:31 - 118:46] (16 lines, 98 tokens)
   tests/test_stimulus_source_inner_stacking.py [60:31 - 76:46]

Clone found (python):
 - tests/test_stimulus_source_inner_stacking.py [162:74 - 176:28] (14 lines, 135 tokens)
   tests/test_stimulus_source_inner_stacking.py [123:78 - 137:26]

Clone found (python):
 - tests/test_stimulus_nested_matrix.py [183:83 - 189:45] (6 lines, 77 tokens)
   tests/test_stimulus_nested_matrix.py [155:69 - 159:93]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [94:69 - 99:12] (5 lines, 79 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [70:78 - 75:18]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [117:78 - 133:78] (16 lines, 151 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [48:66 - 63:93]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [142:92 - 158:99] (16 lines, 151 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [48:66 - 63:93]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [212:79 - 228:100] (16 lines, 150 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [48:66 - 63:93]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [228:100 - 235:64] (7 lines, 79 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [160:9 - 166:61]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_postprocessing.py [238:87 - 255:81] (17 lines, 153 tokens)
   tests/test_stimulus_latent_autoencoder_postprocessing.py [48:66 - 228:101]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_head_blend.py [22:72 - 35:78] (13 lines, 140 tokens)
   tests/test_stimulus_latent_autoencoder_head_refit.py [10:65 - 23:11]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_controls.py [446:54 - 461:76] (15 lines, 89 tokens)
   tests/test_stimulus_latent_autoencoder_controls.py [422:5 - 437:64]

Clone found (python):
 - tests/test_stimulus_latent_autoencoder_calibration.py [54:5 - 66:65] (12 lines, 108 tokens)
   tests/test_stimulus_latent_autoencoder_calibration.py [18:5 - 30:55]

Clone found (python):
 - tests/test_stimulus_cue_calibration.py [142:38 - 154:57] (12 lines, 83 tokens)
   tests/test_stimulus_cue_calibration.py [98:35 - 110:35]

Clone found (python):
 - tests/test_source_anova_feature_transform.py [74:22 - 84:16] (10 lines, 94 tokens)
   tests/test_source_anova_feature_transform.py [38:22 - 47:11]

Clone found (python):
 - tests/test_preprocessing.py [47:65 - 57:13] (10 lines, 129 tokens)
   tests/test_preprocessing.py [24:64 - 34:16]

Clone found (python):
 - tests/test_preprocessing.py [142:34 - 151:17] (9 lines, 111 tokens)
   tests/test_preprocessing.py [124:35 - 132:23]

Clone found (python):
 - tests/test_model_transfer.py [222:49 - 261:11] (39 lines, 292 tokens)
   tests/test_model_transfer.py [174:66 - 213:13]

Clone found (python):
 - tests/test_cross_validation.py [142:61 - 157:62] (15 lines, 150 tokens)
   tests/test_cross_validation.py [106:58 - 121:50]

Clone found (python):
 - tests/test_conservative_topk.py [42:59 - 54:19] (12 lines, 83 tokens)
   tests/test_conservative_topk.py [8:50 - 20:14]

Clone found (python):
 - tests/test_conservative_topk.py [79:29 - 93:50] (14 lines, 124 tokens)
   tests/test_conservative_topk.py [42:36 - 56:50]

Clone found (python):
 - tests/test_alpha_movement_projection.py [6:1 - 14:10] (8 lines, 81 tokens)
   tests/test_alpha_sensor_projection.py [11:1 - 19:11]

Clone found (python):
 - tests/test_alpha_movement_projection.py [28:5 - 43:13] (15 lines, 134 tokens)
   tests/test_alpha_sensor_projection.py [128:5 - 143:6]

Clone found (python):
 - tests/test_alpha_movement_power_guard.py [1:1 - 13:18] (12 lines, 90 tokens)
   tests/test_alpha_movement_projection.py [1:1 - 13:21]

Clone found (python):
 - tests/test_alpha_movement_power_guard.py [57:81 - 67:7] (10 lines, 80 tokens)
   tests/test_alpha_movement_power_guard.py [37:59 - 47:11]

Clone found (python):
 - tests/matlab_fixtures.py [24:24 - 32:19] (8 lines, 96 tokens)
   tests/test_stimulus_cross_subject_chance.py [31:25 - 39:19]

Clone found (python):
 - scripts/export_stimulus_cross_subject_cue_calibrated.py [3:1 - 10:27] (7 lines, 72 tokens)
   scripts/export_stimulus_cross_subject_logit_stack.py [3:1 - 10:38]

┌──────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format   │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ yaml     │ 6              │ 303         │ 2098         │ 0            │ 0 (0%)           │ 0 (0%)            │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python   │ 110            │ 18908       │ 172070       │ 38           │ 468 (2.48%)      │ 4300 (2.5%)       │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash     │ 2              │ 112         │ 854          │ 0            │ 0 (0%)           │ 0 (0%)            │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ markdown │ 15             │ 1629        │ 11272        │ 0            │ 0 (0%)           │ 0 (0%)            │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ toml     │ 1              │ 105         │ 572          │ 0            │ 0 (0%)           │ 0 (0%)            │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ json     │ 1              │ 34          │ 140          │ 0            │ 0 (0%)           │ 0 (0%)            │
├──────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total:   │ 135            │ 21091       │ 187006       │ 38           │ 468 (2.22%)      │ 4300 (2.3%)       │
└──────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 38 clones.
HTML report saved to megalinter-reports/copy-paste/html/
ERROR: jscpd found too many duplicates (2.22%) over threshold (2.2%)
Error: ERROR: jscpd found too many duplicates (2.22%) over threshold (2.2%)
    at ThresholdReporter.report (/node-deps/node_modules/@jscpd/finder/dist/index.js:615:13)
    at /node-deps/node_modules/@jscpd/finder/dist/index.js:109:18
    at Array.forEach (<anonymous>)
    at /node-deps/node_modules/@jscpd/finder/dist/index.js:108:22
    at async /node-deps/node_modules/jscpd/dist/bin/jscpd.js:9:5
⚠️ MARKDOWN / markdownlint - 1 error
.github/PULL_REQUEST_TEMPLATE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Archive-scope checklist"]

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

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.

1 participant