Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练得到的total_flops是负数 #757

Open
summer-f opened this issue Feb 26, 2024 · 2 comments
Open

训练得到的total_flops是负数 #757

summer-f opened this issue Feb 26, 2024 · 2 comments

Comments

@summer-f
Copy link

这是训练结束后得到的部分输出(monitor:173) INFO: In worker #1, the system-related metrics are: {'id': 1, 'fl_end_time_minutes': 125.160295, 'total_model_size': 124440576, 'total_flops': -3000, 'total_upload_bytes': 0, 'total_download_bytes': 16470960, 'global_convergence_round': 0, 'local_convergence_round': 0, 'global_convergence_time_minutes': 0, 'local_convergence_time_minutes': 0}。其中total_flops是-3000,请问会是什么原因导致的呢?是因为数据溢出了吗?

@yxdyc
Copy link
Collaborator

yxdyc commented Feb 29, 2024

这是因为基于fvcore和ctx.data_batch =[x, y]的假设不符合,触发了异常。FS在这种场景下会将该值设置为负数,来提醒用户flops并未计算成功,需要实现合适的flops_per_sample函数。可以参考general_torch_trainer的实现,以及相关的搜索

@summer-f
Copy link
Author

summer-f commented Mar 15, 2024 via email

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

No branches or pull requests

2 participants