[fix] Applied different rnd seed in bagel so that the noise would be sample…#129
[fix] Applied different rnd seed in bagel so that the noise would be sample…#129
Conversation
…d differently at different rank
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d6a092509
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| self.user_image_as_vae_condition = extra_kwargs.get("user_image_as_vae_condition", None) | ||
| self.set_random_seed(extra_kwargs.get("random_seed", 4396)) |
There was a problem hiding this comment.
Avoid resetting global RNG during Bagel init
Calling set_random_seed() from BagelDataProcessor.__init__ resets the global RNG state via transformers.set_seed, which happens after TrainRunner.set_random_seed() has already been applied. In runs that use the bagel processor, this overwrites the configured training seed and becomes the base seed used by seed_worker for DataLoader workers, so shuffling/dropout/noise no longer follow the training seed and are silently forced to the bagel default (and per-rank) value. This breaks reproducibility for experiments that expect the training seed to control randomness.
Useful? React with 👍 / 👎.
…d differently at different rank
Motivation
Modifications
Commit Message Convention
Please follow our standardized commit message format:
[feat]- New features or functionality[fix]- Bug fixes[docs]- Documentation changes only[style]- Code style changes (formatting, missing semicolons, etc.)[refactor]- Code refactoring without changing functionality[perf]- Performance improvements[test]- Adding or updating tests[chore]- Maintenance tasks, dependency updates, etc.[ci]- CI/CD configuration changesExamples:
[feat] add qwen omni iterable dataset support[fix] resolve bagel model configuration error[docs] update training guide with YAML examplesSee CONTRIBUTING.md for more details.
CI/CD Checks
Your PR will automatically run the following checks:
black(line-length=120) and import sorting withisortpre-commit run --all-fileslocally to verify before pushingChecklist
pre-commit run --all-filesand ensure all checks passblack(line-length=120) andisort