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

Feature/revamp model endpoints #2035

Conversation

AlexejPenner
Copy link
Contributor

@AlexejPenner AlexejPenner commented Nov 9, 2023

Describe changes

I made model_versions their own root route - for the purpose of preserving some of the implicit functionality of model versions I left two endpoints on the /models route to allow users to fetch model versions based on latest, stage or name

image

We need to have all the model_version endpoints with a root level to allow for all sort of operations through the dashboard.

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)

@AlexejPenner AlexejPenner changed the base branch from main to develop November 9, 2023 14:24
@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Nov 9, 2023
@AlexejPenner
Copy link
Contributor Author

@avishniakov please let me know if I am missing anything obvious - I have opted to keep the behaviour for get and list methods consistent, but everything else now relies on the new more atomic interface

Copy link
Contributor

@avishniakov avishniakov left a comment

Choose a reason for hiding this comment

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

One slash missing, other than that - if tests pass, all good.

src/zenml/zen_server/routers/model_versions_endpoints.py Outdated Show resolved Hide resolved
Copy link
Contributor

@avishniakov avishniakov left a comment

Choose a reason for hiding this comment

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

Fix status, cause of slash :)

@AlexejPenner
Copy link
Contributor Author

@avishniakov do you have any manual testing flow that you used, that I can do to ensure no functionality is lost?

@avishniakov
Copy link
Contributor

@avishniakov do you have any manual testing flow that you used, that I can do to ensure no functionality is lost?

I think, you can run the E2E template on a remote (docker) setup - should be good enough. Otherwise, it is pretty well covered with tests already.

@AlexejPenner AlexejPenner requested a review from fa9r November 15, 2023 13:15
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.

A lot of the changes introduced here clash with #2044, please consolidate this first

@AlexejPenner AlexejPenner changed the base branch from develop to feature/OSS-2609-OSS-2575-model-config-is-model-version November 15, 2023 15:55
Comment on lines +240 to +242
mv._id = self.id

return mv
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avishniakov I discovered this value was never set, i implemented a temporary fix but would leave it up to you to decide where to handle this

Copy link
Contributor

E2E template updates in examples/e2e have been pushed.

@avishniakov
Copy link
Contributor

I will bring it to feature/OSS-2609-OSS-2575-model-config-is-model-version and rebase with hydration there. It will speed us up.

@avishniakov avishniakov merged commit 7f1642c into feature/OSS-2609-OSS-2575-model-config-is-model-version Nov 16, 2023
5 of 17 checks passed
@avishniakov avishniakov deleted the feature/revamp-model-endpoints branch November 16, 2023 10:17
avishniakov added a commit that referenced this pull request Nov 17, 2023
* rename file

* rename file

* rename file

* big rebranding

* big rebranding

* deprecate method

* redesign context to return ModelVersion

* add `linked_artifact_ids` property

* add `__eq__`

* fix typo

* add number and name props

* rename artifact types

* prevent reserved mv names creation

* typo

* more logging

* prevent reserved mv names creation

* handle reserved names properly

* rework client calls

* remove `version_description`

* remove `version_name`

* `delete_new_version_on_failure` > `with_recovery`

* fix alembic false alarms

* output alembic branches

* resolve branching

* update test signature

* Temporarily fix quickstart until the certificate is renewed

* add existing_type

* enforce tags update

* update template tag

* after merge mess

* resolve branching

* finish renaming

* revert `log_artifact_metadata`

* tagging bugfix

* rework client methods

* sunset recovery and `running`

* nits from review

* rename files

* rename vars

* remove `ReservedNameError`

* resolve branching

* Auto-update of E2E template

* fixing bugs caught by tests

* fix branching

* properly refresh template

* overcome pagination issue in all_model_versions

* rename misleading method

* remove `all_model_versions`

* update `list_models`

* improve docstring

* rephrase docstring

* nits

* Auto-update of E2E template

* stick to unified list interface

* Feature/revamp model endpoints (#2035)

* Moved model versions to their own root route

* Fix the delete endpoint

* Fixed smaller mistakes

* Fixed for Client as well

* Fixed lint errors

* More linting

* More linting

* More tiny fixes

* Update src/zenml/zen_server/routers/model_versions_endpoints.py

Co-authored-by: Andrei Vishniakov <[email protected]>

* More linting

* Fixed tests and solved conflicts

* Fixed linting

* Fixed more tests

* Further refactoring

* Added raises section

* Fix one failing test

* Take "latest" stage into account

* Reformatted

* Standardize use of list response

* Rewrote some tests

* Add clien tests

* Fixed spelling

* Tested to work with e2e pipeline

* Ugly fixes to get response models in the CLI

* Auto-update of E2E template

* Access ModelVersionResponseModels in Client again

* Another small fix

* Linted

---------

Co-authored-by: Andrei Vishniakov <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>

* resolve mess after merge

* after merge clean-up

* update outdated tests

* Auto-update of E2E template

* deep update of template

* Revert "deep update of template"

This reverts commit b518dcc.

---------

Co-authored-by: Stefan Nica <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Alexej Penner <[email protected]>
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