pdft.profiling.profile_training#
- pdft.profiling.profile_training(basis, *, dataset, loss, n_steps, batch_size=4, optimizer='adam', lr_peak=0.003, lr_final=0.0003, warmup_frac=0.05, max_grad_norm=1.0, val_every=0, val_dataset=None, trace_dir=None, seed=42, device=None)[source]#
Profile
n_stepsof_build_jit_adam_stepend-to-end ondataset.Pads / cycles the dataset to fill exactly
n_stepsbatches ofbatch_sizeimages each. Insertsjax.block_until_readyafter every step so per-step wall-clock is honest (no async dispatch overlap).Returns a
ProfileReportwith per-step records and optional XLA HLO trace attrace_dir(open withtensorboard --logdir).The first step’s wall-clock is dominated by JIT compile and tagged “compile”; subsequent steps are tagged “warm”. Val passes (when
val_every > 0) are tagged “val”.- Parameters:
- Return type: