The trainer.gpus, if given an int, indicates the number of gpus to use, instead of the ID of gpu to use. Corrected this by casting to str or list of ints in pydantic.
When passing lists to Hydra, the config contains the list as an OmegaConf config objects. It looks similar to python dicts and list, but it really different. This causes errors with Pydantic when trying to resolve lists.
Hence, we convert to primitive containers before passing to pydantic for validation.
The trainer.gpus, if given an int, indicates the number of gpus to use, instead of the ID of gpu to use. Corrected this by casting to str or list of ints in pydantic.
When passing lists to Hydra, the config contains the list as an OmegaConf config objects. It looks similar to python dicts and list, but it really different. This causes errors with Pydantic when trying to resolve lists. Hence, we convert to primitive containers before passing to pydantic for validation.