test_padis_wandb_resume.pyΒΆ

Source: tests/experiments/test_padis_wandb_resume.py

Test padis wandb resume behaviour.

class FakeRun

Provide the fake run test double used by this module.

FakeRun.define_metric(self, *args, **kwargs)

Handle define metric for the PaDIS workflow.

FakeRun.log(self, metrics, step=None, **kwargs)

Log the requested values.

FakeRun.log_artifact(self, artifact)

Log artifact.

class FakeArtifact(name, type)

Provide the fake artifact test double used by this module.

FakeArtifact.add_file(self, path)

Add file.

class FakeWandb

Provide the fake wandb test double used by this module.

FakeWandb.init(self, **kwargs)

Handle init for the PaDIS workflow.

class FakeCheckpointSolver(folder, pattern, current_epoch=0)

Provide the fake checkpoint solver test double used by this module.

FakeCheckpointSolver.save_checkpoint(self, epoch)

Save checkpoint.

fake_wandb(monkeypatch)

Handle fake wandb for the PaDIS workflow.

test_diffusion_wandb_resume_reuses_saved_run_id_without_manual_step(module, tmp_path, fake_wandb)

Verify that diffusion wandb resume reuses saved run id without manual step.

test_pnp_wandb_resume_reuses_saved_run_id_without_manual_step(tmp_path, fake_wandb)

Verify that pnp wandb resume reuses saved run id without manual step.

test_wandb_output_artifact_matches_padis_run_folder_contract(module, tmp_path, fake_wandb)

Verify that wandb output artifact matches padis run folder contract.

test_diffusion_interruption_checkpoint_uses_next_periodic_index(module, tmp_path)

Verify that diffusion interruption checkpoint uses next periodic index.

test_pnp_interruption_checkpoint_saves_current_epoch_with_retention(tmp_path)

Verify that pnp interruption checkpoint saves current epoch with retention.