-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fixing update_model
s and revert #2402
#2440
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe modification concerns adjusting the configuration of a model update function, specifically altering how extra fields in Pydantic models are handled. The change shifts from a strict approach that forbids unexpected fields ( Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@coderabbitai review |
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- src/zenml/models/v2/base/update.py (1 hunks)
Additional comments: 1
src/zenml/models/v2/base/update.py (1)
- 48-48: The change to
_cls.__config__.extra = Extra.ignore
aligns with the PR's objective to fix theupdate_models
functionality by allowing extra fields to be ignored. This adjustment enhances flexibility in model updates but ensure that ignoring extra fields does not compromise data integrity or bypass critical validations that are necessary for the application's correct functioning.
@stefannica After bumping into the CLI service account update issue, I have decided to revert the changes in this PR. With the state reverted, the service account updates get executed as intended. |
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.
I might be missing some context to this PR - if so, feel free to ignore my comment
update_model = StackUpdate( # type: ignore[call-arg] | ||
workspace=self.active_workspace.id, | ||
user=self.active_user.id, | ||
stack_spec_path=stack_spec_file, |
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.
Sorry for this in advance, and I might be missing context to this bugfix, but instead of filling out useless fields here that are ignored in the backend. Why don't we remove these from Update models. Backwards compatibility should be preserved by having Extra.ignore on the base update model.
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.
Normally, that was the first version of the solution that I was going for. But later on, we ran into a hidden issue with the service connector updates. The issue was, that somewhere down the line, a service connector update model was converted to a request model and it failed due to the lack of these attributes. This is why I decided to revert the changes completely to a working state. We can think about how to handle the update
models with the upcoming changes in the API.
* Fix conditional statements in GitHub workflows (#2404) * Fix conditional statements in GitHub workflows * rename core CI flows * slow CI check doesn't happen when draft * Auto-update of Starter template * fix double conditional --------- Co-authored-by: GitHub Actions <actions@github.com> * Ensure proper spacing in error messages (#2399) * Ensure proper spacing in error messages * update TOC (#2406) --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> * Fix hyperai markdown table (#2426) * build: ⬆️ Upgrade min required google-cloud-aiplatform to 1.34.0 (#2428) * Close code block left open in the docs (#2432) * Fix docs * wrong ticks! * Simplify HF example and notify when cache is down (#2300) * starter files for the new CI paradigm * disable fast/slow ci on base branch * disable core workflow * Fast/slow CI core scaffold (#2274) * give darglint check its own job * fastCI * add slowCI * reenable fast CI * remove comment * add integration tests * fix spellcheck context * enable slow CI for testing * remove unit test dependency * fix dependency installations * yamlfixed * Comment-driven CI (#2275) * test comment-driven approach * delete unused test file * slow CI is comment-driven * restore CI * conditionally respond to comments depending on team status * add the whole team * Update .github/workflows/ci-slow.yml Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> * delete old CI --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> * remove spellcheck from slow CI * update spellcheck run conditions * Add GitHub issue creation on cache miss * test failing cache * Update Minio endpoint in setup_environment action.yml * Update minio-service endpoint in setup_environment action.yml * Sharded integration tests for Ubuntu (#2286) * add pytest-shard dev dependency * update script for sharded testing * add ubuntu sharding * fix naming * Use `pytest-split` to shard CI (#2296) * add split test to action * Update user authentication logic * Fix bug in login functionality * Refactor test coverage script * Update excluded directories in pyproject.toml * Update integration test script to include shard number * Update integration test script to use matrix.shard * Update caching key in setup_environment action.yml * Update durations path in test-coverage-xml.sh * Update cache key in setup_environment action.yml * Auto-update of Starter template * Fix formatting issue in setup_environment action.yml * Refactor code to improve performance and readability --------- Co-authored-by: GitHub Actions <actions@github.com> * Update pyproject.toml Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> * add extra final line * make workflows use normal ubuntu) * fix durations path and update docstring --------- Co-authored-by: Safoine El Khabich <34200873+safoinme@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> * Auto-update of Starter template * Auto-update of NLP template * Auto-update of E2E template * add docker testing back in * Auto-update of E2E template * temporarily trigger slow CI * revert to comment-driven CI * run full slow CI * CI as it should be * pyyaml fix * fix docker compose installation * test * test * update templates test * ubuntu-unit tests * restore unit tests back to normal * fix matrix for slow CI * uncomment the conditional checks * add input variable * remove mac and windows for testing * split out slow and fast integration testing * naming fix * confirm mac and windows ok" * improve hf and neuralprofet example * update the issue * update TOC (#2406) * Correct docstring in integration init file (#2408) * Fixed precedence * adding the new version to the migration tests (#2411) * update js code for github cache miss * update context to github * add discord webhooks * Add Discord webhook support for notifications * allow fallback of cache failure * ignore if weebhock fails to to many request * Add PYTORCH integration to DockerSettings --------- Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: Hamza Tahir <htahir111@gmail.com> Co-authored-by: Barış Can Durak <36421093+bcdurak@users.noreply.github.com> * Adding the latest version id and name to the artifact response (#2430) * update TOC (#2406) * Correct docstring in integration init file (#2408) * Fixed precedence * adding the new version to the migration tests (#2411) * adding latest version name and id to artifact response * removed optional column from the conftest --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: Hamza Tahir <htahir111@gmail.com> * Adding the ID of the producer pipeline run to artifact versions (#2431) * adding producer pipeline run id to artifact versions * reverting one of the changes * fixing type * Add vulnerability notice to README (#2437) * Add security vulnerability notice to README * add CVE ID * Allow more recent `adlfs` and `s3fs` versions (#2402) * bump azure integration * bump s3 * Add new property for filtering service account events (#2405) * add new property for filtering service account activities * Auto-update of Starter template --------- Co-authored-by: GitHub Actions <actions@github.com> * Add `download_files` method for `ArtifactVersion` (#2434) * add save_binary method * Fix file overwrite issue in save_artifact_binary_from_response() and improve error handling * refactor * tests ofc * add docs * linting * mypy fixes * ruff fix * coderabbit suggestions * missing docstring * docstring fix * Update artifact method name from save_binary to download_binary * more renaming (save -> download) * final rename (binary -> files) * update settings syntax * Fixing `update_model`s and revert #2402 (#2440) * fixing update models * reverting the update model changes * linting * linting * revert #2402 * revert adlfs changes --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> * Prepare release 0.55.3 (#2445) * alembic migration and bump version * release notes * add `save_models_to_registry` to CLI --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: François SERRA <francois.serra@adeo.com> Co-authored-by: jlopezpena <jlopezpena@users.noreply.github.com> Co-authored-by: Safoine El Khabich <34200873+safoinme@users.noreply.github.com> Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> Co-authored-by: Hamza Tahir <htahir111@gmail.com> Co-authored-by: Barış Can Durak <36421093+bcdurak@users.noreply.github.com> Co-authored-by: Jayesh Sharma <wjayesh@outlook.com>
* fixing update models * reverting the update model changes * linting * linting * revert zenml-io#2402 * revert adlfs changes --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm>
…l-io#2447) * Fix conditional statements in GitHub workflows (zenml-io#2404) * Fix conditional statements in GitHub workflows * rename core CI flows * slow CI check doesn't happen when draft * Auto-update of Starter template * fix double conditional --------- Co-authored-by: GitHub Actions <actions@github.com> * Ensure proper spacing in error messages (zenml-io#2399) * Ensure proper spacing in error messages * update TOC (zenml-io#2406) --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> * Fix hyperai markdown table (zenml-io#2426) * build: ⬆️ Upgrade min required google-cloud-aiplatform to 1.34.0 (zenml-io#2428) * Close code block left open in the docs (zenml-io#2432) * Fix docs * wrong ticks! * Simplify HF example and notify when cache is down (zenml-io#2300) * starter files for the new CI paradigm * disable fast/slow ci on base branch * disable core workflow * Fast/slow CI core scaffold (zenml-io#2274) * give darglint check its own job * fastCI * add slowCI * reenable fast CI * remove comment * add integration tests * fix spellcheck context * enable slow CI for testing * remove unit test dependency * fix dependency installations * yamlfixed * Comment-driven CI (zenml-io#2275) * test comment-driven approach * delete unused test file * slow CI is comment-driven * restore CI * conditionally respond to comments depending on team status * add the whole team * Update .github/workflows/ci-slow.yml Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> * delete old CI --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> * remove spellcheck from slow CI * update spellcheck run conditions * Add GitHub issue creation on cache miss * test failing cache * Update Minio endpoint in setup_environment action.yml * Update minio-service endpoint in setup_environment action.yml * Sharded integration tests for Ubuntu (zenml-io#2286) * add pytest-shard dev dependency * update script for sharded testing * add ubuntu sharding * fix naming * Use `pytest-split` to shard CI (zenml-io#2296) * add split test to action * Update user authentication logic * Fix bug in login functionality * Refactor test coverage script * Update excluded directories in pyproject.toml * Update integration test script to include shard number * Update integration test script to use matrix.shard * Update caching key in setup_environment action.yml * Update durations path in test-coverage-xml.sh * Update cache key in setup_environment action.yml * Auto-update of Starter template * Fix formatting issue in setup_environment action.yml * Refactor code to improve performance and readability --------- Co-authored-by: GitHub Actions <actions@github.com> * Update pyproject.toml Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> * add extra final line * make workflows use normal ubuntu) * fix durations path and update docstring --------- Co-authored-by: Safoine El Khabich <34200873+safoinme@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> * Auto-update of Starter template * Auto-update of NLP template * Auto-update of E2E template * add docker testing back in * Auto-update of E2E template * temporarily trigger slow CI * revert to comment-driven CI * run full slow CI * CI as it should be * pyyaml fix * fix docker compose installation * test * test * update templates test * ubuntu-unit tests * restore unit tests back to normal * fix matrix for slow CI * uncomment the conditional checks * add input variable * remove mac and windows for testing * split out slow and fast integration testing * naming fix * confirm mac and windows ok" * improve hf and neuralprofet example * update the issue * update TOC (zenml-io#2406) * Correct docstring in integration init file (zenml-io#2408) * Fixed precedence * adding the new version to the migration tests (zenml-io#2411) * update js code for github cache miss * update context to github * add discord webhooks * Add Discord webhook support for notifications * allow fallback of cache failure * ignore if weebhock fails to to many request * Add PYTORCH integration to DockerSettings --------- Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: Hamza Tahir <htahir111@gmail.com> Co-authored-by: Barış Can Durak <36421093+bcdurak@users.noreply.github.com> * Adding the latest version id and name to the artifact response (zenml-io#2430) * update TOC (zenml-io#2406) * Correct docstring in integration init file (zenml-io#2408) * Fixed precedence * adding the new version to the migration tests (zenml-io#2411) * adding latest version name and id to artifact response * removed optional column from the conftest --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: Hamza Tahir <htahir111@gmail.com> * Adding the ID of the producer pipeline run to artifact versions (zenml-io#2431) * adding producer pipeline run id to artifact versions * reverting one of the changes * fixing type * Add vulnerability notice to README (zenml-io#2437) * Add security vulnerability notice to README * add CVE ID * Allow more recent `adlfs` and `s3fs` versions (zenml-io#2402) * bump azure integration * bump s3 * Add new property for filtering service account events (zenml-io#2405) * add new property for filtering service account activities * Auto-update of Starter template --------- Co-authored-by: GitHub Actions <actions@github.com> * Add `download_files` method for `ArtifactVersion` (zenml-io#2434) * add save_binary method * Fix file overwrite issue in save_artifact_binary_from_response() and improve error handling * refactor * tests ofc * add docs * linting * mypy fixes * ruff fix * coderabbit suggestions * missing docstring * docstring fix * Update artifact method name from save_binary to download_binary * more renaming (save -> download) * final rename (binary -> files) * update settings syntax * Fixing `update_model`s and revert zenml-io#2402 (zenml-io#2440) * fixing update models * reverting the update model changes * linting * linting * revert zenml-io#2402 * revert adlfs changes --------- Co-authored-by: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> * Prepare release 0.55.3 (zenml-io#2445) * alembic migration and bump version * release notes * add `save_models_to_registry` to CLI --------- Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com> Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Christian Versloot <c.versloot@infoplaza.nl> Co-authored-by: François SERRA <francois.serra@adeo.com> Co-authored-by: jlopezpena <jlopezpena@users.noreply.github.com> Co-authored-by: Safoine El Khabich <34200873+safoinme@users.noreply.github.com> Co-authored-by: Alex Strick van Linschoten <stricksubscriptions@fastmail.fm> Co-authored-by: Hamza Tahir <htahir111@gmail.com> Co-authored-by: Barış Can Durak <36421093+bcdurak@users.noreply.github.com> Co-authored-by: Jayesh Sharma <wjayesh@outlook.com>
Describe changes
Bugfix for update models.
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
Summary by CodeRabbit