[bugfix] make step-based step_iter one-shot to prevent cross-pass step reset (#606)
In step-based training (num_steps set; epoch_iter = count(0,0)) the data-pass StopIteration handler does step_iter = chain([i_step], step_iter). step_iter was a bare range, which is re-iterable: after the retried step it re-iterates from 0, so i_step resets and the next pass re-saves model.ckpt-{step} (e.g. ckpt-1000), which DynamicEmbDump then refuses to overwrite, crashing training. Wrap the range in iter() so it is one-shot and the chain continues from i_step+1, keeping the step counter monotonic across passes. num_steps termination is unchanged (the range still exhausts naturally); eval/predict are single-pass and untouched.
Co-authored-by: Claude noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
TorchEasyRec
A PyTorch-based recommendation system framework for production-ready deep learning models
What is TorchEasyRec?
TorchEasyRec implements state-of-the-art deep learning models for recommendation tasks: candidate generation (matching), scoring (ranking), multi-task learning, and generative recommendation. It enables efficient development of high-performance models through simple configuration and easy customization.
Key Features
Data Sources
Scalability
Production
Features & Models
Supported Models
Matching (Candidate Generation)
Ranking (Scoring)
Multi-Task Learning
Generative Recommendation
Semantic ID (SID) Generation
Documentation
Get started with TorchEasyRec in minutes:
For the complete documentation, please refer to https://torcheasyrec.readthedocs.io/
Community & Support
GitHub Issues - Report bugs or Request features
DingTalk Groups
If you have any questions about how to use TorchEasyRec, please join the DingTalk group and contact us.
If you have enterprise service needs or need to purchase Alibaba Cloud services to build a recommendation system, please join the DingTalk group to contact us.
Contributing
Any contributions you make are greatly appreciated!
Citation
If you use TorchEasyRec in your research, please cite:
License
TorchEasyRec is released under Apache License 2.0. Please note that third-party libraries may not have the same license as TorchEasyRec.