Skip to content

Conversation

@htahir1
Copy link
Contributor

@htahir1 htahir1 commented Apr 13, 2025

Just need to add images now

How to Run:

Detailed instructions are available in the README.md, covering setup, dependency installation, ZenML integration installation, and commands to execute each pipeline.

Goal:

To establish the foundational codebase for the oncoclear project, providing a robust example of a ZenML-powered MLOps workflow for a standard classification task.

@htahir1 htahir1 requested a review from strickvl April 13, 2025 09:01
@dagshub
Copy link

dagshub bot commented Apr 13, 2025

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@htahir1 htahir1 requested a review from marwan37 April 14, 2025 08:22
Comment on lines +49 to +75
else:
logger.info(f"Model promoted to {stage}!")
is_promoted = True

# Get the model in the current context
current_model = get_step_context().model

# Get the model that is in the production stage
client = Client()
try:
stage_model = client.get_model_version(
current_model.name, stage
)
# We compare their metrics
prod_accuracy = (
stage_model.get_artifact("sklearn_classifier")
.run_metadata["test_accuracy"]
)
if float(accuracy) > float(prod_accuracy):
# If current model has better metrics, we promote it
is_promoted = True
current_model.set_stage(stage, force=True)
except KeyError:
# If no such model exists, current one is promoted
is_promoted = True
current_model.set_stage(stage, force=True)
return is_promoted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick comment: you're already reassigning is_promoted to True at the beginning of the else block, so the identical reassignments below are redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like it that way to make it explcit

model_type: str = "sgd",
target: Optional[str] = "target",
) -> Annotated[
ClassifierMixin, ArtifactConfig(name="sklearn_classifier", is_model_artifact=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since artifact_type will be deprecated soon, you can update the function's return type to use the new annotation style

 Annotated[
    ClassifierMixin, ArtifactConfig(name="sklearn_classifier", artifact_type=ArtifactType.MODEL)
]:

Copy link
Contributor

@marwan37 marwan37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the 2 minor comments, everything else looks great 👍

@htahir1 htahir1 merged commit 88f5e40 into main Apr 15, 2025
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

4 participants