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

log_model_kwargs and kmp_kwargs argument of pipeline_ml_factory are ignored #329

Closed
Galileo-Galilei opened this issue Jun 18, 2022 · 0 comments · Fixed by #332
Closed

log_model_kwargs and kmp_kwargs argument of pipeline_ml_factory are ignored #329

Galileo-Galilei opened this issue Jun 18, 2022 · 0 comments · Fixed by #332
Assignees
Labels
bug Something isn't working

Comments

@Galileo-Galilei
Copy link
Owner

Description

I used pipeline_ml_factory in kedro-mlflow-tutorial and found that log_model_kwargs and kpm_kwargs argument of are ignored : Galileo-Galilei/kedro-mlflow-tutorial#17

Context

I was trying to store the model on mlflow with a different artifact path than the default one

Steps to Reproduce

  1. Specify log_model_kwargs={"artifact_path": "fake"} (cf.link to above issue) in pipeline_ml_factory
  2. run the pipeline (kedro run --pipeline=training)
  3. Open the ui kedro mlflow ui
  4. Check the last run: the artifact is named "model" instead of "fake"

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • kedro and kedro-mlflow version used (pip show kedro and pip show kedro-mlflow): kedro=0.18.1 and kedro-mlflow=0.10.0 (the latest)
  • Python version used (python -V): all
  • Operating system and version: all

Does the bug also happen with the last version on master?

Yes

Solution

The root cause is that these args are not pass to the new "filter" pipeline method introduced in kedro==0.18. The internal conversion after filtering "_turn_pipeline_to_ml" should pass these args.

def _turn_pipeline_to_ml(self, pipeline: Pipeline):
return PipelineML(
nodes=pipeline.nodes, inference=self.inference, input_name=self.input_name
)

should be:

    def _turn_pipeline_to_ml(self, pipeline: Pipeline):
        return PipelineML(
            nodes=pipeline.nodes,
            inference=self.inference,
            input_name=self.input_name,
            kpm_kwargs=self.kpm_kwargs,
            log_model_kwargs=self.log_model_kwargs,
        )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
1 participant