Release 0.66.1#3292
Closed
odlbot wants to merge 10 commits into
Closed
Conversation
* adding buckets for dynamic optimizer settings * fix test * add test * Update vector_search/conftest.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * skip if already optimized --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ideo series page and change the title of video and playlist on drawer (#3270) * fix: remove duration and institution label from the video series page --------- Co-authored-by: Ahtesham Quraish <ahtesham.quraish@192.168.1.14>
* set s-maxage via NEXT_CACHE_S_MAXAGE_SECONDS * allow empty
* fix fallback when no language is selected Co-authored-by: Copilot <copilot@github.com> * remove dead code Co-authored-by: Copilot <copilot@github.com> * add a test that ensures the cta is disabled if there are no enrollable runs --------- Co-authored-by: Copilot <copilot@github.com>
…guage run (#3291) When a contract has both an old and a new run of the same course (same language) and the user is enrolled in the older one, the dashboard was hiding their enrollment because language resolution defaulted to `course.next_run_id` (the newer, unenrolled run). Add `selectBestContractEnrollmentForLanguage` to find the user's best existing enrollment for the selected language (by language_options id / courseware_id, regardless of `is_enrollable`), and call it from both B2B paths in ContractContent before falling back to the next/best run. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Comment on lines
+142
to
+143
| def compute_optimizer_settings(point_count: int, shard_number: int): | ||
| points_per_shard = max(point_count // shard_number, 1) |
There was a problem hiding this comment.
Bug: The tune_collection function may crash with a TypeError when handling a new or empty collection because points_count can be None.
Severity: HIGH
Suggested Fix
In tune_collection, before calling compute_optimizer_settings, check if info.points_count is None. If it is, consider skipping the call to compute_optimizer_settings or defaulting the count to 0 to prevent the TypeError during division.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: vector_search/utils.py#L142-L143
Potential issue: The `tune_collection` function retrieves `info.points_count` from the
Qdrant client, which can be `None` for new or empty collections. This value is then
passed to `compute_optimizer_settings` as `point_count`. The function attempts an
integer division, `point_count // shard_number`, which raises a `TypeError` if
`point_count` is `None`. Because `tune_collection` is called on collections immediately
after creation, this crash will occur whenever a new, empty collection is processed.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chris Chudzicki
Carey P Gumaer
Ahtesham Quraish
Shankar Ambady