Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MLPipeline as a primitive #226

Open
csala opened this issue Dec 18, 2019 · 0 comments
Open

Add MLPipeline as a primitive #226

csala opened this issue Dec 18, 2019 · 0 comments
Assignees
Labels
approved The issue is approved and someone can start working on it new primitives A new primitive is being requested

Comments

@csala
Copy link
Contributor

csala commented Dec 18, 2019

Create the mlblocks.MLPipeline primitive to allow setting a whole pipeline as a single primitive.

The primitive arguments will be the mlblocks.MLPipeline arguments, which means that the pipeline will be specified as either:

  • A pipeline name
  • A json path
  • A pipeline dictionary
  • Individual arguments

Some usage examples:

Python pipeline specification - specify the sub-pipeline by its name

from mlblocks import MLPipeline

primitives = [
    'mlblocks.MLPipeline',
    'xgboost.XGBClassifier'
]
init_params = {
    'mlblocks.MLPipeline#1': {
        'pipeline': 'my-preprocessing-pipeline'
    },
}
pipeline = MLPipeline(primitives, init_params=init_params)

Pipeline dictionary - specify the subpipelines by name, dict and json path

pipeline_dict = {
    'primitives': [
        'mlblocks.MLPipeline',
        'mlblocks.MLPipeline',
        'mlblocks.MLPipeline',
    ],
    'init_params': {
        'mlblocks.MLPipeline#1': {
            'pipeline': 'a-preprocessing-pipeline',
        },
        'mlblocks.MLPipeline#2': {
            'primitives': [
                'mlprimitives.feature_extraction.CategoricalEncoder',
                'sklearn.preprocessing.StandardScaler',
            ],
        },
        'mlblocks.MLPipeline#3': {
            'primitives': [
                'path/to/my/postprocessing/pipeline.json',
            ],
        },
    },
}
@csala csala added new primitives A new primitive is being requested approved The issue is approved and someone can start working on it labels Dec 18, 2019
@csala csala added this to the 0.2.4 milestone Dec 18, 2019
@csala csala self-assigned this Dec 18, 2019
@csala csala modified the milestones: 0.2.4, 0.2.5 Jan 28, 2020
@csala csala modified the milestones: 0.2.5, 0.2.6 Jul 13, 2020
@csala csala removed this from the 0.2.6 milestone Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The issue is approved and someone can start working on it new primitives A new primitive is being requested
Projects
None yet
Development

No branches or pull requests

1 participant