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

Decouple MLflow Components #1549

Closed
wants to merge 21 commits into from
Closed

Conversation

fa9r
Copy link
Contributor

@fa9r fa9r commented May 22, 2023

Describe changes

This PR decouples the MLflow deployer and model registry from the experiment tracker so they can be used without any models having been logged beforehand.

Example

@step
def digits_data_loader():
    ...

@step  # No experiment tracker used here
def svc_trainer(X_train: np.ndarray, y_train: np.ndarray) -> ClassifierMixin:
    model = SVC(gamma=0.001)
    model.fit(X_train, y_train)
    return model

from zenml.integrations.mlflow.steps.mlflow_deployer import mlflow_model_deployer_step

@pipeline
def first_pipeline():
    X_train, X_test, y_train, y_test = digits_data_loader()
    model = svc_trainer(X_train, y_train)
    mlflow_model_deployer_step(model)

Implementation Details

  • Both mlflow_model_deployer_step and mlflow_register_model_step now log the model to MLflow in a new run if the model was not found; both steps were also heavily refactored
  • Instead of getting the MLflow connection from the experiment tracker in the stack, the model registry and deployer can now be configured separately
  • To achieve this, MLFlowStackComponentMixin and MLFlowConfigMixin classes were added which all three MLflow components now inherit from

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table and the corresponding website section.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels May 22, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fa9r fa9r marked this pull request as ready for review May 31, 2023 17:53
@fa9r fa9r requested a review from safoinme May 31, 2023 18:00
@fa9r fa9r changed the title WIP: Decouple MLflow components Decouple MLflow Components May 31, 2023
@fa9r fa9r requested a review from stefannica May 31, 2023 18:01
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

2 similar comments
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

20 similar comments
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@github-actions
Copy link
Contributor

@stefannica, @safoinme
1.25 (one and twenty-five hundredths) business days have passed since the review started. Pretty please review the PR.

@safoinme safoinme mentioned this pull request Jul 26, 2023
8 tasks
@fa9r fa9r marked this pull request as draft November 30, 2023 09:21
@CLAassistant
Copy link

CLAassistant commented Jan 30, 2024

CLA assistant check
All committers have signed the CLA.

@htahir1 htahir1 closed this Jul 9, 2024
@htahir1
Copy link
Contributor

htahir1 commented Jul 9, 2024

branch was too stale, we'll revisit if we come back to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants