Skip to content

Release v0.2.0 — framework, docs, and README - #3

Merged
Roy-Kid merged 142 commits into
masterfrom
dev
Jun 14, 2026
Merged

Roy-Kid merged 142 commits into
masterfrom
dev

Conversation

@Roy-Kid

@Roy-Kid Roy-Kid commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Brings master up to the current dev line of development so the framework, documentation, README, and CLAUDE.md are publicly visible, and cuts v0.2.0.

Highlights (since the initial 0.1.0 scaffold)

  • molix execution/analysis stack — molix.md (Langevin velocity-Verlet MD), molix.analysis (trajectory diagnostics + thermal-noise verdict), molix.quant (weight quantization, paired force-Δ, effective temperature), molix.export (AOT Inductor) and molix.compile (torch.compile / CUDA-graph capture).
  • Data pipeline — single-file PackedCache (mmap, HPC-inode-friendly), token-budget dynamic batch sampler, packed-aware collate fast path; MolRecSource and a bulk-water RPBE-D3 loader.
  • molzoo reference models — PiNet (functorch forces + ghost padding for CUDA-graph EF training) and Sonata, each with a paper-traceable spec + molzoo-auditor.
  • molpot — LES screened-Coulomb electrostatics, multipole QM/MM kernels, Sonata composer.
  • Trainer hardening — async Zarr JournalHook, on-device metrics, eval-phase hook lifecycle, fixed TrainState namespace contract.
  • molnex check CLI + cleared ty hard errors; GitHub Actions CI + pre-commit.

Notable fixes

  • RevMD17Source now downloads directly from the figshare REST API using only the stdlib — molix no longer imports the sibling molhub package (their coupling is protocol-based via the DataSource protocol).

See CHANGELOG.md for the full list.

Note: master was an early snapshot; this PR reconciles it with the 130+ commits of work on dev.

🤖 Generated with Claude Code

Roy-Kid and others added 30 commits December 21, 2025 21:22
- molix/data: 新增 datamodule/pipeline/source/task 架构,移除旧 atom_td/preprocess
- molpot: 新增 composition/derivation/pooling 模块,重构 potentials 和 heads
- molrep: 新增 radial_mlp interaction,重构 readout,移除旧 heads.py
- molzoo: 简化 MACE/Allegro encoder,移除 readout 耦合
- 测试: 新增 symmetry/mace_encoder/composition/transform 测试套件
- 文档: 全面更新各模块文档和 specs
- 全部测试通过 (359 passed, 15 xfailed)
- pyproject.toml: 添加 ruff/ty 到 dev 依赖,配置 [tool.ruff] 和 [tool.ty]
- ruff: 启用 E/F/W/I 规则,忽略 ML 惯用写法 (E741/F403/F405),__init__.py 免 F401
- ty: 降级外部库假阳性 (torch stubs/mollog/cuequivariance) 为 warning
- 修复所有真实类型问题:
  - logger.py: 添加 -> logging.Logger 返回类型注解
  - trainer.py/hooks.py: 修复 logger 模块名与变量名冲突 (用别名导入)
  - trainer.py: 添加 assert model is not None 在训练开始
  - train_step/eval_step: 添加运行时断言确保 model/loss_fn/optimizer 非空
  - task.py: 统一 execute(data: dict) 参数名以符合 LSP
  - dataset.py: 改为 Dataset[Any] 泛型
  - bond/angle/dihedral_harmonic.py: 添加类级别 Tensor 类型注解
  - polarization.py: 将 callable 改为 Callable
  - md17.py: 为 SSL bypass 添加 type: ignore 注释
- ruff 格式化 57 个文件,全部检查通过 (0 错误)
- ty: 0 错误,29 个警告 (均为外部库限制)
- pyproject.toml: add ruff/ty to dev deps, configure [tool.ruff] and [tool.ty]
- ruff: enable E/F/W/I rules, ignore ML idioms (E741/F403/F405), exempt F401 in __init__.py
- ty: downgrade false positives from external stubs (torch/mollog/cuequivariance) to warnings
- fix real type issues:
  - logger.py: add -> logging.Logger return annotation
  - trainer.py/hooks.py: fix logger module/variable name clash via aliased import
  - trainer.py: assert model is not None before training loop
  - train_step/eval_step: add runtime asserts for model/loss_fn/optimizer
  - task.py: unify execute(data: dict) param name for LSP compliance
  - dataset.py: switch to Dataset[Any] generic
  - bond/angle/dihedral_harmonic.py: add class-level Tensor annotations for buffers
  - polarization.py: replace bare callable with Callable
  - md17.py: add type: ignore for intentional SSL context bypass
- ruff formats 57 files, all checks pass (0 errors)
- ty: 0 errors, 29 warnings (all from third-party stub limitations)
Support stopping training by step count in addition to epochs.
When both max_epochs and max_steps are provided, training stops
at whichever limit is reached first. Also removes stale .dylib
build artifact.
- Add amp_dtype parameter to DefaultTrainStep (autocast + GradScaler)
  and DefaultEvalStep (autocast only), using modern torch.amp API
- Add on_after_backward hook point between backward and optimizer.step
- Add GradClipHook: clips gradients at on_after_backward stage
- Add ActivationCheckpointingHook: wraps model layers at on_train_start
  with use_reentrant=False
- DefaultTrainStep() with no args is fully backward-compatible

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gle, and benchmark infrastructure

Integrate profiling, torch.compile, and DataLoader tuning into a measurable
feedback loop so every change can answer: data-slow, operator-slow,
communication-slow, or compile graph-break?

- DataModule: add persistent_workers and prefetch_factor params
- molix.compile: maybe_compile() toggle + count_graph_breaks() via dynamo.explain
- DataLoaderProfilingHook: wall-clock data-wait vs compute timing (hook-internal state)
- ProfilerHook.for_diagnosis(): convenience factory for full perf diagnosis
- benchmarks/: 180 pytest-benchmark tests covering molix ops, molrep blocks, molzoo encoders
  (forward, backward, compiled, graph-break detection across small/medium/large sizes)
- pytest-benchmark added to dev deps; bm_*/BM* discovery configured

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add unified checkpoint infrastructure: Checkpoint dataclass for
state_dict/load_state_dict of model, optimizer, lr_scheduler, AMP
scaler, and RNG states. Abstract CheckpointBackend protocol with
TorchSaveBackend (atomic writes). Trainer gains lr_scheduler_factory,
use_amp, resume_from_checkpoint (with torchrun elastic auto-detect).
CheckpointHook supports save_best and elastic snapshots. Remove all
backward-compat guards: model/loss_fn/optimizer_factory now required.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

# Conflicts:
#	src/molix/core/hooks.py
#	src/molix/core/steps/eval_step.py
#	src/molix/core/steps/train_step.py
Three algorithmic corrections vs the original pair-only implementation:

1. Many-body neighbourhood aggregation (Fix 1 — correctness):
   Each AllegroLayer now aggregates neighbourhood information before the
   tensor product instead of reusing the fixed single-edge spherical
   harmonics.  env_w (from current edge scalars) pre-scales tensor_features
   on the LEFT side of the TP; unweighted Y's are scatter-averaged to source
   nodes and used as the RIGHT side.  By TP bilinearity this is equivalent
   to the reference Allegro's per-edge-weighted Y aggregation while keeping
   the right-hand side single-channel (sh_irreps) for the fast
   ChannelWiseTensorProduct kernel path.

2. DenseNet scalar accumulation (Fix 2 — expressiveness):
   AllegroLayer now takes accumulated_scalars (all previous layer outputs
   concatenated) instead of just the current scalar.  Each layer's latent
   MLP input grows as (layer_idx + 1) * num_scalar + num_tensor, matching
   the dense skip-connection structure of the reference implementation.

3. Type embedding concatenation (Fix 3 — representational fidelity):
   PairEmbedding now concatenates source and destination type embeddings
   instead of taking their element-wise product, preserving the
   centre-neighbour directionality of each bond.

Also adds two module-level helpers (_env_weight_harmonics, _scale_by_channel)
that consolidate the ir_mul channel-scaling loop used in multiple places.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Pipeline DSL: rename `PipelineDSL` → `Pipeline`; delete `pipeline()`
  factory. Instantiate builders directly.
- Cache helpers move onto `PipelineSpec`: `compute_cache_identity` →
  `cache_identity()`, `is_cache_ready` → staticmethod. `identity.py`
  deleted; `dataset.is_cache_ready` removed (private `_is_ready` kept).
- Datasets: `QM9_TARGET_SCHEMA` / `REVMD17_TARGET_SCHEMA` /
  `THREEBPA_TARGET_SCHEMA` become `<Source>.TARGET_SCHEMA` class
  attributes. `download_qm9()` becomes `QM9Source.download()`
  classmethod. All three module-level constants/functions dropped from
  re-exports.
- `molix.logging`: new stdlib-compatible facade over mollog. Exposes
  `basicConfig`, `getLogger`, `shutdown`, level constants (`DEBUG`,
  `INFO`, …) and snake-case aliases. Configures the `"molix"` logger
  with `propagate=False` so projects configuring their own mollog root
  are not affected.
- `BaseDataset.split(sizes=(n, m, ...))` for N-way splits alongside the
  existing 2-way `ratio=` API.

Tests + docstrings migrated to the new API.
…e-generic

- Drop vendored pytorch_scatter port (CPU+CUDA scatter/segment_coo/segment_csr,
  ~3.4k lines). `F.scatter_sum` / `batch_add` now thin wrappers over
  `torch.zeros + scatter_add_`.
- Centralize op schemas in new `molix_library.cpp` (`get_neighbor_pairs`,
  `pme_direct`, `pme_reciprocal`); add `molix_meta.cpp` so `torch.compile` /
  FakeTensor can trace through them. Move `accessor.cuh` to `include/molix/`.
- Rename op namespace `pme` / `neighbors` → `molix`; Python wrappers call
  `torch.ops.molix.*` and own dtype/shape validation. Drop `check_errors`
  param + the C++ `TORCH_CHECK` wall in `get_neighbor_pairs`.
- Make PME CPU+CUDA dtype-generic via `AT_DISPATCH_V2` over float/double.
  Extract algorithm bodies into free template kernels; CUDA keeps
  `<scalar_t, PME_ORDER>` so order-4/5 spline loops stay compile-time const.
- Fix PME CPU recip-grid lifetime: `torch::zeros` instead of
  `std::vector + from_blob` so the FFT input outlives the call.
- Drop `nn.PMEElectrostatics` wrapper (was bound to a non-existent
  `pme_kernel` op); real users compose `pme_direct` + `pme_reciprocal`.
… edge convention

- Trainer: accept device= param, move model to device at train() start
- Add batch_to_device() helper (handles TensorDict/GraphBatch/plain dict)
- train_step / eval_step: move each batch to model device before forward
- NeighborList: add symmetry=True flag for full bidirectional edges; negate
  deltas so bond_diff = pos[target] - pos[source] (source→target convention)
- hooks.py: use `is not None` for model/optimizer truth tests; fix Log hook
  to fire on clean global-step multiples; remove stale MetricsHook.on_epoch_end
- CLAUDE.md: document edge convention (bond_diff direction, symmetry modes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pipeline becomes a pure declarative spec (what tasks, in what order, with
what identity). Execution, caching, and DDP coordination move to dedicated
workflow-facing modules:

* molix.data.execute — run(), transform(), collect_task_states()
* molix.data.cache   — cache(), cache_key(), is_ready(), save(), load()
* molix.data.ddp     — rank(), wait_for_ready()

Dataset no longer owns cache validation (CacheValidationError removed);
callers own placement and invalidation policy.
Jichen Li and others added 27 commits June 11, 2026 11:10
The aten-level op table says which kernel is hot, not which part of the
model. Add run(submodules=True): a separate hooked forward-only pass
attributes per-step forward time to the module's top-level named children
(e.g. embedding vs interaction vs readout). Container children
(ModuleList/Sequential/ModuleDict) are expanded into their entries —
the container is never called directly, so a hook on it never fires and
an interaction stack would otherwise be invisible.

Reported as a 'forward by submodule' table (ms/step, %captured, Σ row);
the Σ-vs-Forward gap is inline/functional ops not inside a named child.
On a MACE encoder it puts interactions.0/.1 at ~70% of captured forward.

CUDA-event timed on GPU, perf_counter on CPU; the pass is isolated so
hook overhead never lands in the wall/op windows. 3 tests incl. the
ModuleList-expansion case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bench_pinet.py --device cpu: ModuleProfiler component + submodule
breakdown (3 GC blocks = 98% of forward) plus a torch.profiler CPU op
table (mm 36%, index_put 15%, bmm 9.5%, tanh 8.8%).

--device cuda: a {eager, inductor, cudagraphs, reduce-overhead} ×
{fp32, bf16-mixed, fp16-mixed, fp64} matrix (CUDA graphs treated as a
compiler via backend='cudagraphs' and mode='reduce-overhead'); each cell
reports wall/step, atoms/s, launch-bound%, with per-cell try/except so an
unsupported combo doesn't sink the matrix.

run_gh200_pinet.sbatch builds/refreshes the aarch64 ext and runs the
cuda matrix on a Grace-Hopper node.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The real EF train step (PiNetPotential(compute_forces=True), train mode)
derives F=-dE/dpos via autograd.grad(create_graph=True) and the EF loss
double-backprops through it — heavier and shaped differently from the
encoder-only forward this missed before.

--device cpu: component + submodule + CPU op table. Measured: EF step
~2x the encoder-only step; force_derivation alone is 54% of forward;
aten::mm 36%, _index_put_impl_ 14% (consistent PiNet hotspot), bmm 12%.

--device cuda: eager EF across {fp32,bf16,fp16,fp64}, a bs16-vs-bs64
batch sweep (the launch-bound remedy when compile is unavailable), and
compile_energy / reduce-overhead attempts to confirm/quantify the
documented double-backward failure for force training.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Answers the open questions the EF matrix skipped: does compiling ONLY the
energy forward (force derivation stays compiler.disable'd / eager) help,
and is CUDA graphs actually exercised. Self-timed harness over
{EF-train, EF-infer, energy-only} × {eager, inductor, cudagraphs,
reduce-overhead}, controlling train/eval and create_graph explicitly:

- EF-train: double backward through the compiled energy region — expect
  fail for every compiled backend (eager only).
- EF-infer: create_graph=False, single backward, force grad eager — the
  energy region can compile; measures the speedup + whether cudagraphs help.
- energy-only: compile_energy's intended regime.

cudagraphs is now a standalone backend column (not just folded into
reduce-overhead).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The compile_energy docstring warned only that aot_autograd (inductor /
reduce-overhead) raises on the EF double backward. But backend='cudagraphs'
does NOT raise — it runs ~5.7x faster and silently returns wrong gradients.

GH200 verification (benchmarks/verify_pinet_cudagraph_ef.py, fp32 + fp64,
same weights, eager vs compile_energy(cudagraphs)):
  - forward energy/forces match eager to machine precision (fp64 ~1e-15)
  - parameter grads after the double backward diverge ~4e-4 relative
  - the gap persists in fp64 at 10^10x the eager-vs-eager scatter_add noise
    floor → a real correctness bug, not fp32 reduction-order noise

So all three compile backends are unusable for force *training*: inductor/
reduce-overhead crash, cudagraphs corrupts grads. Force training stays eager;
the launch-bound remedy is a bigger batch (bs64 ~3x EF throughput). Force
inference (create_graph=False) compiles fine and is correct.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… corrupt

Earlier commit (5badf95) overstated: the richer GH200 diagnostic (cosine
similarity + whole-gradient rel-L2 + per-param distribution) shows the
cudagraphs double-backward gradients are NOT 'silently corrupt'. Direction
is identical (cosine 1.000000), whole-gradient ‖Δg‖/‖g‖ ≈ 1–2e-5, worst
single param ~3–5e-4, zero params over 0.1%. The gap persists in fp64
(above the ~1e-16 eager-vs-eager floor) so it is a real systematic
deviation — not bit-equivalent to eager — but tiny and direction-preserving,
far under fp32 training noise. Reworded the docstring accordingly and added
the cosine/rel-L2/per-param diagnostics to the verify script.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prior PiNet numbers were all rank=3, fp32 and never labeled as such. This
sweeps both held-fixed axes: rank {1,3,5} × precision {fp32,fp64,bf16-mixed,
fp16-mixed} × compiler {eager,inductor,cudagraphs,reduce-overhead} for EF
force training, with a per-cell weight snapshot so the cudagraphs-vs-eager
gradient correctness (cosine + rel-L2) is measured on identical params.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-targets the EF benchmark to the JCTC PiNN-suite config: PiNN-documented
PiNet defaults (depth=5, rc=6.0, gaussian n_basis=10, pp/ii=[16]*4, pi=[16],
hidden=16) over real rMD17 aspirin (NeighborList rc=6.0, batch_size=32 — the
experimental ~30-step/epoch over the ~950-config split). Variants map to the
paper: PiNet=rank1, PiNet2-P3=rank3, PiNet2-P5=rank5.

Adds an accuracy table (energy/force MAE vs the fp64 eager reference per
variant×precision) alongside the speed matrix and cudagraphs grad-correctness
— the precision axis feeds the downstream quantization→MD study.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…udagraphs only

inductor/reduce-overhead are already established to crash on the EF double
backward, so sweeping them again is wasted GPU. Keep eager (speedup +
correctness + fp64-accuracy baseline) and cudagraphs (the one usable
compiler). 24 cells instead of 48.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ergence

Trains PiNet2-P3 on rMD17 aspirin (950/50, paper config, AtomicDress +
energy_force_mse, bs=32, Adam 1e-3) twice from the same seed — eager and
compile_energy(cudagraphs) — logging per-epoch train/val E/F MAE+RMSE and
reporting final values side by side. Answers whether the cudagraphs
double-backward grad deviation (~1e-7) accumulates over training or the
two converge to the same accuracy. Materialises PiNet lazy params with a
warm-up forward before building the optimizer/compiling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The first real-training run revealed compile_energy(cudagraphs) crashes in
a sustained EF training loop (not just profiling): the create_graph=True
double backward is incompatible with aot_autograd's donated-buffer
optimisation (RuntimeError requires create_graph=False). Profiling missed
this — it called backward() without optimizer.step() over few steps. Set
torch._functorch.config.donated_buffer=False so the cudagraphs run trains;
eager (val E-MAE 2.30, F-MAE 1.74 at 300 epochs) is unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Makes cudagraphs viable for variable-neighbor force training by padding
every rMD17 batch to a constant shape: one far ghost atom (>rc → cosine
cutoff zeros it) as the target for dead padding edges, ghost energy routed
to a discard graph, a wrapper slices outputs back to real size. fp64
correctness gate confirms padded==unpadded exactly (max|ΔE|=max|ΔF|=0).
Trains eager vs compile_energy(cudagraphs) on identical seed/data and
compares E/F MAE/RMSE + speedup. donated_buffer=False so the double
backward survives compilation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ation

The padded-training warm-up forward used a CPU dataloader batch against a
cuda model → device mismatch. Move it to device first (the gate already
built its batch on device, so it passed; only train_once's warm-up was
wrong). Padding correctness gate confirmed exact on GPU (fp64 ΔE=8.9e-16).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…f buffers

PiNet creates cutoff/basis buffers (r_cut) lazily on the first forward, on
the default CPU device — model.to(device) ran before that and missed them,
so training crashed in CosineCutoff (r cuda vs r_cut cpu). Sweep with a
second inner.to(device) after the materialisation forward.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d batches

Two fixes: (1) the device mismatch — PaddedDataModule now moves each
collated batch to device before pad_batch, so the hand-built padded TD is
fully on-device (no reliance on the trainer's per-batch move). (2) GPU
sbatch now uses the prebuilt /home/jicli594/work/molcrafts/.aarch64 venv
(molnex editable on the main checkout, own aarch64 ext) instead of building
a .venv-gpu that editable-installs into the worktree and clobbers the shared
x86 .so every run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The prebuilt .aarch64 ext is built with GCC 14.3 (needs CXXABI_1.3.15); the
node's /lib64/libstdc++.so.6 is too old. Prepend the buildenv GCC lib dir to
LD_LIBRARY_PATH (same as the CPU sbatch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pad_batch dropped the forces/energy *targets* when it rebuilt the padded
atoms/graphs TDs → loss KeyError('forces'). And padded targets (673/33)
wouldn't match the wrapper's sliced preds (672/32) anyway. Fix: padded
namespaces carry only model inputs; lift real-sized E/F targets to
top-level E_tgt (B,) / F_tgt (N,3); custom ef_loss_padded + MetricsHook
read those against the sliced predictions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…training-verified)

The padded end-to-end training settled it: compile_energy(cudagraphs) for
EF force training RUNS (donated_buffer=False + fixed-shape ghost padding,
~2x faster) but converges to force MAE ~24 vs eager ~1.9 on rMD17 aspirin
(13x worse, 300 epochs, identical seed/data/padding; eager+same-padding
matches plain eager so padding is exonerated). The benign single-step grad
deviation (~1e-7) accumulates catastrophically over the double-backward
training. Replaces the earlier 'tiny, likely harmless' wording — it is not.
Force training stays eager; the launch-bound remedy is a larger batch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…al-phase lifecycle, compile WIP

Combined landing of in-flight trainer work plus the non-blocking logging path:

Logging / metrics (no hot-path CPU<->GPU sync):
- JournalHook async_writes mode: GPU scalars -> pinned CPU buffer (non_blocking)
  + cuda.Event; single background thread drains via event.query() (requeue if
  not ready), per-key step order preserved, drain-before-close, CPU fallback.
- metrics.compute() returns a 0-d device tensor (torchmetrics contract); train
  metrics stored on-device, eval float()-ed only on the cold path for best_metric.

MetricsHook lifecycle:
- on_eval_phase_start resets eval accumulators at start of every eval phase;
  train_every_n_steps throttle.

Plus snapshotted WIP: AMP/sync-removal in steps, profiler overhaul, io/writer,
losses, datamodule, checkpoint/early_stop/progress, new molix.core.seed module,
pinet energy/force compile path + GPU benchmark suite; sonata.py removed.

Spec: .claude/specs/trainer-hardening-01-compile-strategy (3-phase force-training
compile strategy incl. functorch fullgraph Phase-3).

Excludes jobs/ SLURM run logs (untracked).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These 12 untracked scratch files (pinet_gpu_diagnostics.py + pinet_case_*.py)
were wrongly swept into the repo by an over-broad 'git add benchmarks/' during
the WIP snapshot. They are throwaway GPU diagnostics and belong out-of-source,
not in molnex. Also removed the in-repo jobs/ SLURM run-log dir.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nchmarks/workspace

Snapshot of in-progress dev work before merging worktree-trainer-dataset-fixes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brings the profiler submodule breakdown, dynamic-batching/packed-collate,
per-epoch reshuffle, device-move hot-path skip, and PiNet EF benchmark work
onto dev.

Conflict resolution: kept dev's functorch (torch.func.grad) PiNet force path
and trainer-hardening metric semantics (on-device train metrics, float()-ed
eval metrics) over the worktree's superseded autograd/create_graph approach;
kept worktree's additive profiler/dynamic-batching features and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
molix.datasets no longer imports the sibling molhub package — their
coupling is protocol-based (DataSource), not a direct import. The old
`from molhub.io import fetch_locked, extract_member_locked` was broken
(molhub.io does not exist on published MolCrafts/molhub).

RevMD17Source now resolves per-molecule download URLs via the figshare
REST API (the HTML ndownloader endpoint is WAF-gated and 202s scripted
GETs). Eight molecules are fetched as standalone NPZ; salicylic + uracil
fall back to the cached rmd17.tar.bz2 archive. Stdlib-only I/O, atomic
*.part rename, and a flock sidecar serialise concurrent SLURM jobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump version 0.1.0 -> 0.2.0 and document the execution/analysis stack
that landed since the initial scaffold: molix.md (Langevin MD), .analysis
(trajectory diagnostics), .quant, .export (AOT Inductor) / .compile, the
packed-cache data pipeline + dynamic batch sampler, MolRecSource, and the
PiNet / Sonata reference models. Add a Keep-a-Changelog CHANGELOG.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… line

# Conflicts:
#	src/molix/datasets/revmd17.py
#	src/molpot/potentials/elec/calculators/calculator.py
master was an early snapshot (merge-base + one squashed CI PR). Record
it as a parent so the v0.2.0 PR fast-forwards cleanly; dev's tree is the
source of truth and is kept verbatim (the stale benchmarks/ and early
docs that master uniquely carried are intentionally dropped).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying molnex with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a96bb2
Status:⚡️  Build in progress...

View logs

@Roy-Kid
Roy-Kid merged commit b69ac80 into master Jun 14, 2026
2 of 5 checks passed
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