ITADN

Add a default CPU stat tracker

#1391OpenMartinGleize 创建于 2025-10-21
enhancement
M
MartinGleizecommented
**Is your feature request related to a problem? Please describe:** Right now, running a recipe on CPU (e.g. for debugging its initial setup) throws this error from "fairseq2/recipe/internal/device_stat.py": > fairseq2.recipe.error.DeviceTypeNotSupportedError: Only `cpu` and `cuda` devices are supported, but the device of the process is `cpu`. Because no CPU DeviceStatTracker is registered here: "fairseq2/recipe/composition/device_stat.py". **Describe the solution you would like:** Possible solutions: * Amend the error message to be consistent. * Register the no-op tracker for the "cpu" type. * Provide an actual default CPU stat tracker. With a preference for the last one (which I think still lets recipe users override to implement their own CPU tracker). **Describe the alternatives you have considered:** As a simple bypass on the recipe implementer side, I simply registered the no-op stat tracker for the "cpu". Recipes are quite convenient!
0 条评论