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

Regen REST model for StrictModeConfig output type #916

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

agourlay
Copy link
Member

@agourlay agourlay commented Mar 5, 2025

Regen REST client for new StrictModeConfig output types

qdrant/qdrant#6114

Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit eef5010
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/67c97f2d678ac1000848dedf
😎 Deploy Preview https://deploy-preview-916--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -2697,14 +2768,69 @@ class StrictModeConfig(BaseModel, extra="forbid"):
sparse_config: Optional["StrictModeSparseConfig"] = Field(default=None, description="Sparse vector configuration")


class StrictModeConfigOutput(BaseModel):
Copy link
Member Author

Choose a reason for hiding this comment

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

no extra="forbid"

class StrictModeMultivector(BaseModel, extra="forbid"):
max_vectors: Optional[int] = Field(default=None, description="Max number of vectors in a multivector")


class StrictModeMultivectorOutput(BaseModel):
Copy link
Member Author

Choose a reason for hiding this comment

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

no extra="forbid"

class StrictModeSparse(BaseModel, extra="forbid"):
max_length: Optional[int] = Field(default=None, description="Max length of sparse vector")


class StrictModeSparseOutput(BaseModel):
Copy link
Member Author

Choose a reason for hiding this comment

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

no extra="forbid"

@agourlay agourlay force-pushed the regen-rest-model-for-strict-config-output-type branch 3 times, most recently from 39aed3c to 260ecca Compare March 5, 2025 15:49
@agourlay agourlay force-pushed the regen-rest-model-for-strict-config-output-type branch from 260ecca to a633e61 Compare March 5, 2025 16:05
@@ -6,7 +6,7 @@ PROJECT_ROOT="$(pwd)/$(dirname "$0")/../"

cd $(mktemp -d)

git clone --sparse --filter=blob:none --depth=1 -b dev git@github.com:qdrant/qdrant.git
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO revert once core PR merged in dev

@agourlay
Copy link
Member Author

agourlay commented Mar 6, 2025

I can't even run that inspection script locally.

❯ ./tests/inspection-cache-consistency-check.sh -s
+ dirname ./tests/inspection-cache-consistency-check.sh
+ cd ./tests/../
+ pwd
+ ROOT_DIR=/home/agourlay/Workspace/qdrant-client
+ CLIENT_DIR=/home/agourlay/Workspace/qdrant-client/qdrant_client
+ cd /home/agourlay/Workspace/qdrant-client/qdrant_client
+ inspection_cache_file=embed/_inspection_cache.py
+ [ ! -f embed/_inspection_cache.py ]
+ cp embed/_inspection_cache.py embed/_inspection_cache.py.diff
+ /home/agourlay/Workspace/qdrant-client/tools/populate_inspection_cache.sh
++ dirname /home/agourlay/Workspace/qdrant-client/tools/populate_inspection_cache.sh
+ RELATIVE_PROJECT_ROOT=/home/agourlay/Workspace/qdrant-client/tools/..
+ cd /home/agourlay/Workspace/qdrant-client/tools/..
++ pwd
+ ABSOLUTE_PROJECT_ROOT=/home/agourlay/Workspace/qdrant-client
+ python3 -m tools.populate_inspection_cache
/home/agourlay/Workspace/qdrant-client/tools/populate_inspection_cache.sh: line 9: 824850 Killed                  python3 -m tools.populate_inspection_cache

Here is the flamegraph.

profile

@agourlay
Copy link
Member Author

agourlay commented Mar 6, 2025

The infinite recursion seems to not be unrelated to the new strict mode config types.

I know this because the error reproduces on dev after regen. of REST #919

The smoke indicates the new recursive structure for Expression which breaks the schema traversal.

ping @coszio :)

@agourlay
Copy link
Member Author

agourlay commented Mar 6, 2025

I might have a fix for it in #919

Will rebase this one if it works out 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant