round-10: physics-factorial + direct-2048 chain (src/pino/train.py)
Browse files- src/pino/train.py +8 -3
src/pino/train.py
CHANGED
|
@@ -17,7 +17,7 @@ from torch.utils.data import DataLoader
|
|
| 17 |
from torch.utils.tensorboard import SummaryWriter
|
| 18 |
|
| 19 |
from pino.heads import PIMTHeads
|
| 20 |
-
from pino.embeddings import COMBINED_DIM_REAL_POM
|
| 21 |
from pino.pimt_model import (
|
| 22 |
DEFAULT_EMBEDDING_DIM,
|
| 23 |
FragranceTrajectoryDataset,
|
|
@@ -301,7 +301,7 @@ def main():
|
|
| 301 |
parser.add_argument("--log-dir", default="runs")
|
| 302 |
parser.add_argument("--checkpoint-name", default="pimt_v9.pt", help="Filename for the best checkpoint")
|
| 303 |
parser.add_argument("--train-ratio", type=float, default=DEFAULT_TRAIN_RATIO, help="Molecule-disjoint train molecule ratio; default keeps a 15% molecule holdout")
|
| 304 |
-
parser.add_argument("--structural-source", choices=["morgan", "morgan_2048_rp", "openpom_256", "pom_alltags", "disjoint_256"], default="morgan", help="Structural embedding block + objective target: 'morgan' (138-dim Morgan, input 151, 138-dim pyramid) | 'morgan_2048_rp' (2048-bit Morgan token randomly projected to 269 for input-parameter parity with the OpenPOM arm, 138-dim pyramid) | 'openpom_256' (genuine 256-dim OpenPOM, input 269, 138-dim pyramid) | 'disjoint_256' (256-dim MPNN encoder retrained on the benchmark-disjoint corpus, input 269, 138-dim pyramid — leakage-free OpenPOM-style arm) | 'pom_alltags' (genuine 256-dim OpenPOM, input 269, 575-dim molequles all-tags objective)")
|
| 305 |
parser.add_argument("--smoke-test", action="store_true", help="Run lightweight CPU smoke test")
|
| 306 |
parser.add_argument("--use-gamma", action="store_true", help="Add the UNIFAC blend-interaction (gamma) 3rd physics channel; requires a gamma-augmented dataset (physics_gamma field)")
|
| 307 |
parser.add_argument("--split-strategy", choices=["molecule", "formula"], default="molecule", help="molecule = strict molecule-disjoint holdout (default, used for frozen-task headline results); formula = random formula-level holdout (E1 physics-gamma substantivity experiment; discloses molecule leakage for measured-Poucher eval power)")
|
|
@@ -331,7 +331,12 @@ def main():
|
|
| 331 |
|
| 332 |
logger.info("Structural source: %s", args.structural_source)
|
| 333 |
use_pom = args.structural_source in ("openpom_256", "pom_alltags", "disjoint_256")
|
| 334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
objective_dim = 575 if args.structural_source == "pom_alltags" else 138
|
| 336 |
# engine only knows the two structural blocks; the tag target is selected in the dataset via objective_dim
|
| 337 |
engine_source = "openpom_256" if args.structural_source == "pom_alltags" else args.structural_source
|
|
|
|
| 17 |
from torch.utils.tensorboard import SummaryWriter
|
| 18 |
|
| 19 |
from pino.heads import PIMTHeads
|
| 20 |
+
from pino.embeddings import COMBINED_DIM_REAL_POM, MORGAN2048_TOKEN_DIM
|
| 21 |
from pino.pimt_model import (
|
| 22 |
DEFAULT_EMBEDDING_DIM,
|
| 23 |
FragranceTrajectoryDataset,
|
|
|
|
| 301 |
parser.add_argument("--log-dir", default="runs")
|
| 302 |
parser.add_argument("--checkpoint-name", default="pimt_v9.pt", help="Filename for the best checkpoint")
|
| 303 |
parser.add_argument("--train-ratio", type=float, default=DEFAULT_TRAIN_RATIO, help="Molecule-disjoint train molecule ratio; default keeps a 15% molecule holdout")
|
| 304 |
+
parser.add_argument("--structural-source", choices=["morgan", "morgan_2048_rp", "morgan_2048_direct", "openpom_256", "pom_alltags", "disjoint_256"], default="morgan", help="Structural embedding block + objective target: 'morgan' (138-dim Morgan, input 151, 138-dim pyramid) | 'morgan_2048_rp' (2048-bit Morgan token randomly projected to 269 for input-parameter parity with the OpenPOM arm, 138-dim pyramid) | 'morgan_2048_direct' (2048-bit Morgan token fed directly to a learned projection, input 2071 — round-10 control for the RP subspace constraint) | 'openpom_256' (genuine 256-dim OpenPOM, input 269, 138-dim pyramid) | 'disjoint_256' (256-dim MPNN encoder retrained on the benchmark-disjoint corpus, input 269, 138-dim pyramid — leakage-free OpenPOM-style arm) | 'pom_alltags' (genuine 256-dim OpenPOM, input 269, 575-dim molequles all-tags objective)")
|
| 305 |
parser.add_argument("--smoke-test", action="store_true", help="Run lightweight CPU smoke test")
|
| 306 |
parser.add_argument("--use-gamma", action="store_true", help="Add the UNIFAC blend-interaction (gamma) 3rd physics channel; requires a gamma-augmented dataset (physics_gamma field)")
|
| 307 |
parser.add_argument("--split-strategy", choices=["molecule", "formula"], default="molecule", help="molecule = strict molecule-disjoint holdout (default, used for frozen-task headline results); formula = random formula-level holdout (E1 physics-gamma substantivity experiment; discloses molecule leakage for measured-Poucher eval power)")
|
|
|
|
| 331 |
|
| 332 |
logger.info("Structural source: %s", args.structural_source)
|
| 333 |
use_pom = args.structural_source in ("openpom_256", "pom_alltags", "disjoint_256")
|
| 334 |
+
if use_pom or args.structural_source == "morgan_2048_rp":
|
| 335 |
+
embedding_dim = COMBINED_DIM_REAL_POM
|
| 336 |
+
elif args.structural_source == "morgan_2048_direct":
|
| 337 |
+
embedding_dim = MORGAN2048_TOKEN_DIM
|
| 338 |
+
else:
|
| 339 |
+
embedding_dim = DEFAULT_EMBEDDING_DIM
|
| 340 |
objective_dim = 575 if args.structural_source == "pom_alltags" else 138
|
| 341 |
# engine only knows the two structural blocks; the tag target is selected in the dataset via objective_dim
|
| 342 |
engine_source = "openpom_256" if args.structural_source == "pom_alltags" else args.structural_source
|