Mixed_CFM: absorb Unified_CFM primitives; remove Unified_CFM
Mixed_CFM was loading AdaLNBlock / SinusoidalTimeEmb / _sinkhorn_coupling and flow-feature helpers from Unified_CFM via importlib spec hacks. Pulled those symbols into Mixed_CFM/_layers.py (model primitives) and inlined the flow-feature loader helpers into Mixed_CFM/data.py, then deleted Unified_CFM/ entirely along with three dead aggregate shell scripts whose referenced eval entry point (artifacts/verify_2026_04_24/) was already gone. Verified: historic janus_iscxtor2016_seed42 checkpoint re-evaluated under the absorbed code reproduces all 10 phase1 AUROC scores to 6 decimals; same-seed retrain converges to within +/-0.001 on terminal_norm (residual drift is CUDA non-determinism in MultiheadAttention + Sinkhorn argmax, not the absorption). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,23 +1,14 @@
|
||||
from __future__ import annotations
|
||||
import math
|
||||
import sys as _sys
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path as _Path
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
import importlib.util as _ilu
|
||||
import sys as _sys
|
||||
from pathlib import Path as _Path
|
||||
_UNIFIED_NAME = 'unified_cfm_model'
|
||||
if _UNIFIED_NAME not in _sys.modules:
|
||||
_unified_spec = _ilu.spec_from_file_location(_UNIFIED_NAME, _Path(__file__).resolve().parents[1] / 'Unified_CFM' / 'model.py')
|
||||
_unified = _ilu.module_from_spec(_unified_spec)
|
||||
_sys.modules[_UNIFIED_NAME] = _unified
|
||||
_unified_spec.loader.exec_module(_unified)
|
||||
else:
|
||||
_unified = _sys.modules[_UNIFIED_NAME]
|
||||
AdaLNBlock = _unified.AdaLNBlock
|
||||
SinusoidalTimeEmb = _unified.SinusoidalTimeEmb
|
||||
_sinkhorn_coupling = _unified._sinkhorn_coupling
|
||||
|
||||
_sys.path.insert(0, str(_Path(__file__).resolve().parent))
|
||||
from _layers import AdaLNBlock, SinusoidalTimeEmb, _sinkhorn_coupling
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user