VRTrainDataset ignores the cfg_prob constructor argument
- Dominant language
- Python
- Stars
- 32
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Affected revision
`main` at `3d1965cac5529b72c9dab9af7a3f456c5bbd7172`.
### Reproduction
Construct `VRTrainDataset` with any nonzero classifier-free-guidance probability:
```python
dataset = VRTrainDataset(dataset_cfg={}, tokenizer=tokenizer, cfg_prob=0.75)
print(dataset.cfg_prob)
```
The constructor accepts `cfg_prob`, but `UniVR_SFT/src/utils/dataset_vr_train.py` assigns `self.cfg_prob = 0.0` unconditionally. A focused run with `cfg_prob=0.75` prints `0.0`.
### Expected behavior
`dataset.cfg_prob` should preserve the caller-provided probability, so `_build_sample` can select the unconditional prompt at the configured rate.
### Actual behavior
Every instance stores `0.0`; therefore the later condition `self.cfg_prob > 0` is always false and classifier-free-guidance training cannot be enabled through this constructor argument.
### Impact
Callers can configure a nonzero probability without an error, but the requested training behavior is silently disabled for every sample.
### Suggested fix
Assign the constructor argument to `self.cfg_prob` and add a focused constructor regression test.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in UniVR_SFT/src/utils/dataset_vr_train.py at the VRTrainDataset constructor and inspect how cfg_prob is stored and later used by _build_sample. Add a focused constructor regression test using a nonzero probability, then verify the instance preserves the caller-provided value and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100