Shortcuts

parse

torchtune.config.parse(recipe_main: Callable[[DictConfig], Any]) Callable[[Callable[[DictConfig], Any]], Any][source]

Decorator that handles parsing the config file and CLI overrides for a recipe. Use it on the recipe’s main function.

Parameters:

recipe_main (Recipe) – The main method that initializes and runs the recipe

Examples

>>> @parse
>>> def main(cfg: DictConfig):
>>>     ...
>>> # With the decorator, the parameters will be parsed into cfg when run as:
>>> tune my_recipe --config config.yaml foo=bar
Returns:

the decorated main

Return type:

Callable[[Recipe], Any]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources