Skip to content

Conversation

@amitsubhashchejara
Copy link
Contributor

@amitsubhashchejara amitsubhashchejara commented Dec 11, 2025

Description

Fixed an issue where the DataModule instance was potentially being reused across optimization trials, which could lead to state accumulation and inconsistent results. Now ensures a fresh DataModule instance is created for each hyperparameter evaluation trial.

Related Issues

"Fixes #212"

Type of Change

  • [Fix] - Bug fix (non-breaking change fixing an issue)
  • [Feature] - New feature (non-breaking change adding functionality)
  • [Refactor] - Code refactoring (no functional changes)
  • [Release] - Release preparation
  • [Hotfix] - Critical fix for production

Checklist

  • PR title includes appropriate tag: [Fix], [Feature], [Refactor], [Release], or [Hotfix]
  • Linked to related issue (if applicable)
  • Code passes make check (lint, format, isort)
  • Tests added/updated for changes (if applicable)
  • Documentation updated (if applicable)

Testing

The changes can be verified by:

  1. Running the existing test suite for TorchExperiment
  2. Testing with a custom DataModule that logs instantiation - verify new instance created per trial
  3. Running multiple optimization trials and checking for consistent behavior

Pre-commit hooks pass successfully.

@amitsubhashchejara amitsubhashchejara changed the title Fix: Create new DataModule instance for each optimization trial [Fix]: Create new DataModule instance for each optimization trial Dec 11, 2025
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.

[BUG] Data leakage in TorchExperiment

1 participant