test_padis_training.pyΒΆ

Source: tests/models/test_padis_training.py

Test padis training behaviour.

test_padis_paper_256_defaults()

Verify that padis paper 256 defaults.

test_padis_paper_512_defaults()

Verify that padis paper 512 defaults.

test_padis_paper_whole_image_defaults()

Verify that padis paper whole image defaults.

test_padis_paper_model_parameter_counts()

Verify that padis paper model parameter counts.

test_patch_utilities_shapes_and_ranges()

Verify that patch utilities shapes and ranges.

test_ncsnpp_patch_forward_shape()

Verify that ncsnpp patch forward shape.

test_padis_loss_backpropagates()

Verify that padis loss backpropagates.

test_padis_loss_uses_edm_lognormal_by_default()

Verify that padis loss uses edm lognormal by default.

test_padis_loss_truncated_edm_lognormal_respects_sigma_bounds()

Verify that padis loss truncated edm lognormal respects sigma bounds.

test_padis_no_position_defaults_disable_model_and_solver_position_channels()

Verify that padis no position defaults disable model and solver position channels.

test_padis_solver_rejects_position_channel_mismatch()

Verify that padis solver rejects position channel mismatch.

test_padis_patch_size_ablation_defaults()

Verify that padis patch size ablation defaults.

test_padis_loss_uses_patch_l2_norm_not_pixel_mean()

Verify that padis loss uses patch l2 norm not pixel mean.

test_padis_solver_minibatch_and_ema()

Verify that padis solver minibatch and ema.

test_padis_solver_microbatch_accumulates_full_target_count()

Verify that padis solver microbatch accumulates full target count.

test_padis_solver_rejects_invalid_microbatch_size()

Verify that padis solver rejects invalid microbatch size.

test_padis_solver_default_checkpoint_freq_is_safe_without_checkpointing()

Verify that padis solver default checkpoint freq is safe without checkpointing.

test_padis_solver_trains_to_patch_budget_across_loader_restarts()

Verify that padis solver trains to patch budget across loader restarts.

test_padis_validation_respects_max_patches()

Verify that padis validation respects max patches.

test_padis_validation_can_repeat_loader_until_max_patches()

Verify that padis validation can repeat loader until max patches.

test_padis_solver_uses_paper_relative_batch_multipliers()

Verify that padis solver uses paper relative batch multipliers.

test_whole_image_solver_minibatch_uses_full_image()

Verify that whole image solver minibatch uses full image.

test_ema_weight_swap_restores_raw_weights()

Verify that ema weight swap restores raw weights.

test_save_validation_writes_ema_weights_and_restores_raw_model(tmp_path)

Verify that save validation writes ema weights and restores raw model.

test_train_for_patches_preserves_existing_min_validation_on_resume(tmp_path)

Verify that train for patches preserves existing min validation on resume.

test_save_final_results_writes_resumable_full_state(tmp_path)

Verify that save final results writes resumable full state.

test_load_checkpoint_falls_back_to_full_final_state(tmp_path)

Verify that load checkpoint falls back to full final state.

test_periodic_checkpoint_retention_keeps_latest_and_best_validation(tmp_path)

Verify that periodic checkpoint retention keeps latest and best validation.

test_load_checkpoint_loads_periodic_checkpoint_without_reconstructing_model(tmp_path)

Verify that load checkpoint loads periodic checkpoint without reconstructing model.

test_first_ema_update_copies_model_like_padis_rampup()

Verify that first ema update copies model like padis rampup.

test_padis_solver_rejects_out_of_range_images()

Verify that padis solver rejects out of range images.