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

Converting model models to use the new hydration paradigm #2101

Merged
merged 25 commits into from
Dec 6, 2023

Conversation

bcdurak
Copy link
Contributor

@bcdurak bcdurak commented Dec 1, 2023

Describe changes

I refactored the model models to utilize the new base models and the hydration paradigm.

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.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.

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)

@bcdurak bcdurak requested review from schustmi and fa9r December 1, 2023 14:12
@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Dec 1, 2023
Copy link
Contributor

@fa9r fa9r left a comment

Choose a reason for hiding this comment

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

LGTM from my side but I think you should discuss with @avishniakov which properties exactly to put into body and which into metadata before merging

src/zenml/models/v2/core/model_version.py Show resolved Hide resolved
src/zenml/models/v2/core/model_version.py Outdated Show resolved Hide resolved
src/zenml/models/v2/core/model.py Outdated Show resolved Hide resolved
src/zenml/models/v2/core/model.py Outdated Show resolved Hide resolved
mv.to_model_version(suppress_class_validation_warnings=True)
for mv in model_versions.items
]
for i in range(2, model_versions.total_pages + 1):
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this supposed to do?

It's somehow looping over the amount of pages but using the model versions of the first page?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, I remember that from the old PR, somehow I missed it this time. I think the goal was to depaginate (in which case pagination_utils.depaginate should be used instead)

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the plan for this, I'm fine creating a separate PR but that just runs an additional set of tests. I think we should just clarify with @avishniakov what this is supposed to do and fix it. If this should just return a list of all model versions (not paginated), then we simply use pagination_utils.depaginate(...) and convert the results to ModelVersion, should be an easy fix no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, this can be substituted with pagination_utils.depaginate 👍🏼

src/zenml/zen_server/rbac/utils.py Show resolved Hide resolved
@bcdurak bcdurak requested a review from schustmi December 4, 2023 17:16
@bcdurak bcdurak merged commit 6e6f158 into develop Dec 6, 2023
32 checks passed
@bcdurak bcdurak deleted the feature/OSS-2656-converting-model-models branch December 6, 2023 08:10
@avishniakov avishniakov mentioned this pull request Dec 6, 2023
9 tasks
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.

4 participants