- 
                Notifications
    You must be signed in to change notification settings 
- Fork 124
Description
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
cpuandcudadevices are supported, but the device of the process iscpu.
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!