-
Notifications
You must be signed in to change notification settings - Fork 471
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
Remove create_new_model_version
arg of ModelConfig
#2030
Remove create_new_model_version
arg of ModelConfig
#2030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change looks good but I'm not a fan of the changes to the client, models, and zenstore methods. For these, fetching the latest version by default made sense and was more convenient to use with the version arg being optional. I'd suggest reverting these changes as indicated in the comments below, otherwise LGTM.
@@ -307,3 +260,22 @@ def _merge(self, model_config: "ModelConfig") -> None: | |||
self.delete_new_version_on_failure &= ( | |||
model_config.delete_new_version_on_failure | |||
) | |||
|
|||
def __hash__(self) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Felix Altenberger <[email protected]>
…s://github.com/zenml-io/zenml into feature/OSS-2608-deprecate-creates_new_version
@fa9r , tests passed, if you don't see any more changes needed here, I would love to merge this to proceed with renaming ticket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe changes
I simplified the
ModelConfig
interface to avoid explicitly passing aroundcreate_new_model_version
.New behavior expects that the user keeps
version==None
if the new unnamed version is needed, otherwise model version will be retrieved/created based on theversion
argument.Also new
ModelStages.LATEST
was introduced in order to give the ability to fetch the LATEST model version.[BREAKING CHANGE] Old configurations using
create_new_model_version
might lead to unpredicted results, but the change needed is simple:[BEHAVIOR CHANGE] If a signature like
ModelConfig(name="foo", version="bar", create_new_model_version=True)
was used, it prevented 2 parallel pipelines from running pointing to same model version, this is not the case anymore for named versions.Tests updates mostly relate to signature updates, but also some tests were removed as no longer valid ones.
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes