Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Improve block naming interface #3

Open
ixjlyons opened this issue Dec 13, 2016 · 1 comment
Open

Improve block naming interface #3

ixjlyons opened this issue Dec 13, 2016 · 1 comment

Comments

@ixjlyons
Copy link
Member

Mandating that every block class take a name kwarg is a pain, but assuming the name is the class name could lead to conflicts if a block type is reused (definitely a possibility with e.g. Filter). It only really matters in the context of a pipeline, but mandatory naming when constructing a pipeline is also a bit painful. The scikit-learn solution wouldn't work well because of how pipeline structure is specified in copper.

@ixjlyons
Copy link
Member Author

Candidate solution: specify the pipeline structure using block names then supply the block objects in a dict by name.

p = copper.Pipeline(
    ['block1', 'block2', (['block3', 'block4'], 'block5'), 'block6'],
    {
        'block1': SomeBlock(),
        'block2': AnotherBlock(),
        ...
    }
)

Note this would make solving #2 pretty straightforward as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant