-
Notifications
You must be signed in to change notification settings - Fork 434
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
Sweep: Fix the multi-processing error in sweepai/core/vector_db.py by setting min 1 process #3296
Sweep: Fix the multi-processing error in sweepai/core/vector_db.py by setting min 1 process #3296
Comments
✨ Track Sweep's progress on our progress dashboard!💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID:
0a34477778 )Tip I can email you when I complete this pull request if you set up your email here! Actions (click)
I am currently looking into this ticket! I will update the progress of the ticket in this comment. I am currently searching through your code, looking for relevant snippets. Step 1: 🔎 SearchingI'm searching for relevant snippets in your repository. If this is your first time using Sweep, I'm indexing your repository. You can monitor the progress using the progress dashboard 🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. |
🚀 Here's the PR! #3304See Sweep's progress at the progress dashboard! 💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID:
5f98f46fd3 )Tip I can email you next time I complete a pull request if you set up your email here! Actions (click)
Step 1: 🔎 SearchingI found the following snippets in your repository. I will now analyze these snippets and come up with a plan. Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description.sweep/sweepai/core/vector_db.py Lines 1 to 169 in 8005e65
Step 2: ⌨️ CodingModify sweepai/core/vector_db.py with contents:
Check sweepai/core/vector_db.py with contents: Step 3: 🔁 Code ReviewI have finished reviewing the code for completeness. I did not find errors for 🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. This is an automated message generated by Sweep AI. |
… setting min 1 process (#3304) # Description This pull request addresses an issue in the `sweepai/core/vector_db.py` where the number of processes for the multiprocessing pool could be set to zero on machines with a low number of CPU cores. The fix ensures that there is always at least one process available for the pool, preventing potential errors during the embedding of text arrays. # Summary - Fixed a potential division by zero error in `sweepai/core/vector_db.py` by ensuring the multiprocessing pool is always initialized with at least one process. - Modified the calculation of the number of processes for the `multiprocessing.Pool` to `max(1, multiprocessing.cpu_count() // 4)`, guaranteeing a minimum of one process. - This change affects the `embed_text_array` function within the `vector_db.py` file, improving its reliability on systems with fewer CPU cores. Fixes #3296. --- <details> <summary><b>🎉 Latest improvements to Sweep:</b></summary> <ul> <li>New <a href="https://sweep-trilogy.vercel.app">dashboard</a> launched for real-time tracking of Sweep issues, covering all stages from search to coding.</li> <li>Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.</li> <li>Use the <a href="https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github">GitHub issues extension</a> for creating Sweep issues directly from your editor.</li> </ul> </details> --- ### 💡 To get Sweep to edit this pull request, you can: * Comment below, and Sweep can edit the entire PR * Comment on a file, Sweep will only modify the commented file * Edit the original issue to get Sweep to recreate the PR from scratch
Details
Branch
No response
The text was updated successfully, but these errors were encountered: