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

Support for namespaced modular pipelines #3

Closed
crypdick opened this issue Aug 10, 2020 · 1 comment
Closed

Support for namespaced modular pipelines #3

crypdick opened this issue Aug 10, 2020 · 1 comment

Comments

@crypdick
Copy link

Hello,

Thanks for the great plug-in! I am trying to figure out how to save different model outputs into different folders. I followed your tutorial for generating pipelines using modular pipelines and separate namespaces .

 node(
   func=inference_single_model,
   inputs=["test_subset_s3uris", "params:model_name"],
   outputs="07_model_output/testset_predictions.csv")  # not in catalog; Kedro-Wings hook handles saving

However, the namspace prefixes the pipeline_key in front of outputs, so instead of being stored in data/07_model_output/MyPipelineKey.testset_predictions.csv it is saved in data/MyPipelineKey.07_model_output/testset_predictions.csv.

@crypdick
Copy link
Author

Nevermind! I figured out that I can manually remap the outputs in the modular pipeline:

        model_predictions_pipelines += pipeline(
            my_predictions_pipelines,
            inputs={"test_subset_s3uris": "test_subset_s3uris",},
            outputs={
                "07_model_output/testset_predictions.csv": f"07_model_output/{pipeline_key}_testset_predictions.csv"
            },
            parameters={"params:model_name": pipeline_key},
            namespace=pipeline_key,
        )

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

No branches or pull requests

1 participant