Skip to content

Add configurable --seed argument for reproducible training#183

Open
Vikasboura wants to merge 6 commits intoML4SCI:mainfrom
Vikasboura:feature/reproducible-training-seed
Open

Add configurable --seed argument for reproducible training#183
Vikasboura wants to merge 6 commits intoML4SCI:mainfrom
Vikasboura:feature/reproducible-training-seed

Conversation

@Vikasboura
Copy link

This PR adds a configurable --seed CLI argument to the training scripts in
Transformers_Classification_DeepLense_Kartik_Sachdev to enable reproducible
experiments.

Problem

Some training scripts either used a hardcoded seed or did not initialize
random seeds at all, which made experiment results difficult to reproduce.

Changes

  • Added --seed CLI argument (default: 42) to:
    • main.py
    • simsiam.py
    • pretrain.py
    • finetune.py
    • finetune_byol.py
  • Reused the existing seed_everything() utility from utils/util.py
    to initialize random, numpy, torch, and CUDA seeds.
  • Updated README.md with a Reproducibility section and example usage.

Example

If --seed is not provided, the default behavior remains unchanged
(default seed = 42).

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.

1 participant