You are viewing documentation for our open source project which is maintained by the community. If you want to get started building assistants with Rasa please check out our latest [documentation here](/content/docs/index.html).

## InvalidRecipeException Objects [#](https://legacy-docs-oss.rasa.com/docs/rasa/reference/rasa/engine/recipes/recipe/#invalidrecipeexception-objects "Direct link to heading")

```python
class InvalidRecipeException(RasaException):
    """
    Exception in case the specified recipe is invalid.
    """
```

## Recipe Objects [#](https://legacy-docs-oss.rasa.com/docs/rasa/reference/rasa/engine/recipes/recipe/#recipe-objects "Direct link to heading")

```python
class Recipe(abc.ABC):
    """
    Base class for `Recipe`s which convert configs to graph schemas.
    """
```

#### recipe_for_name [#](https://legacy-docs-oss.rasa.com/docs/rasa/reference/rasa/engine/recipes/recipe/#recipe_for_name "Direct link to heading")

```python
@staticmethod
def recipe_for_name(name: Optional[Text]) -> Recipe:
    """
    Returns `Recipe` based on an optional recipe identifier.
    """
    **Arguments**:
    - `name` - The identifier which is used to select a certain `Recipe`. If `None`
      the default recipe will be used.

**Returns**:
    A recipe which can be used to convert a given config to train and predict
    graph schemas.
```

#### auto_configure [#](https://legacy-docs-oss.rasa.com/docs/rasa/reference/rasa/engine/recipes/recipe/#auto_configure "Direct link to heading")

```python
@staticmethod
def auto_configure(
    config_file_path: Optional[Text],
    config: Dict,
    training_type: Optional[TrainingType] = TrainingType.BOTH
) -> Tuple[Dict[Text, Any], Set[str], Set[str]]:
    """
    Adds missing options with defaults and dumps the configuration.
    Override in child classes if this functionality is needed, each recipe
    will have different auto configuration values.
    """
```

#### graph_config_for_recipe [#](https://legacy-docs-oss.rasa.com/docs/rasa/reference/rasa/engine/recipes/recipe/#graph_config_for_recipe "Direct link to heading")

```python
@abc.abstractmethod
def graph_config_for_recipe(
    config: Dict,
    cli_parameters: Dict[Text, Any],
    training_type: TrainingType = TrainingType.BOTH,
    is_finetuning: bool = False
) -> GraphModelConfiguration:
    """
    Converts a config to a graph compatible model configuration.
    """
    **Arguments**:
    - `config` - The config which the `Recipe` is supposed to convert.
    - `cli_parameters` - Potential CLI params which should be interpolated into the
      components configs.
    - `training_type` - The current training type. Can be used to omit / add certain
      parts of the graphs.
    - `is_finetuning` - If `True` then the components should load themselves from
      trained version of themselves instead of using `create` to start from
      scratch.

**Returns**:
    The model configuration which enables to run the model as a graph for
    training and prediction.
```
