Skip to content

Commit

Permalink
Fix sorting when using custom fetching (#3366)
Browse files Browse the repository at this point in the history
* Apply sorting to query before running custom fetch

* Unrelated docs typo

* Small typos
  • Loading branch information
schustmi authored Feb 24, 2025
1 parent 532e536 commit 04577b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/book/component-guide/image-builders/kaniko.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ List of some possible additional flags:

* `--cache`: Set to `false` to disable caching. Defaults to `true`.
* `--cache-dir`: Set the directory where to store cached layers. Defaults to `/cache`.
* `--cache-repo`: Set the repository where to store cached layers. Defaults to `gcr.io/kaniko-project/executor`.
* `--cache-repo`: Set the repository where to store cached layers.
* `--cache-ttl`: Set the cache expiration time. Defaults to `24h`.
* `--cleanup`: Set to `false` to disable cleanup of the working directory. Defaults to `true`.
* `--compressed-caching`: Set to `false` to disable compressed caching. Defaults to `true`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class VertexOrchestratorConfig(
then a subdirectory of the artifact store will be used.
encryption_spec_key_name: The Cloud KMS resource identifier of the
customer managed encryption key used to protect the job. Has the form:
`projects/<PRJCT>/locations/<REGION>/keyRings/<KR>/cryptoKeys/<KEY>`
`projects/<PROJECT>/locations/<REGION>/keyRings/<KR>/cryptoKeys/<KEY>`
. The key needs to be in the same region as where the compute
resource is created.
workload_service_account: the service account for workload run-as
Expand Down Expand Up @@ -124,13 +124,14 @@ class VertexOrchestratorConfig(
pipeline_root: Optional[str] = None
encryption_spec_key_name: Optional[str] = None
workload_service_account: Optional[str] = None
function_service_account: Optional[str] = None
scheduler_service_account: Optional[str] = None
network: Optional[str] = None

# Deprecated
cpu_limit: Optional[str] = None
memory_limit: Optional[str] = None
gpu_limit: Optional[int] = None
function_service_account: Optional[str] = None
scheduler_service_account: Optional[str] = None

_resource_deprecation = deprecation_utils.deprecate_pydantic_attributes(
"cpu_limit",
Expand Down
4 changes: 1 addition & 3 deletions src/zenml/zen_stores/sql_zen_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ def filter_and_paginate(
RuntimeError: if the schema does not have a `to_model` method.
"""
query = filter_model.apply_filter(query=query, table=table)
query = filter_model.apply_sorting(query=query, table=table)
query = query.distinct()

# Get the total amount of items in the database for a given query
Expand All @@ -1005,9 +1006,6 @@ def filter_and_paginate(
else:
total = 0

# Sorting
query = filter_model.apply_sorting(query=query, table=table)

# Get the total amount of pages in the database for a given query
if total == 0:
total_pages = 1
Expand Down

0 comments on commit 04577b0

Please sign in to comment.