Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

neugk smoke sample

Two gyrokinetic trajectories, 20 saturated frames each, in the preprocessed layout that neugk_jax (branch feat/kinetic-train) reads. It is a sample for testing the pipeline, not a training set.

part trajectory species frames
kinetic/ rv1_003 ion + kinetic electron, collisional (gyaradax) last 20 of 215, renumbered 0..19
adiabatic/ extra_iteration_0 ion, adiabatic electrons last 20 of 267, renumbered 0..19

checkpoints/ae_hf_smoke_untrained/ holds an untrained production autoencoder (see below).

Each <name>_ifft_realpotens/ folder holds

  • data/timestep_NNNNN.*.bin: df in real space, (re/im, species, vpar, mu, s, x, y), bfloat16;
  • data/poten_NNNNN.*.bin: real phi (x, s, y); data/potenc_NNNNN.bin: complex phi (re/im, x, s, y), float32;
  • data/linear.bin, data/linear_poten.bin: the linear eigenmode of the same configuration;
  • metadata.pkl, metadata_light.pkl: grouped trajectory metadata (per-frame series sliced to the 20 frames, df window moments recomputed on them);
  • config.yaml, resume/: the gyaradax config and the solver state of the last frame.

Every trajectory passes neugk_jax.dataset.schema.check_trajectory.

Setup

git clone -b feat/kinetic-train https://github.com/ml-jku/neural-gyrokinetics-jax neugk-jax
cd neugk-jax && pip install -e .
huggingface-cli download gerkone/tmp-neugk-test --repo-type dataset --local-dir ../hf_sample
export NEUGK_HF_SMOKE=$PWD/../hf_sample

Train

ae_hf_smoke is the production autoencoder (ae_full_cconv) on these two trajectories: one epoch, then validation on the same trajectories.

python main.py experiment=ae_hf_smoke output_path=runs/smoke

Evaluate a trained autoencoder

eval_checkpoint loads a run directory (its best.eqx and the normalization statistics it was trained with) and only validates it; the metrics are printed and written to <output_path>/<run id>/eval.json. checkpoints/ae_hf_smoke_untrained/ is the production autoencoder at initialization (800M parameters, model weights only), with the run config and the statistics of these two trajectories:

python main.py experiment=ae_hf_smoke output_path=runs/smoke_eval \
    eval_checkpoint=$NEUGK_HF_SMOKE/checkpoints/ae_hf_smoke_untrained

The same works for any trained ae_full_cconv run directory.

Add a gyaradax run

Run gyaradax (master) keeping every snapshot, convert the run directory and drop the trajectory next to the others. Any kinetic config on the grid of rv1_003 works; to continue rv1_003 from its last frame:

# 1. simulate: one step_*.npz per snapshot in rv1_003_gx/ (--backend jax unless the gyaradax cuda kernels are built)
gyaradax run $NEUGK_HF_SMOKE/kinetic/rv1_003_ifft_realpotens/resume/config.yaml \
    --resume-from $NEUGK_HF_SMOKE/kinetic/rv1_003_ifft_realpotens/resume/state.npz \
    --output-dir rv1_003_gx --save-dumps --n-steps 6000 --snapshot-dtype c64 --n-gpus-sp 1 --backend jax

# 2. convert: writes converted/preprocessed_kvikio/rv1_003_gx_ifft_realpotens
python -m neugk_jax.dataset.preprocess --mode gyaradax --gyaradax-dirs rv1_003_gx --target-dir converted

# 3. add it to the kinetic part and train on both
mv converted/preprocessed_kvikio/rv1_003_gx_ifft_realpotens $NEUGK_HF_SMOKE/kinetic/
python main.py experiment=ae_hf_smoke output_path=runs/smoke_gx \
    'dataset.parts.kinetic.training_trajectories=[rv1_003,rv1_003_gx]'

The converter writes the same layout as the files here (bf16 df, real and complex phi, metadata, config.yaml, resume/), with the window moments filled when the dataset first loads it. A run without saturation_time in its metadata is served from its first frame.

Downloads last month
88