Skip to content

Access sub-ingredient's config #923

@mrzv

Description

@mrzv

I have two ingredients. One of them knows about the other one. When configuring the second one, I'd like to be able to access a config value from the first one, but I can't find a way to do this. Here's an example that sketches what I'm after.

data = Ingredient('data')
model = Ingredient('model', ingredients = [data])

@data.config
def data_config():
    a = 5

@model.config
def model_config(data):
    b = data['a'] / 2      # this doesn't work

Is there any way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions