Skip to content

Conversation

@felix-e-h-p
Copy link
Contributor

@felix-e-h-p felix-e-h-p commented Oct 10, 2025

Relating to #432

  • Two tests for train() call in run.py
  • Each builds minimal config using new fixtures (in file) with W&B in offline mode and checkpointing
  • test_train_site trains with SitesDataModule (15-min)
  • test_train_pv trains with UKRegionalDataModule (30-min)

Also updated relative to data sampler modifications

@felix-e-h-p felix-e-h-p marked this pull request as ready for review October 11, 2025 15:02
@felix-e-h-p felix-e-h-p requested a review from dfulu October 11, 2025 15:03
def wandb_offline_env(monkeypatch, session_tmp_path):
"""Put W&B offline, quiet; force CPU."""
save_dir = str(session_tmp_path / "wandb")
monkeypatch.setenv("WANDB_SILENT", "true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid using environmental variables if we can. It adds complexity to the tests. Are these two variables needed for the test or do they clean up the test outputs or something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felix-e-h-p thanks for the updates, I'm guessing the env vars weren't needed?

You might want to dropmonkeypatch now that its no longer used in this fixture and maybe update the fixture name and doc to reflect what it does now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yeah! Sorry - well spotted. Will push now, finalised you reckon?

Copy link
Member

@dfulu dfulu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for doing this!

@felix-e-h-p felix-e-h-p merged commit 91a05e4 into main Oct 24, 2025
6 checks passed
@felix-e-h-p felix-e-h-p deleted the train_run.py_tests branch October 24, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants