-
Notifications
You must be signed in to change notification settings - Fork 9
Print more stats; print WS_SEARCH as ef #29
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
base: update.redisearch
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -121,6 +121,12 @@ def run_experiment( | |||||||||||||||
| upload_stats = self.uploader.upload( | ||||||||||||||||
| distance=dataset.config.distance, records=reader.read_data(upload_start_idx,upload_end_idx) | ||||||||||||||||
| ) | ||||||||||||||||
| memory_usage = upload_stats["memory_usage"] | ||||||||||||||||
| if (used_memory := memory_usage.get("used_memory")) is not None: | ||||||||||||||||
| print(f"{used_memory=}") | ||||||||||||||||
| if (index_info := memory_usage.get("index_info")) is not None: | ||||||||||||||||
| if (vector_index_sz_mb := index_info.get("vector_index_sz_mb")) is not None: | ||||||||||||||||
| print(f"{vector_index_sz_mb=}") | ||||||||||||||||
|
||||||||||||||||
| print(f"{vector_index_sz_mb=}") | |
| if isinstance(memory_usage, dict): | |
| if (used_memory := memory_usage.get("used_memory")) is not None: | |
| print(f"{used_memory=}") | |
| if (index_info := memory_usage.get("index_info")) is not None: | |
| if (vector_index_sz_mb := index_info.get("vector_index_sz_mb")) is not None: | |
| print(f"{vector_index_sz_mb=}") |
Copilot
AI
Aug 6, 2025
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.
The ef variable is being overwritten with calibration_value but this assignment appears to serve no purpose since ef is only used for printing in the loop and this assignment happens after the print statement. This could be a logic error.
| ef = calibration_value |
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.
The walrus operator assignment in the condition will fail if
memory_usageis None or not a dictionary. Add a null check formemory_usagebefore calling.get()method.