# Reproducing AgentFEM Material Loading Memory v1 ## Reproducibility levels The release supports three distinct levels. Do not confuse them. 1. **Data verification** checks the eight HDF5 shard hashes, schema, trajectory IDs, splits, model labels, path-family counts and finite values. It requires only Python, NumPy and h5py. 2. **Baseline reproduction** retrains the published MLP and GRU from the frozen trajectory splits. CPU training is sufficient. 3. **Physics regeneration** recreates all trajectories with the exact AgentFEM source revision, repackages the shards and reruns the numerical audit. ## Obtain the release Using the Hugging Face CLI: ```bash hf download HaomingLuo/AgentFEM-Material-Loading-Memory \ --repo-type dataset \ --local-dir AgentFEM-Material-Loading-Memory cd AgentFEM-Material-Loading-Memory ``` ## Verify the downloaded data ```bash conda env create -f environment-use.yml conda activate agentfem-t2-use bash reproduce_t2_v1.sh verify ``` Expected summary: - 1,008 unique trajectories; - 768/120/120 train/validation/test trajectories; - 504 J2 and 504 Chaboche trajectories; - 168 trajectories in each of six path families; - eight shard hashes matching `manifest.json`. ## Reproduce the baselines ```bash bash reproduce_t2_v1.sh baseline ``` The script trains with the published defaults: 40 MLP epochs and 60 GRU epochs. Small numerical variation across PyTorch versions and hardware is normal. Compare with `artifacts/t2_material_loading_memory_v1/baseline_metrics.json`, not by requiring bitwise-identical neural-network weights. ## Regenerate the physics data The frozen physics environment uses Python 3.11, FEniCSx/DOLFINx 0.11.0 and AgentFEM commit `058faecc05aeda143d014fd229401003a9258bbb`. ```bash conda env create -f environment-reproduce.yml conda activate agentfem-t2-reproduce bash reproduce_t2_v1.sh design bash reproduce_t2_v1.sh full ``` `design` checks the deterministic 1,008-case Sobol design without solving. `full` performs the following steps: 1. regenerate or resume all 1,008 material-point trajectories; 2. build eight HDF5 shards; 3. run analytical, constitutive and time-resolution audits; 4. retrain both reference baselines; 5. run the published automated tests. The generator is restartable. For controlled parallel work, different workers may run non-overlapping ranges before one worker packages and audits: ```bash python src/t2_material_loading_memory_v1.py --range 0 252 python src/t2_material_loading_memory_v1.py --range 252 504 python src/t2_material_loading_memory_v1.py --range 504 756 python src/t2_material_loading_memory_v1.py --range 756 1008 python src/t2_material_loading_memory_v1.py --package python src/t2_material_loading_memory_v1.py --audit ``` ## Exact source fallback If the VCS entry in `environment-reproduce.yml` cannot install AgentFEM, install it explicitly after creating the environment: ```bash git clone https://github.com/haoming-luo/agentfem.git cd agentfem git checkout 058faecc05aeda143d014fd229401003a9258bbb python -m pip install . cd .. ``` Confirm before regeneration: ```bash python -c "import agentfem; print(agentfem.__version__)" git -C agentfem rev-parse HEAD ``` ## Reproducibility contract for extensions - A sample is one complete trajectory; frames must not cross data splits. - Keep SI units and record all material parameters and load-path controls. - Preserve v1 as an immutable benchmark. Publish extensions under a new dataset version and document migration rules. - Failed or non-converged cases must be retained in a failure ledger rather than silently removed. - Split generation must be deterministic and grouped by trajectory and source design. - Report both predictive errors and physical-consistency errors.