instance_id stringlengths 21 53 | repo stringclasses 188
values | language stringclasses 1
value | pull_number int64 20 148k | title stringlengths 6 144 | body stringlengths 0 83.4k | created_at stringdate 2015-09-25 03:17:17 2025-07-10 16:50:35 | problem_statement stringlengths 188 240k | hints_text stringlengths 0 145k | resolved_issues listlengths 1 6 | base_commit stringlengths 40 40 | commit_to_review dict | reference_review_comments listlengths 1 62 | merged_commit stringlengths 40 40 | merged_patch stringlengths 297 9.87M | metadata dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
run-llama__llama_index-13245@a965669 | run-llama/llama_index | Python | 13,245 | Argilla Callback Handler README updated | # Description
Closes #13244, updates the README for the new version of the Argilla Callback Handler.
Fixes # (issue)
## New Package?
Did I fill in the `tool.llamahub` section in the `pyproject.toml` and provide a detailed README.md for my new integration or package?
- [X] Yes
- [ ] No
## Version Bump... | 2024-05-03T10:59:13Z | [Feature Request]: Argilla Callback Handler updated, new README
### Feature Description
Hi! Ignacio from Argilla here. We just released version 1.0.0 of the Argilla LlamaIndex Callback Handler, and we wanted to update a bit the README that we had empty on your side. Now, the callback works fine after the refactor on y... | [
{
"body": "### Feature Description\n\nHi! Ignacio from Argilla here. We just released version 1.0.0 of the Argilla LlamaIndex Callback Handler, and we wanted to update a bit the README that we had empty on your side. Now, the callback works fine after the refactor on your side :)\n\n### Reason\n\n_No response_\... | 5d98a43ac3dd97def209ddf8b93ebcd9ec12bafd | {
"head_commit": "a965669c49cf2745504d39b138fd84b26226522e",
"head_commit_message": "readme updayed",
"patch_to_review": "diff --git a/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md b/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md\nindex 5574bbe2b1..cc96324c... | [
{
"diff_hunk": "@@ -1 +1,82 @@\n-# LlamaIndex Callbacks Integration: Argilla\n+<div align=\"center\">\n+ <h1>✨🦙 Argilla's LlamaIndex Integration</h1>\n+ <p><em> Argilla integration into the LlamaIndex workflow</em></p>\n+</div>\n+\n+> [!TIP]\n+> To discuss, get support, or give feedback [join Argilla's Slack... | ef063b8ec05a17cf989f69eefaf768ddaeefd192 | diff --git a/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md b/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md
index 5574bbe2b1..3dd881d2c9 100644
--- a/llama-index-integrations/callbacks/llama-index-callbacks-argilla/README.md
+++ b/llama-index-integrations/callbac... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "New Feature Additions"
} | |
scipy__scipy-21711@49d0f74 | scipy/scipy | Python | 21,711 | BUG: special: Fix formula for division of dual numbers in xsf | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
https://scipy... | 2024-10-15T15:23:07Z | BUG: special: autodifferentiation of division operator
### Describe your issue.
In gh-21568, we found that the implementation of `dual &operator/=(const dual &other)` may not be quite right. I thought we should open this so it's not forgotten.
@izaid can you fix this, and @steppi can review?
In any case, we shoul... | [
{
"body": "### Describe your issue.\r\n\r\nIn gh-21568, we found that the implementation of `dual &operator/=(const dual &other)` may not be quite right. I thought we should open this so it's not forgotten. \r\n@izaid can you fix this, and @steppi can review?\r\nIn any case, we should add a test and a reference... | 0b49035c5c64d3901ea99905ccc2bbd465e2c8ad | {
"head_commit": "49d0f747292100427fa4355c81798dff23190cfd",
"head_commit_message": "Fix dual division formula",
"patch_to_review": "diff --git a/scipy/special/xsf/dual.h b/scipy/special/xsf/dual.h\nindex 18aa01cd7a87..c2a60ad73c01 100644\n--- a/scipy/special/xsf/dual.h\n+++ b/scipy/special/xsf/dual.h\n@@ -120,9 ... | [
{
"diff_hunk": "@@ -120,9 +120,8 @@ class dual<T, Order> {\n \n dual &operator/=(const dual &other) {\n for (size_t i = 0; i <= Order; ++i) {\n- // General Leibniz Rule\n- for (size_t j = 1; j <= i; ++j) {\n- data[i] -= detail::fast_binom<T>(i, j) * other.data[j]... | c2b9ead4f6196ba1cb9ef20bf3b24fae2232cc87 | diff --git a/scipy/special/xsf/dual.h b/scipy/special/xsf/dual.h
index 18aa01cd7a87..f0f79de28902 100644
--- a/scipy/special/xsf/dual.h
+++ b/scipy/special/xsf/dual.h
@@ -120,9 +120,8 @@ class dual<T, Order> {
dual &operator/=(const dual &other) {
for (size_t i = 0; i <= Order; ++i) {
- // Ge... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
run-llama__llama_index-12437@2eb676f | run-llama/llama_index | Python | 12,437 | Resolve ImportError for 'MessageContentText' Due to Typing Update in openai.types.beta.threads | # Description
This pull request addresses a specific ImportError encountered due to a recent update in the openai.types.beta.threads library, which affected the import of MessageContentText. The issue was identified during routine development activities, highlighting a compatibility problem with the new library vers... | 2024-03-30T22:43:57Z | [Bug]: Import Error: cannot import name 'MessageContentText' from 'openai.types.beta.threads'
### Bug Description
after importing `OpenAIAssistantAgent` from `llama_index.agent.openai` and use the class to create the agent, running the following snippet is not working:
```
agent = OpenAIAssistantAgent.from_new(
... | <!-- Greeting -->
Hey there, @MaHDiaLaGaB! 🎉 I'm [Dosu](https://dosu.dev), a friendly bot here to help you solve bugs, answer your questions, and guide you on becoming a contributor while we wait for a human maintainer. Don't worry, I've got your back and am here to assist! I'm taking a look at your issue with the `Op... | [
{
"body": "### Bug Description\n\nafter importing `OpenAIAssistantAgent` from `llama_index.agent.openai` and use the class to create the agent, running the following snippet is not working:\r\n```\r\nagent = OpenAIAssistantAgent.from_new(\r\n name=\"QA bot\",\r\n instructions=\"You are a bot designed to a... | 9607a05a923ddf07deee86a56d386b42943ce381 | {
"head_commit": "2eb676f8d228f95b338d253360126ee43c4b1dbe",
"head_commit_message": "Fix ImportError caused by outdated \"MessageContentText\" and \"ThreadMessage\" import\n\nUpdated the import statement to align with the new update in \"openai.types.beta.threads\", resolving the ImportError that prevented successf... | [
{
"diff_hunk": "",
"line": null,
"original_line": null,
"original_start_line": null,
"path": "llama-index-legacy/llama_index/legacy/agent/openai_assistant_agent.py",
"start_line": null,
"text": "@user1:\nWe shouldn't update legacy\n\n@author:\nok i will revert the changes in legacy"
},... | 96311d3f8fe348971d00c0e14c4aaf2256210dd0 | diff --git a/llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/openai_assistant_agent.py b/llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/openai_assistant_agent.py
index afc462e9e0..4f03d796a2 100644
--- a/llama-index-integrations/agent/llama-index-agent-... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-12328@7940bf0 | run-llama/llama_index | Python | 12,328 | see #12234: add support for custom endpoints to MistralAI | # Description
Mistral models can be deployed to Azure AI, which has a different endpoint than the default one. Currently it is not possible to instantiate the `MistralAI` class with a custom endpoint. This PR fixes that by adding an `endpoint` parameter which allows clients to provide a custom endpoint. When not pro... | 2024-03-27T14:40:55Z | [Question]: How to use MistralAI deployed serverless on Azure AI?
### Question Validation
- [X] I have searched both the documentation and discord for an answer.
### Question
I deployed Mistral via Azure AI, how do I use it in LlamaIndex. I tried using the MistralAI LLM in LlamaIndex but I don't see how to configure... | <!-- Greeting -->
Hey @ziodave, nice to see you around here again! Hope you're doing well.
<!-- Answer -->
To configure the MistralAI LLM in LlamaIndex to use a custom endpoint after deploying Mistral via Azure AI, you need to modify the initialization of the `MistralClient` and `MistralAsyncClient` within the `__init... | [
{
"body": "### Question Validation\n\n- [X] I have searched both the documentation and discord for an answer.\n\n### Question\n\nI deployed Mistral via Azure AI, how do I use it in LlamaIndex. I tried using the MistralAI LLM in LlamaIndex but I don't see how to configure the endpoint to a custom endpoint.",
... | ff73754c5b68e9f4e49b1d55bc70e10d18462bce | {
"head_commit": "7940bf0d06299c33f47ec599fd51bde5749b6ddb",
"head_commit_message": "see #12234: bump version",
"patch_to_review": "diff --git a/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py b/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/m... | [
{
"diff_hunk": "",
"line": null,
"original_line": null,
"original_start_line": null,
"path": "llama-index-legacy/llama_index/legacy/llms/mistral.py",
"start_line": null,
"text": "@user1:\nwe shouldn't really be updating legacy with new features or version changes\n\n@author:\nDone!"
}
... | df00bd493ccf406e2157990352be2780c7086123 | diff --git a/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py b/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistralai/base.py
index 047da4d912..536363ff4c 100644
--- a/llama-index-integrations/llms/llama-index-llms-mistralai/llama_index/llms/mistr... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
run-llama__llama_index-13213@56e51ea | run-llama/llama_index | Python | 13,213 | Add VectorStore integration for Vespa | # Description
This PR adds integration for [Vespa](docs.vespa.ai) as llama-index-vector-store.
New dependencies introduced are [pyvespa](https://pypi.org/project/pyvespa/).
Fixes #8099
## New Package?
Yes.
Did I fill in the `tool.llamahub` section in the `pyproject.toml` and provide a detailed README... | 2024-05-02T07:15:02Z | [Feature Request]: Vespa VectorDB Connection
### Feature Description
My team is using Vespa as our VectorDB solution and we wanted to start using LLamaIndex in our project. We would just need to create a connector that can work with existing Vespa deployments so it would be a seamless connection with the library. I co... | _🤖_
<!-- Answer -->
Thank you for your feature request! It's great to hear that you're interested in integrating Vespa with LlamaIndex. Your proposed solution of creating a connector for Vespa deployments sounds like a valuable addition to the library. We appreciate your willingness to work on this feature.
Contribu... | [
{
"body": "### Feature Description\n\nMy team is using Vespa as our VectorDB solution and we wanted to start using LLamaIndex in our project. We would just need to create a connector that can work with existing Vespa deployments so it would be a seamless connection with the library. I could work on this if poss... | 4f967b839f7e986f178f24cae2038224eb33147f | {
"head_commit": "56e51ea27b04691c1eec1d615c732e9402bf63c1",
"head_commit_message": "make lint",
"patch_to_review": "diff --git a/docs/docs/examples/vector_stores/VespaIndexDemo.ipynb b/docs/docs/examples/vector_stores/VespaIndexDemo.ipynb\nnew file mode 100644\nindex 0000000000..da7722331d\n--- /dev/null\n+++ b/... | [
{
"diff_hunk": "",
"line": null,
"original_line": null,
"original_start_line": null,
"path": "llama-index-integrations/vector_stores/llama-index-vector-stores-vespa/poetry.lock",
"start_line": null,
"text": "@user1:\ncan we please remove this lock file -- we typically don't keep these ar... | 61ca433300ef40d5921ca5de54153407ba4457d9 | diff --git a/docs/docs/examples/vector_stores/VespaIndexDemo.ipynb b/docs/docs/examples/vector_stores/VespaIndexDemo.ipynb
new file mode 100644
index 0000000000..9d3c3e59fd
--- /dev/null
+++ b/docs/docs/examples/vector_stores/VespaIndexDemo.ipynb
@@ -0,0 +1,537 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-21678@39978fa | scipy/scipy | Python | 21,678 | BUG: fix `nan` output of `special.betaincinv` |
#### Reference issue
Closes gh-21426
#### What does this implement/fix?
The underlying issue was fixed in Boost, so I simply updated it.
#### Additional information
@steppi: I do not want to open the can of worms to unify the `stats` and `special` wrappers of boost functions here. This PR is a simple bugfix ... | 2024-10-08T19:22:26Z | BUG: `special.betaincinv` returns nan
### Describe your issue.
`scipy.special.betaincinv` occasionally returns NaN values from SciPy version 1.14.0.
### Reproducing Code Example
Reproducer:
```python
import numpy as np
import scipy
a = np.array([[5]], dtype='f')
x = np.array([[0.5]], dtype='f')
print... | This is the same underlying problem as https://github.com/scipy/scipy/issues/21303 and will require adjusting the Boost policies of `ibeta_inv_wrap` as was done for that issue. We had only adjusted the policies for `beta_ppf_wrap` which itself wraps `ibeta_inv_wrap`. Does anyone know why we need separate implementation... | [
{
"body": "### Describe your issue.\r\n\r\n`scipy.special.betaincinv` occasionally returns NaN values from SciPy version 1.14.0.\r\n\r\n### Reproducing Code Example\r\n\r\nReproducer:\r\n\r\n```python\r\nimport numpy as np\r\nimport scipy\r\n\r\na = np.array([[5]], dtype='f')\r\nx = np.array([[0.5]], dtype='f')... | 548350a2df9279efb6f578f5ce477a74ed7f4c9c | {
"head_commit": "39978fa3cbf46afa928931de371b8368bebbfea3",
"head_commit_message": "TST: loosen tolerance for 32bit and single precision",
"patch_to_review": "diff --git a/scipy/_lib/boost_math b/scipy/_lib/boost_math\nindex 54e5acf7faea..260f7600e95d 160000\n--- a/scipy/_lib/boost_math\n+++ b/scipy/_lib/boost_m... | [
{
"diff_hunk": "@@ -1445,6 +1445,21 @@ def test_betainc_domain_errors(self, func, args):\n with pytest.raises(special.SpecialFunctionError, match='domain'):\n special.betainc(*args)\n \n+ @pytest.mark.parametrize('dtype', [np.float32, np.float64])\n+ def test_gh21426(self, dtyp... | 835af1f1bcc16c5a23ca5f4416111b5814be3978 | diff --git a/scipy/_lib/boost_math b/scipy/_lib/boost_math
index 54e5acf7faea..260f7600e95d 160000
--- a/scipy/_lib/boost_math
+++ b/scipy/_lib/boost_math
@@ -1 +1 @@
-Subproject commit 54e5acf7faeab1400031d84bbfb2c46e81d82442
+Subproject commit 260f7600e95dcf87b228d46a4a37cf594df5437b
diff --git a/scipy/special/tests/... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-13405@9656989 | run-llama/llama_index | Python | 13,405 | Add support for prompt kwarg | # Description
Currently, the `llm.complete` function requires that a prompt be provided as the first positional argument (e.g., `llm.complete("my prompt)`). It does not support passing the prompt as a keyword argument (e.g., `llm.complete(prompt="my prompt")`), and throws an exception. In this PR, I've added a funct... | 2024-05-09T22:35:47Z | [Bug]: tuple index out of range when calling LLM with prompt keyword arg
### Bug Description
This succeeds:
```python
output = llm.complete(prompt)
```
but see how it fails in Steps to Reproduce below. I could be wrong if providing `prompt` as a keyword arg is unsupported, but I didn't see any documentation or com... | <!-- Greeting -->
Hey there, @erictse! 👋 I'm [Dosu](https://dosu.dev), a bot crafted to assist with squashing bugs, answering queries, and guiding you towards becoming a contributor in the LlamaIndex universe. While we await the arrival of a human maintainer, I'm here to lend a robotic hand. I've caught your issue and... | [
{
"body": "### Bug Description\n\nThis succeeds:\r\n```python\r\noutput = llm.complete(prompt)\r\n```\r\nbut see how it fails in Steps to Reproduce below. I could be wrong if providing `prompt` as a keyword arg is unsupported, but I didn't see any documentation or comments about that.\n\n### Version\n\n0.10.30\... | b9f8085ab5b41b52d23524aaa2b5f00bed5ff9b8 | {
"head_commit": "965698971b43c1c9f8aa32cba99480951403707b",
"head_commit_message": "Add support for prompt kwarg",
"patch_to_review": "diff --git a/llama-index-core/llama_index/core/llms/callbacks.py b/llama-index-core/llama_index/core/llms/callbacks.py\nindex 76ebf7bc9a..048715d611 100644\n--- a/llama-index-cor... | [
{
"diff_hunk": "@@ -236,25 +236,34 @@ def wrapper_logic(_self: Any) -> Generator[CallbackManager, None, None]:\n \n yield callback_manager\n \n+ def extract_prompt(*args: Any, **kwargs: Any) -> str:\n+ if len(args) > 0:\n+ return str(args[0])\n+ elif \"pro... | 788c299508841b7c594249b21336bc0bad18802e | diff --git a/llama-index-core/llama_index/core/llms/callbacks.py b/llama-index-core/llama_index/core/llms/callbacks.py
index 76ebf7bc9a..4fc955d828 100644
--- a/llama-index-core/llama_index/core/llms/callbacks.py
+++ b/llama-index-core/llama_index/core/llms/callbacks.py
@@ -236,9 +236,20 @@ def wrapper_logic(_self: Any... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-13155@7e11ea2 | run-llama/llama_index | Python | 13,155 | Add chat summary memory buffer | # Description
This PR introduces a new ChatSummaryMemoryBuffer to limit the chat history to a certain token length, and iteratively summarize all messages that do not fit in the memory buffer. This can be useful if you want to limit costs and latency (assuming the summarization prompt uses and generates fewer tokens... | 2024-04-29T10:10:47Z | [Question]: Is it possible integrate langchain ConversationBufferMemory ?
### Question Validation
- [X] I have searched both the documentation and discord for an answer.
### Question
Is it possible to integrate langchain `ConversationBufferMemory` with llama-index chat engine?
I'm checking on this because current l... | <!-- Answer -->
Integrating langchain `ConversationBufferMemory` with the llama-index chat engine is indeed feasible. This process involves creating an adapter or bridge that allows llama-index to leverage langchain's `ConversationBufferMemory` for enhanced memory management. Specifically, you would need to either exte... | [
{
"body": "### Question Validation\n\n- [X] I have searched both the documentation and discord for an answer.\n\n### Question\n\nIs it possible to integrate langchain `ConversationBufferMemory` with llama-index chat engine?\r\nI'm checking on this because current llama-index `ChatMemoryBuffer` is not sufficient... | 40913847ba47d435b40b7fac3ae83eba89b56bb9 | {
"head_commit": "7e11ea22e89143561db8d719c962a86dc0615124",
"head_commit_message": "Fix test comment",
"patch_to_review": "diff --git a/docs/docs/examples/memory/ChatSummaryMemoryBuffer.ipynb b/docs/docs/examples/memory/ChatSummaryMemoryBuffer.ipynb\nnew file mode 100644\nindex 0000000000..3d61c7f292\n--- /dev/n... | [
{
"diff_hunk": "@@ -0,0 +1,245 @@\n+from typing import Any, Callable, Dict, List, Optional\r\n+\r\n+from pydantic.fields import PrivateAttr\r\n+\r\n+from llama_index.core.base.llms.types import ChatMessage, MessageRole\r\n+from llama_index.core.bridge.pydantic import Field, root_validator\r\n+from llama_index.c... | 323bd25d8aacea62d75877296187ccfb79e4b28c | diff --git a/docs/docs/examples/memory/ChatSummaryMemoryBuffer.ipynb b/docs/docs/examples/memory/ChatSummaryMemoryBuffer.ipynb
new file mode 100644
index 0000000000..a404f0cb33
--- /dev/null
+++ b/docs/docs/examples/memory/ChatSummaryMemoryBuffer.ipynb
@@ -0,0 +1,246 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-21668@385bb3b | scipy/scipy | Python | 21,668 | BUG: fft.fht: set `u.imag[-1] = 0` only when `n` is even | Closes #21661.
| 2024-10-06T10:10:30Z | BUG: fft.fht: should set `u.imag[-1] = 0` only when `n` is even
### Describe your issue.
In the source of scipy.fft.fht, in the function fhtcoeff(...) in _fftlog_backend.py, one has to ensure that the array u has a u[-1] which is purely real when the data is of even size n. That requirement stems from the fact that o... | cc @ntessore
Oh, here is a code example showing the issue. Using the example in the documentation, but running it with an odd n=129 produces much larger relative errors relative to the analytical result. For even n=128 or 130, the error is much smaller. Here is the example with n=129:
```
import numpy as np
from sc... | [
{
"body": "### Describe your issue.\n\nIn the source of scipy.fft.fht, in the function fhtcoeff(...) in _fftlog_backend.py, one has to ensure that the array u has a u[-1] which is purely real when the data is of even size n. That requirement stems from the fact that one wants the fht transform of real data to ... | c43875e23dd09bb512a0defefb4cb94568a70459 | {
"head_commit": "385bb3b6204f0f88c5e899513470657cbae1cdd4",
"head_commit_message": "BUG: fft.fht: should set u.imag[-1] = 0 only when n is even #21661",
"patch_to_review": "diff --git a/scipy/fft/_fftlog_backend.py b/scipy/fft/_fftlog_backend.py\nindex d3d05848ac09..414f16072dc3 100644\n--- a/scipy/fft/_fftlog_b... | [
{
"diff_hunk": "@@ -92,7 +92,8 @@ def fhtcoeff(n, dln, mu, offset=0.0, bias=0.0, inverse=False):\n np.exp(u, out=u)\n \n # fix last coefficient to be real\n- u.imag[-1] = 0\n+ if (n%2==0):",
"line": null,
"original_line": 95,
"original_start_line": null,
"path": "scipy/fft/_fftlog_... | 3ac81587a0a5b335761354973e14a767babe8346 | diff --git a/scipy/fft/_fftlog_backend.py b/scipy/fft/_fftlog_backend.py
index d3d05848ac09..0b38733aaa34 100644
--- a/scipy/fft/_fftlog_backend.py
+++ b/scipy/fft/_fftlog_backend.py
@@ -92,7 +92,8 @@ def fhtcoeff(n, dln, mu, offset=0.0, bias=0.0, inverse=False):
np.exp(u, out=u)
# fix last coefficient to b... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21604@46c6e6e | scipy/scipy | Python | 21,604 | MAINT: `special.gegenbauer`: fix behavior for `n=0`; add input validation of `alpha` | #### Reference issue
Closes gh-8888
#### What does this implement/fix?
gh-8888 noted that `special.gegenbauer(0, 0)` produced a NaN polynomial instead of the polynomial $1$. This fixes the bug and adds input validation for the `alpha` parameter.
#### Additional information
It would not be hard to find adjacent... | 2024-09-22T03:57:05Z | MAINT: special.gegenbauer: case of `alpha = 0` not handled
scipy.special.gegenbauer does not handle case alpha = 0. E.g. $C_0^0(z)$ should be 1 (evaluated as nan poly)
### Reproducing code example:
```
from scipy.special import gegenbauer as C
C(0, 0)
```
### Error message:
```
/usr/lib64/python3.5/site-pac... | [
{
"body": "scipy.special.gegenbauer does not handle case alpha = 0. E.g. $C_0^0(z)$ should be 1 (evaluated as nan poly)\r\n\r\n\r\n### Reproducing code example:\r\n```\r\nfrom scipy.special import gegenbauer as C\r\nC(0, 0)\r\n```\r\n### Error message:\r\n```\r\n/usr/lib64/python3.5/site-packages/scipy/special/... | f923ac5de0d2fda8fa6a419e4ab54cf2b6be001b | {
"head_commit": "46c6e6e0aebf97a937f7292ab8e8cfedecab1626",
"head_commit_message": "MAINT: special.gegenbauer: add input validation of alpha",
"patch_to_review": "diff --git a/scipy/special/_orthogonal.py b/scipy/special/_orthogonal.py\nindex 031f68c6abc7..e021f5a899b2 100644\n--- a/scipy/special/_orthogonal.py\... | [
{
"diff_hunk": "@@ -93,6 +95,21 @@ def test_gegenbauer(self):\n assert_array_almost_equal(Ca5.c,array([4*sc.poch(a,5),0,-20*sc.poch(a,4),\n 0,15*sc.poch(a,3),0])/15.0,11)\n \n+ def test_n_zero_gh8888(self):\n+ # gh-8888 reported that gegenbauer(0,... | 335c0e82fea6e7ce4bd07ce499cec3fd6ec49e7a | diff --git a/scipy/special/_orthogonal.py b/scipy/special/_orthogonal.py
index 031f68c6abc7..e021f5a899b2 100644
--- a/scipy/special/_orthogonal.py
+++ b/scipy/special/_orthogonal.py
@@ -1616,8 +1616,10 @@ def gegenbauer(n, alpha, monic=False):
>>> plt.show()
"""
+ if not np.isfinite(alpha) or alpha <= -... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
scipy__scipy-21603@c1b162c | scipy/scipy | Python | 21,603 | DOC: `special.riccati_yn`: highlight sign convention | #### Reference issue
Closes gh-12895
Closes gh-17920
#### What does this implement/fix?
gh-12895 requests that the sign convention for `special.riccati_yn` be changed from $xy_n(x)$ to $-xy_n(x)$. Both conventions are valid, and SciPy's convention can be found in reputable references including Abramowitz and Steg... | 2024-09-22T00:28:15Z | BUG: `special.riccati_yn`: Definition missing minus sign
Please consider using the definition -xy_n(x) instead of xy_n(x).
The minus sign is important!
Thanks!
BUG: special: Riccati Bessel function of the second kind lacks a minus sign
The Riccati Bessel function of the second kind: scipy.special.riccati_yn(n, x... | Please do consider this query, the minus sign not being implemented leads to loads of errors in calculations.
The Riccati-Bessel function of second kind **is** -xy_n(x)
Thank you in advance for considering this !
It does seem to be the more common convention to include the minus sign. However, it is noted in [Barnett... | [
{
"body": "Please consider using the definition -xy_n(x) instead of xy_n(x).\r\n\r\nThe minus sign is important!\r\n\r\nThanks!",
"number": 12895,
"title": "BUG: `special.riccati_yn`: Definition missing minus sign"
},
{
"body": "The Riccati Bessel function of the second kind: scipy.special.ricca... | a63fae9cc79a7dffb2f5283a8646f0b5a8aec65f | {
"head_commit": "c1b162cfc4ef7d4a3e4310509b63ef661eba7d35",
"head_commit_message": "DOC: special.riccati-yn: highlight sign convention\n\n[docs only]",
"patch_to_review": "diff --git a/scipy/special/_basic.py b/scipy/special/_basic.py\nindex 24ed153d28f0..f5b27476bd6c 100644\n--- a/scipy/special/_basic.py\n+++ b... | [
{
"diff_hunk": "@@ -1337,9 +1337,10 @@ def riccati_jn(n, x):\n def riccati_yn(n, x):\n \"\"\"Compute Ricatti-Bessel function of the second kind and its derivative.\n \n- The Ricatti-Bessel function of the second kind is defined as :math:`x\n+ The Ricatti-Bessel function of the second kind is defined h... | 0271c54f421124e48770ca9c0b170883e21e57d3 | diff --git a/scipy/special/_basic.py b/scipy/special/_basic.py
index 24ed153d28f0..d10d9e31da33 100644
--- a/scipy/special/_basic.py
+++ b/scipy/special/_basic.py
@@ -1337,9 +1337,10 @@ def riccati_jn(n, x):
def riccati_yn(n, x):
"""Compute Ricatti-Bessel function of the second kind and its derivative.
- The... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21578@c285e44 | scipy/scipy | Python | 21,578 | DOC: `special.mathieu_c/sem`: add information to docstring | #### Reference issue
Closes gh-4096
#### What does this implement/fix?
Adds requested information and examples to the documentation of `mathieu_cem` and `mathieu_sem`.
*First push with `[docs only]` in the commit message did not build the docs, so force-pushing without that...* | 2024-09-18T05:52:36Z | DOC: special: Clarify Mathieu function documentation
Hi, I came across the Mathieu functions and could not get the values from scipy.special.mathieu_cem in accordance with the solutions of the corresponding differential equation.
for q == 0 one should get simply cos(sqrt(a) \* t), but what scipy.special.mathieu_cem re... | ok I get it now! it helps to look into the book Computation of special functions by Shanjie Zhang, Jianming Jin.
I was mistaken that 'a' as the characteristic value, corresponds to the order m used by mathieu_cem. It is rather that way, that for a given parameter 'q' we can calculate the characteristic value 'a' such ... | [
{
"body": "Hi, I came across the Mathieu functions and could not get the values from scipy.special.mathieu_cem in accordance with the solutions of the corresponding differential equation.\n\nfor q == 0 one should get simply cos(sqrt(a) \\* t), but what scipy.special.mathieu_cem returns is more like cos(a \\* t)... | 7be13dcc1b250e7c4f62e4c5d848862c7126c056 | {
"head_commit": "c285e4466295866bbadbd87dddc97b8f7ee728e8",
"head_commit_message": "DOC: special.mathieu_c/sem: add information to docstring",
"patch_to_review": "diff --git a/scipy/special/_special_ufuncs_docs.cpp b/scipy/special/_special_ufuncs_docs.cpp\nindex fedf9fa87a81..91ccc742650d 100644\n--- a/scipy/spe... | [
{
"diff_hunk": "@@ -4927,6 +4963,42 @@ const char *mathieu_sem_doc = R\"(\n --------\n mathieu_a, mathieu_b, mathieu_cem\n \n+ Notes\n+ -----\n+ Odd Mathieu functions are the solutions to Mathieu's differential equation\n+\n+ .. math::\n+\n+ \\frac{d^2y}{dx^2} + (a_m - 2q \\cos(2x))y ... | 0b54e40d0afecb0d39948d17a6d255310761d09d | diff --git a/scipy/special/_special_ufuncs_docs.cpp b/scipy/special/_special_ufuncs_docs.cpp
index fedf9fa87a81..8ea265ebea62 100644
--- a/scipy/special/_special_ufuncs_docs.cpp
+++ b/scipy/special/_special_ufuncs_docs.cpp
@@ -4762,6 +4762,42 @@ const char *mathieu_cem_doc = R"(
--------
mathieu_a, mathieu_b,... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Documentation Updates"
} |
run-llama__llama_index-11355@fbbd31a | run-llama/llama_index | Python | 11,355 | [FIX] faulty imports when using PydanticProgramMode.LM_FORMAT_ENFORCER | # Description
- `PydanticProgramMode.LM_FORMAT_ENFORCER` needs integration `llama-index-program-lmformatenforcer` but when trying to lazy import it from core, it tries to load from ... core :)
- Also fixed an incorrect import for llama_utils
Fixes #11351
## Type of Change
Please delete options that are no... | 2024-02-24T15:45:58Z | [Bug]: ModuleNotFoundError: No module named 'llama_index.core.program.lmformatenforcer_program'
### Bug Description
Weird i faced this error, unable to find a way to resolve. Please help thank you
```
llama-index==0.10.12
llama-index-llms-huggingface==0.1.3
llama-index-program-lmformatenforcer==0.1.2
```
### ... | _🤖_
<!-- Greeting -->
Hey there @GxTeo! Good to see you back. Running into another quirky corner of the code, I see? Let's dive in and untangle this one together.
<!-- Answer -->
Based on the error message you're encountering, it seems like the module 'llama_index.core.program.lmformatenforcer_program' cannot be foun... | [
{
"body": "### Bug Description\n\nWeird i faced this error, unable to find a way to resolve. Please help thank you\r\n\r\n```\r\nllama-index==0.10.12\r\nllama-index-llms-huggingface==0.1.3\r\nllama-index-program-lmformatenforcer==0.1.2\r\n```\n\n### Version\n\n0.10.12\n\n### Steps to Reproduce\n\n```\r\nllm = ... | ab61b32d8a8c6969f907818859170395ec80bf5e | {
"head_commit": "fbbd31a3dbb7b221c7b150c4033eeaa837ef687e",
"head_commit_message": "fix faulty imports",
"patch_to_review": "diff --git a/llama-index-core/llama_index/core/llms/utils.py b/llama-index-core/llama_index/core/llms/utils.py\nindex ecb388cd18..1c87dd38ca 100644\n--- a/llama-index-core/llama_index/core... | [
{
"diff_hunk": "@@ -90,9 +90,15 @@ def get_program_for_llm(\n **kwargs,\n )\n elif pydantic_program_mode == PydanticProgramMode.LM_FORMAT_ENFORCER:\n- from llama_index.core.program.lmformatenforcer_program import (\n- LMFormatEnforcerPydanticProgram,\n- )\n+ ... | c6d7f6c9768fabc22b65143a938988fe28dbb09b | diff --git a/llama-index-core/llama_index/core/llms/utils.py b/llama-index-core/llama_index/core/llms/utils.py
index ecb388cd18..1c87dd38ca 100644
--- a/llama-index-core/llama_index/core/llms/utils.py
+++ b/llama-index-core/llama_index/core/llms/utils.py
@@ -64,7 +64,7 @@ def resolve_llm(
"llm must sta... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-11272@9c6529d | run-llama/llama_index | Python | 11,272 | [FIX] download_llama_pack for python packages containing multiple packs | # Description
- Previous download_llama_pack logic didn't traverse the Github tree deep enough, which posed a problem for packages with multiple packs (i.e., since there are more folders containing source code that needed to be discovered)
- This PR addresses that: uses the same Github trees API as before but trave... | 2024-02-22T05:54:25Z | Not able to use LLama Packs [Bug]:
### Bug Description
I always get this error for any pack i download
FileNotFoundError: [Errno 2] No such file or directory: '/content/chain_of_table_pack/llama_index/packs/tables/base.py'
### Version
0.10.5
### Steps to Reproduce
download_llama_pack(
"ChainOfTablePack",
... | _🤖_
<!-- Greeting -->
Hey @jaideep11061982, back again diving into the deep end with Llama Packs, I see! Let's tackle this head-on.
<!-- Answer -->
Based on the error logs you've provided, it seems like the issue is related to the file path of the pack you're trying to download. The error `FileNotFoundError: [Errno 2... | [
{
"body": "### Bug Description\n\nI always get this error for any pack i download\r\nFileNotFoundError: [Errno 2] No such file or directory: '/content/chain_of_table_pack/llama_index/packs/tables/base.py'\n\n### Version\n\n0.10.5\n\n### Steps to Reproduce\n\n\r\ndownload_llama_pack(\r\n \"ChainOfTablePack\",... | 39779bfbfa7ab6e314307d2c67fcfcf859ce5873 | {
"head_commit": "9c6529d09a57c230509f8ea39410a33ba6252e79",
"head_commit_message": "remove branch and repo constants",
"patch_to_review": "diff --git a/llama-index-core/llama_index/core/download/pack.py b/llama-index-core/llama_index/core/download/pack.py\nindex bcf7430470..f32d43ab05 100644\n--- a/llama-index-c... | [
{
"diff_hunk": "@@ -13,17 +13,15 @@\n from llama_index.core.download.utils import (\n ChangeDirectory,\n get_file_content,\n- get_source_files_list,\n initialize_directory,\n+ get_source_files_recursive,\n )\n \n-BRANCH = \"nerdai/migration-v0_10_0\"\n-REPO = \"nerdai\"\n LLAMA_PACKS_CONTENTS_... | f29c6ef607bb78e9533e38b64ef660e603cd9e54 | diff --git a/llama-index-core/llama_index/core/download/pack.py b/llama-index-core/llama_index/core/download/pack.py
index bcf7430470..cdd99de658 100644
--- a/llama-index-core/llama_index/core/download/pack.py
+++ b/llama-index-core/llama_index/core/download/pack.py
@@ -13,17 +13,15 @@
from llama_index.core.download.u... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21597@7b0f8fa | scipy/scipy | Python | 21,597 | ENH: `special.logsumexp`: improve precision when one element is much bigger than the rest | #### Reference issue
Closes gh-18295
Supersedes gh-18424
~~May be used to address gh-19521/gh-19549 and make `log_softmax` array API compatible.~~ (The idea of using `log1p` is essentially the same, but I think `softmax` needs its own implementation.)
#### What does this implement/fix?
gh-18295 reported that `lo... | 2024-09-20T18:55:25Z | BUG: special: Loss of precision in `logsumexp`
### Describe your issue.
`logsumexp` loses precision in cases where it shouldn't, and in extreme cases it can return 0 when it should return a nonzero float.
### Reproducing Code Example
```python
In [2]: from scipy.special import logsumexp
In [3]: logsumexp([... | The following script contains a couple alternative implementations for `logsumexp(a)` that avoid the loss of precision. These are for a 1-d input with no weight parameter; actually implementing `scipy.special.logsumexp` with one of these will require some more work.
```
import numpy as np
from mpmath import mp
... | [
{
"body": "### Describe your issue.\r\n\r\n`logsumexp` loses precision in cases where it shouldn't, and in extreme cases it can return 0 when it should return a nonzero float.\r\n\r\n### Reproducing Code Example\r\n\r\n```python\r\nIn [2]: from scipy.special import logsumexp\r\n\r\nIn [3]: logsumexp([0, -40.0])... | f20fb1de05de7d9d033001963f47d4d7885b2145 | {
"head_commit": "7b0f8fa11b5220888f84a59e0849b3a7ba2c1f2e",
"head_commit_message": "TST: integrate._tanhsinh: update test tolerance",
"patch_to_review": "diff --git a/scipy/integrate/tests/test_tanhsinh.py b/scipy/integrate/tests/test_tanhsinh.py\nindex ee990bd0e787..bfeff6d21ddd 100644\n--- a/scipy/integrate/te... | [
{
"diff_hunk": "@@ -100,53 +101,113 @@ def logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):\n \"\"\"\n xp = array_namespace(a, b)\n a, b = xp_broadcast_promote(a, b, ensure_writeable=True, force_floating=True, xp=xp)\n- axis = tuple(range(a.ndim)) if axis is None else axis\n+ ... | ea72694b6bd5950b54f927692964bfae1dc1219e | diff --git a/scipy/integrate/tests/test_tanhsinh.py b/scipy/integrate/tests/test_tanhsinh.py
index ee990bd0e787..bfeff6d21ddd 100644
--- a/scipy/integrate/tests/test_tanhsinh.py
+++ b/scipy/integrate/tests/test_tanhsinh.py
@@ -844,7 +844,7 @@ def test_basic(self, f_number):
logres = nsum(lambda *args: np.l... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21577@6b92263 | scipy/scipy | Python | 21,577 | MAINT: special.hankel2: fix edge case | #### Reference issue
Closes gh-4517
#### What does this implement/fix?
gh-4517 reported that the output of `hankel2` was inaccurate at 0, 0. This PR fixes that issue (assuming the definition in terms of $J_n$ and $Y_n$ is appropriate here) and only that issue.
#### Additional information
There are undoubtedly ... | 2024-09-18T05:08:45Z | MAINT: special.hankel2: `(0, 0)` delivers (nan+nan*j) instead of (1+nan*j)
When evaulating the zeroth-order Hankel function of second kind at zero
```
In[121]: scipy.special.hankel2(0,0)
Out[121]: (nan+nan*j)
```
the real value is nan instead of 1. Bessel and Neumann function deliver the correct results
```
In[126]:... | The second result is correct if you follow C99 complex arithmetic (which is what Python and C complex numbers follow): `nan+infj` is one representation for the complex infinity.
The first result is apparently given not correctly by the AMOS codes, which do not calculate non-finite results. Overflow needs to be hardcod... | [
{
"body": "When evaulating the zeroth-order Hankel function of second kind at zero\n\n```\nIn[121]: scipy.special.hankel2(0,0)\nOut[121]: (nan+nan*j)\n```\n\nthe real value is nan instead of 1. Bessel and Neumann function deliver the correct results\n\n```\nIn[126]: scipy.special.jv(0,0)\nOut[126]: 1.0\n\nIn[12... | 7be13dcc1b250e7c4f62e4c5d848862c7126c056 | {
"head_commit": "6b92263809d9feb670bc703d35cbabdd7681aee0",
"head_commit_message": "Apply suggestions from code review\n\nCo-authored-by: Albert Steppi <albert.steppi@gmail.com>",
"patch_to_review": "diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py\nindex efb34b2c5238..32bf2fab2... | [
{
"diff_hunk": "@@ -2642,6 +2642,12 @@ def test_hankl2e(self):\n hankrl2e = special.hankel2e(1,.1)\n assert_almost_equal(hank2e,hankrl2e,8)\n \n+ def test_hankel2_gh4517(self):\n+ # Test edge case reported in https://github.com/scipy/scipy/issues/4517\n+ res = special.hankel2(0,... | a91e6cf4abbe528562d1109793081f3f0a0e34f1 | diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py
index efb34b2c5238..9bae45a7189b 100644
--- a/scipy/special/tests/test_basic.py
+++ b/scipy/special/tests/test_basic.py
@@ -2642,6 +2642,12 @@ def test_hankl2e(self):
hankrl2e = special.hankel2e(1,.1)
assert_almost_equa... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-10298@9735d3a | run-llama/llama_index | Python | 10,298 | Added support for multiple docs in SentenceTransformersFinetuneEngine. Resolves Issue #10297 | # Description
In the SentenceTransformersFinetuneEngine, only the first document corresponding to a query was included in the examples. In the changes made, all the documents will considered. The intution is that if all the (query, relevant_doc) pairs are considered as positive samples, it might result in better embed... | 2024-01-26T19:51:58Z | [Feature Request]: Support for more than one relevant document in SentenceTransformersFinetuneEngine
### Feature Description
In ```llama_index/finetuning/embeddings/sentence_transformer.py```, it can be seen that for every query, only one relevant document is added to the list ```examples```.
```python
# TODO: suppo... | [
{
"body": "### Feature Description\n\nIn ```llama_index/finetuning/embeddings/sentence_transformer.py```, it can be seen that for every query, only one relevant document is added to the list ```examples```.\r\n```python\r\n# TODO: support more than 1 doc per query\r\nexamples: Any = []\r\nfor query_id, query in... | 5bf9cafb17b84d4ad6de1317c049735eb8e38e63 | {
"head_commit": "9735d3a210b54bafbb7fdfbba4ed25a8c6bf1f9f",
"head_commit_message": "Added support for multiple docs in SentenceTransformersFinetuneEngine",
"patch_to_review": "diff --git a/llama_index/finetuning/embeddings/sentence_transformer.py b/llama_index/finetuning/embeddings/sentence_transformer.py\nindex... | [
{
"diff_hunk": "@@ -35,13 +35,14 @@ def __init__(\n self.model_output_path = model_output_path\n self.model = SentenceTransformer(model_id)\n \n- # TODO: support more than 1 doc per query\n+\n examples: Any = []\n for query_id, query in dataset.queries.items():\n- ... | 945e40ca762b19d68b526ed3cfd66d7e2e167ac5 | diff --git a/llama_index/finetuning/embeddings/sentence_transformer.py b/llama_index/finetuning/embeddings/sentence_transformer.py
index ead2eb3c02..b462f046e5 100644
--- a/llama_index/finetuning/embeddings/sentence_transformer.py
+++ b/llama_index/finetuning/embeddings/sentence_transformer.py
@@ -35,13 +35,12 @@ def _... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
run-llama__llama_index-10014@ed94d87 | run-llama/llama_index | Python | 10,014 | Implement mongodb kvstore put all method | # Description
When I assign batch_size greater than 1 for MongoDBstore, it fails because put_all in MongoDBKVStore is not implemented.
Fixes https://github.com/run-llama/llama_index/issues/9998
## Type of Change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes ... | 2024-01-12T18:32:36Z | [Feature Request]: Implement put_all for MongoDBKVStore
### Feature Description
Hi folks, I was wondering if i'm just using this incorrectly, but when I assign batch_size greater than 1 for MongoDBstore, it fails because put_all in MongoDBKVStore is not implemented. At the moment, i've had to create a separate MongoDB... | _🤖_
<!-- Greeting -->
Hello @kimchinosys!
I'm [Dosu](https://dosu.dev), a bot here to help you navigate through LlamaIndex issues and contributions. While we're waiting for a human maintainer, I'll do my best to assist you.
I've seen your feature request and I'm currently taking a look at it. Hang tight, I'll get ... | [
{
"body": "### Feature Description\n\nHi folks, I was wondering if i'm just using this incorrectly, but when I assign batch_size greater than 1 for MongoDBstore, it fails because put_all in MongoDBKVStore is not implemented. At the moment, i've had to create a separate MongoDBStore/KVStore with put_all implemen... | 5cc75071b099b3914643ac8f4c12e5e74af63fc4 | {
"head_commit": "ed94d870489a328a581dd20bc62230c1bc662afb",
"head_commit_message": "Implement mongodb kvstore put all method",
"patch_to_review": "diff --git a/llama_index/storage/kvstore/mongodb_kvstore.py b/llama_index/storage/kvstore/mongodb_kvstore.py\nindex 045e30cdb8..b60a1efd5f 100644\n--- a/llama_index/s... | [
{
"diff_hunk": "@@ -130,6 +130,13 @@ async def aput(\n \n \"\"\"\n raise NotImplementedError\n+ \n+ def put_all(self, kv_pairs: List[Tuple[str, dict]], collection: str = DEFAULT_COLLECTION, batch_size: int = DEFAULT_BATCH_SIZE) -> None:",
"line": null,
"original_line": 134,
"or... | 4989363d3d67ff2c6a733e67c06f5a07d8d44c19 | diff --git a/llama_index/storage/kvstore/mongodb_kvstore.py b/llama_index/storage/kvstore/mongodb_kvstore.py
index 045e30cdb8..8c5ac2ac5b 100644
--- a/llama_index/storage/kvstore/mongodb_kvstore.py
+++ b/llama_index/storage/kvstore/mongodb_kvstore.py
@@ -1,6 +1,10 @@
-from typing import Any, Dict, Optional, cast
+from ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
run-llama__llama_index-12943@1b27c64 | run-llama/llama_index | Python | 12,943 | Implement async methods in RedisKVStore | # Description
Async methods were not implemented in RedisKVStore. This is necessary if RedisKVStore is used as an ingestion cache or docstore in an async ingestion pipeline.
Fixes [#10248](https://github.com/run-llama/llama_index/issues/10248)
Implement async methods.
## New Package?
Did I fill in the `t... | 2024-04-18T18:51:16Z | [Bug]: IngestionPipeline 0.9.36 pipline.arun to Redis Not implemented Error
### Bug Description
using IngestionPipeline with docstore=RedisDocumentStore, then running pipline.arun to Redis Not implemented Error get Not implemented Error using llama-index 0.9.36. Downgrade to 0.9.30 allows me to run pipline.arun. ... | _🤖_
<!-- Greeting -->
Hello @JoeSF49!
I'm [Dosu](https://dosu.dev), an AI here to assist you with your inquiries and issues relating to the LlamaIndex repository. I'm here to help you navigate through bugs, answer your questions, and guide you in contributing to the project while we're waiting for a human maintainer... | [
{
"body": "### Bug Description\n\nusing IngestionPipeline with docstore=RedisDocumentStore, then running pipline.arun to Redis Not implemented Error get Not implemented Error using llama-index 0.9.36. Downgrade to 0.9.30 allows me to run pipline.arun. just using simpleDirectoryRead load_data documents and ... | 9b85aa65f0ed8a93d71b4c5742300f3e2161eac5 | {
"head_commit": "1b27c6476d3604c520e705081e7dbb905884eb99",
"head_commit_message": "implement async methods in RedisKVStore",
"patch_to_review": "diff --git a/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/llama_index/storage/kvstore/redis/base.py b/llama-index-integrations/storage/kv... | [
{
"diff_hunk": "@@ -61,23 +63,25 @@ def put(self, key: str, val: dict, collection: str = DEFAULT_COLLECTION) -> None\n async def aput(\n self, key: str, val: dict, collection: str = DEFAULT_COLLECTION\n ) -> None:\n- \"\"\"Put a key-value pair into the store.\n+ \"\"\"\n+ Pu... | cecd5f852254618ed29bc1d305b4c02c34866a2e | diff --git a/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/llama_index/storage/kvstore/redis/base.py b/llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-redis/llama_index/storage/kvstore/redis/base.py
index ff69c773ca..2b978f369f 100644
--- a/llama-index-integrations/stor... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21505@9a4458b | scipy/scipy | Python | 21,505 | BUG: special: Use Boost for ncfdtr, fixing accuracy issues | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
https://scipy... | 2024-09-04T03:16:46Z | BUG: `special.ncfdtr(dfn, dfd, nc, f)` and `stats.ncf.cdf(x, dfn, dfd, nc)` results are different from R and Matlab results.
### Describe your issue.
Calculated results are not equal to that of R and Matlab
`stats.ncf.cdf(20, 6,33,30.4) = '
0.998868`
but in R
`pf(20, df1 = 6, df2 = 33, ncp = 30.4) =
0.998... | SciPy 1.8.0 outputs same value.
```
In [7]: import sys, scipy, numpy;print(scipy.__version__, numpy.__version__, sys.version_info)
1.8.0 1.22.2 sys.version_info(major=3, minor=9, micro=2, releaselevel='final', serial=0)
In [8]: scipy.special.ncfdtr(6, 33, 30.4, 20)
Out[8]: 0.9988687760741152
In [9]: scipy.sta... | [
{
"body": "### Describe your issue.\n\n\r\nCalculated results are not equal to that of R and Matlab\r\n\r\n`stats.ncf.cdf(20, 6,33,30.4) = '\r\n0.998868`\r\n\r\nbut in R\r\n`pf(20, df1 = 6, df2 = 33, ncp = 30.4) = \r\n0.998921`\r\n\r\nIn Matlab\r\n`ncfcdf(20, 6, 33, 30.4) =\r\n0.998921`\r\n\n\n### Reproducing ... | 9d424bbec352e4ff2b8a4b68ef17e85db3a93db8 | {
"head_commit": "9a4458b8af5a05d1fafb34e9adee13141ab53209",
"head_commit_message": "Fix references to stats dist methods in docstrings [docs only]",
"patch_to_review": "diff --git a/scipy/special/_add_newdocs.py b/scipy/special/_add_newdocs.py\nindex 409eb64b4885..2dc3d9d63cba 100644\n--- a/scipy/special/_add_ne... | [
{
"diff_hunk": "@@ -760,46 +760,86 @@ ncf_pdf_double(double x, double v1, double v2, double l)\n \n template<typename Real>\n Real\n-ncf_cdf_wrap(const Real x, const Real v1, const Real v2, const Real l)\n+ncf_cdf_wrap(const Real v1, const Real v2, const Real l, const Real x)\n {\n- if (std::isfinite(x)) {\n... | 1f268b95ce0bf0620f16c24fabbf3437f8d1280d | diff --git a/scipy/special/_add_newdocs.py b/scipy/special/_add_newdocs.py
index 409eb64b4885..2f82af836f50 100644
--- a/scipy/special/_add_newdocs.py
+++ b/scipy/special/_add_newdocs.py
@@ -6821,7 +6821,7 @@ def add_newdoc(name, doc):
dfd : array_like
Degrees of freedom of the denominator sum of squares.... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-12062@ad1bd18 | run-llama/llama_index | Python | 12,062 | Openai agent json malformed 11921 | # Description
The OpenAIAgent no longer crashes when the function argument is not valid json. Furthermore, a tool_call_parser can be passed when creating the OpenAIAgent that allows the user to handle/ recover from malformed tool calls. For an example, see docs/examples/agent/openai_agent_tool_call_parser.ipynb
F... | 2024-03-19T01:47:27Z | [Bug]: Agent errors when json function argument is malformed
### Bug Description
We use the OpenAIAgent together with some custom tools.
We noticed, that even gpt4-turbo has some issues with creating a valid json in the function calls when the prompt gets big.
For example, the tool has an input named "query" which... | <!-- Answer -->
Thank you for providing a detailed description of the issue you're facing. It seems like the problem arises when the `OpenAIAgent` tries to parse a large or complex JSON string into a Python dictionary using `json.loads(arguments_str)`. If the JSON string is malformed, this can lead to a `JSONDecodeErro... | [
{
"body": "### Bug Description\r\n\r\nWe use the OpenAIAgent together with some custom tools.\r\nWe noticed, that even gpt4-turbo has some issues with creating a valid json in the function calls when the prompt gets big.\r\nFor example, the tool has an input named \"query\" which should be a string (in our conc... | be63bae53227f1360472477eb2afa993791c09ce | {
"head_commit": "ad1bd182c649d1102a8554f3c73d3195a5addfd8",
"head_commit_message": "adding advanced_tool_call_parser with tests",
"patch_to_review": "diff --git a/docs/examples/agent/openai_agent_tool_call_parser.ipynb b/docs/examples/agent/openai_agent_tool_call_parser.ipynb\nnew file mode 100644\nindex 0000000... | [
{
"diff_hunk": "",
"line": null,
"original_line": null,
"original_start_line": null,
"path": "docs/examples/agent/openai_agent_tool_call_parser.ipynb",
"start_line": null,
"text": "@user1:\nDo you mind rerunning this? I think there are some debug prints (i.e. the `NOT GIVEN` stuff, and o... | 42d55de88cac22b45a5e45d6b763e58cf81426fd | diff --git a/docs/docs/examples/agent/openai_agent_tool_call_parser.ipynb b/docs/docs/examples/agent/openai_agent_tool_call_parser.ipynb
new file mode 100644
index 0000000000..2ed6331d29
--- /dev/null
+++ b/docs/docs/examples/agent/openai_agent_tool_call_parser.ipynb
@@ -0,0 +1,314 @@
+{
+ "cells": [
+ {
+ "attachme... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21407@df2e4c6 | scipy/scipy | Python | 21,407 | BUG: optimize.minimize: set `trust-constr` `success=False` when constraints are not satisfied | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-08-18T02:14:05Z | BUG: minimize does not satisfy nonlinear constraint even if keep_feasible=True
### Describe your issue.
I am creating a general app that can calculate the probability of failure of engineering systems based on a limit state function. In its most simple form this requires the solution of a minimization problem with ... | Should clarify that the problem has two solutions at [0,4] and [0,-4] since equality constraint is a hyperbola.
Hi Cesar!
This is a great question. There are two things to note here.
First, keep_feasible is ignored when an equality constraint is used. This is described in the [documentation for Nonlinear Constrai... | [
{
"body": "### Describe your issue.\r\n\r\nI am creating a general app that can calculate the probability of failure of engineering systems based on a limit state function. In its most simple form this requires the solution of a minimization problem with an equality constraint. The app works on almost all tes... | bd239392a3dfe2463db903fb69f4de67ef16ae89 | {
"head_commit": "df2e4c6a63c857924a3c7db6851a272c42b1d764",
"head_commit_message": "BUG/TST: optimize.minimize: fix trust-constr success=True when constraints are not satisfied\n \nReference issue\nFixes #18882.\n \nWhat does this implement/fix?\nPreviously trust-constr returned success=True (i.e. status equal to ... | [
{
"diff_hunk": "@@ -18,7 +18,8 @@\n 0: \"The maximum number of function evaluations is exceeded.\",\n 1: \"`gtol` termination condition is satisfied.\",\n 2: \"`xtol` termination condition is satisfied.\",\n- 3: \"`callback` function requested termination.\"\n+ 3: \"`callback` function request... | adf0036af44bdac295fc9c2c77b9efb6f0b33e95 | diff --git a/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py b/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py
index 0e1dd3746595..dc638389b7a3 100644
--- a/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py
+++ b/scipy/optimize/_trustregion_constr/minimize_trustregion... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21371@ab1e149 | scipy/scipy | Python | 21,371 | BUG: stats.tukeylambda: Fix the support() method. | Closes gh-21369.
| 2024-08-12T20:55:45Z | BUG: stats.tukeylambda: `support(lam)` is incorrect when `lam > 0`
### Describe your issue.
When λ > 0, the support of the Tukey lambda distribution is (-1/λ, 1/λ). Currently, `tukeylambda.support(lam)` returns (-inf, inf) even when `lam` > 0.
### Reproducing Code Example
```python
In [1]: from scipy.stats i... | I'll submit a PR to fix this soon. | [
{
"body": "### Describe your issue.\r\n\r\nWhen λ > 0, the support of the Tukey lambda distribution is (-1/λ, 1/λ). Currently, `tukeylambda.support(lam)` returns (-inf, inf) even when `lam` > 0.\r\n\r\n### Reproducing Code Example\r\n\r\n```python\r\nIn [1]: from scipy.stats import tukeylambda\r\n\r\nIn [2]: t... | 8971d5e9b72931987b7d3c5a25da1a8e7e5485d0 | {
"head_commit": "ab1e14907919ecbb8ffa2f3745f8a5ddf1409e87",
"head_commit_message": "BUG: stats.tukeylambda: Fix the support() method.\n\nCloses gh-21369.",
"patch_to_review": "diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py\nindex f8a478bab47b..84fd0aa1191c 100644\n--- a/scipy/... | [
{
"diff_hunk": "@@ -10481,12 +10481,20 @@ class tukeylambda_gen(rv_continuous):\n %(example)s\n \n \"\"\"\n+ _support_mask = rv_continuous._open_support_mask\n+\n def _argcheck(self, lam):\n return np.isfinite(lam)\n \n def _shape_info(self):\n return [_ShapeInfo(\"lam\", Fals... | 5840edcd9901d98271eeb04f92c8c158c5225fcd | diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py
index f8a478bab47b..35a7bbc9cc74 100644
--- a/scipy/stats/_continuous_distns.py
+++ b/scipy/stats/_continuous_distns.py
@@ -10481,17 +10481,26 @@ class tukeylambda_gen(rv_continuous):
%(example)s
"""
+ _support_mask = rv_c... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21495@b63a42b | scipy/scipy | Python | 21,495 | BUG: special: Fix hyperu for b = 1, small x, small a | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
https://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
https://scipy... | 2024-09-02T08:18:10Z | BUG: scipy.special.hyperu(a,b,x) gives wrong values for a close to 0 and b=1, x close to zero
### Describe your issue.
Hello,
I noticed that the special function hyperu(a,b,x) gives output values that are extremely off for some x close to 0, when a is close to 0 and b=1.
In the code example below, I compared the v... | upgraded versions:
1.7.3 1.21.5 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
don't appear to give correct results either
Hi @matthias-baur, thanks for the bug report. I haven't looked into the details yet, but we're aware that there are some problems with the hypergeometric function ... | [
{
"body": "### Describe your issue.\n\nHello,\r\n\r\nI noticed that the special function hyperu(a,b,x) gives output values that are extremely off for some x close to 0, when a is close to 0 and b=1.\r\nIn the code example below, I compared the values with mpmath's hyperu. For a certain interval of input values ... | fd2a23c46ccd0d66b78feeb5432519af2570b17a | {
"head_commit": "b63a42b1b6ddbc0b6486eee1780ea8c6ba4d4f89",
"head_commit_message": "Add test cases for gh-15650",
"patch_to_review": "diff --git a/scipy/special/_hypergeometric.pxd b/scipy/special/_hypergeometric.pxd\nindex d3b4b6ea7ca5..4eeafd4c7a68 100644\n--- a/scipy/special/_hypergeometric.pxd\n+++ b/scipy/s... | [
{
"diff_hunk": "@@ -26,5 +26,9 @@ cdef inline double hyperu(double a, double b, double x) noexcept nogil:\n else:\n # DLMF 13.2.14-15 and 13.2.19-21\n return cephes_poch_wrap(1.0 - b + a, -a)\n+ if b == 1 and abs(a) < 1 and abs(x) < 1:\n+ # DLMF 13.3.7. Fixes gh-15650\n... | 88bf2e44a1eebf2cf5bf73b473b11f2dfecf38d1 | diff --git a/scipy/special/_hypergeometric.pxd b/scipy/special/_hypergeometric.pxd
index d3b4b6ea7ca5..3fea0afac2d4 100644
--- a/scipy/special/_hypergeometric.pxd
+++ b/scipy/special/_hypergeometric.pxd
@@ -26,5 +26,7 @@ cdef inline double hyperu(double a, double b, double x) noexcept nogil:
else:
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21423@d4c5f4f | scipy/scipy | Python | 21,423 | MAINT: `linalg.logm`: avoid `ZeroDivisionError`, emit warning properly, avoid redundant squareness check | #### Reference issue
Closes gh-17136
#### What does this implement/fix?
gh-17136 noted a few issues in `linalg.logm`:
- If the norm of `A` is exactly zero and `lange` is used to evaluate it, the error estimate check raises a `ZeroDivisionError` because `lange` returns a Python `float` instead of a NumPy `float`... | 2024-08-21T02:19:56Z | BUG: logm sometimes raises ZeroDivisionError for matrices with zero norm
### Describe your issue.
Running `scipy.linalg.logm` on a matrix with zero norm leads to inconsistent behaviour. For example, running
```python
logm(np.zeros((2, 2), dtype=int))
```
leads to the following result:
```
array([[-46.05170186, ... | I did some playing around with the code, and apparently python gives a runtime warning when dtype = int and a ZeroDivisionError if dtype = float, even though the values for norm(expm(F)-A,1) and norm(A,1) are the exact same. Very weird.
The problem is due to different behavior of `np.linalg.norm` and `scipy.linalg.norm... | [
{
"body": "### Describe your issue.\n\nRunning `scipy.linalg.logm` on a matrix with zero norm leads to inconsistent behaviour. For example, running\r\n```python\r\nlogm(np.zeros((2, 2), dtype=int))\r\n```\r\nleads to the following result:\r\n```\r\narray([[-46.05170186, 0. ],\r\n [ 0. , -... | 8f36e3ae090e275dac8dd08b3246a8706cbaa548 | {
"head_commit": "d4c5f4fe3ea8d0f10e5fb051af844868f0e6770a",
"head_commit_message": "MAINT: linalg.logm: avoid ZeroDivisionError, emit warning properly, avoid redundant squareness check",
"patch_to_review": "diff --git a/scipy/linalg/_matfuncs.py b/scipy/linalg/_matfuncs.py\nindex 122581ec4053..29d24acce08b 10064... | [
{
"diff_hunk": "@@ -194,17 +195,19 @@ def logm(A, disp=True):\n [ 1., 4.]])\n \n \"\"\"\n- A = _asarray_square(A)\n+ A = np.asarray(A) # squareness checked in `_logm`\n # Avoid circular import ... this is OK, right?\n import scipy.linalg._matfuncs_inv_ssq\n F = scipy.linalg._m... | 9bb3f6b10fd1e46740ee47ae033a0a2b59c9d2f0 | diff --git a/scipy/linalg/_matfuncs.py b/scipy/linalg/_matfuncs.py
index 825a19440a9e..b04c8bcde123 100644
--- a/scipy/linalg/_matfuncs.py
+++ b/scipy/linalg/_matfuncs.py
@@ -1,6 +1,7 @@
#
# Author: Travis Oliphant, March 2002
#
+import warnings
from itertools import product
import numpy as np
@@ -152,7 +153,7 @... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21332@a4a9292 | scipy/scipy | Python | 21,332 | BUG: `stats.levy_stable`: fix ignored parameterization | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-08-07T10:17:47Z | BUG: `stats.levy_stable.rvs`: "S0"-parameterization ignored
### Describe your issue.
When trying to sample from stats.levy_stable.rvs() with levy_stable.parametrization="S0", the returned samples are not transformed, but in the "S1"-parameterization. Line 850 of stats._levy_stable.__init__ does not get executed.
Th... | I think I solve the pronlem. In the Scipy doc, it suggests to use `levy_stable.parameterization` to set the parameterization because it is class attribute instead of instance attribute. So the code should be like this:
```
import numpy as np
from scipy.stats import levy_stable
stable_distribution = levy_stable(a... | [
{
"body": "### Describe your issue.\r\n\r\nWhen trying to sample from stats.levy_stable.rvs() with levy_stable.parametrization=\"S0\", the returned samples are not transformed, but in the \"S1\"-parameterization. Line 850 of stats._levy_stable.__init__ does not get executed.\r\nThis is likely due to automatical... | 9e9d534b7afac90e8d2fa23be1d0ab1201c1bde1 | {
"head_commit": "a4a92921c8e666160835f32f651767726f4885a0",
"head_commit_message": "MAINT: stats.levy_stable: adjust approach",
"patch_to_review": "diff --git a/scipy/stats/_levy_stable/__init__.py b/scipy/stats/_levy_stable/__init__.py\nindex 13d143e3dd56..9803dbf609e5 100644\n--- a/scipy/stats/_levy_stable/__i... | [
{
"diff_hunk": "@@ -816,6 +816,11 @@ class levy_stable_gen(rv_continuous):\n pdf_fft_interpolation_level = 3\n pdf_fft_interpolation_degree = 3\n \n+ def freeze(self, *args, **params):",
"line": null,
"original_line": 819,
"original_start_line": null,
"path": "scipy/stats/_levy_stable... | f8e836e0af2b4c6325d3737954dcf7f581d8d79d | diff --git a/scipy/stats/_levy_stable/__init__.py b/scipy/stats/_levy_stable/__init__.py
index 13d143e3dd56..96ae567e4142 100644
--- a/scipy/stats/_levy_stable/__init__.py
+++ b/scipy/stats/_levy_stable/__init__.py
@@ -12,7 +12,7 @@
from scipy.interpolate import RectBivariateSpline
import scipy.special as sc
from sc... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-9842@008b586 | run-llama/llama_index | Python | 9,842 | Support for Nvidia TensorRT-LLM Inference | # Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #9841
## Type of Change
Please delete options that are not relevant.
- [ ] New feature (non-breaking change w... | 2024-01-04T15:25:14Z | [Feature Request]: Nvidia TensorRT LLM
### Feature Description
Nvidia TensorRT-LLM provides as user friendly Python interface as well as several optimizations to ensure that inference performances at peak performance on Nvidia GPUs. TensorRT-LLM performs interence locally, in-process, via SDK however you would like to... | _🤖_
<!-- Answer -->
That sounds like a great idea! Adding a LLM connector for Nvidia TensorRT-LLM to the LlamaIndex framework would definitely enhance its capabilities and provide more options for users. Your contribution would be valuable in expanding the functionality of LlamaIndex. Thank you for considering this en... | [
{
"body": "### Feature Description\n\nNvidia TensorRT-LLM provides as user friendly Python interface as well as several optimizations to ensure that inference performances at peak performance on Nvidia GPUs. TensorRT-LLM performs interence locally, in-process, via SDK however you would like to think of it inste... | 6f317515a66ed7749d64bed7498cf61ef6d84557 | {
"head_commit": "008b586d54c7685353053a99b80cf8cdcf42e474",
"head_commit_message": "Add sample notebook for TensorRT-LLM",
"patch_to_review": "diff --git a/docs/examples/llm/nvidia_tensorrt.ipynb b/docs/examples/llm/nvidia_tensorrt.ipynb\nnew file mode 100644\nindex 0000000000..5893f2058f\n--- /dev/null\n+++ b/d... | [
{
"diff_hunk": "@@ -0,0 +1,356 @@\n+import gc\n+import json\n+import os\n+import time\n+import uuid\n+from pathlib import Path\n+from typing import Any, Callable, Dict, Optional, Sequence\n+\n+import numpy as np\n+\n+from llama_index.bridge.pydantic import Field, PrivateAttr\n+from llama_index.callbacks import ... | b26a2b8799f456b08089e873e972e2114956ecc5 | diff --git a/docs/examples/llm/nvidia_tensorrt.ipynb b/docs/examples/llm/nvidia_tensorrt.ipynb
new file mode 100644
index 0000000000..e5a92d493a
--- /dev/null
+++ b/docs/examples/llm/nvidia_tensorrt.ipynb
@@ -0,0 +1,128 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<a hr... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-21336@fb4df3e | scipy/scipy | Python | 21,336 | ENH: linalg: Add `sy/hetrs` LAPACK wrappers | #### Reference issue
Closes #21239
| 2024-08-07T19:55:52Z | ENH: Add a Python level lapack wrapper for DSYTRS
### Is your feature request related to a problem? Please describe.
I've been prototyping a global RBF solver that can scale to hundreds of thousands or even millions of input points and as part of that I'm using DSYTRF to perform LDL^T factorisation of the augemente... | [
{
"body": "### Is your feature request related to a problem? Please describe.\r\n\r\nI've been prototyping a global RBF solver that can scale to hundreds of thousands or even millions of input points and as part of that I'm using DSYTRF to perform LDL^T factorisation of the augemented kernel matrix (as I need ... | 76bf366486b0583dca789823878b80d610eb571b | {
"head_commit": "fb4df3e5f12eafda117565932b30aa18a562d584",
"head_commit_message": "ENH: linalg: Add sy/hetrs LAPACK wrappers",
"patch_to_review": "diff --git a/scipy/linalg/flapack_sym_herm.pyf.src b/scipy/linalg/flapack_sym_herm.pyf.src\nindex 42a2ae217d8a..99d7cdbf82f8 100644\n--- a/scipy/linalg/flapack_sym_h... | [
{
"diff_hunk": "@@ -302,6 +302,46 @@ end subroutine <prefix2c>heevd_lwork\n end subroutine <prefix>sytrf_lwork\n \n \n+ subroutine <prefix>sytrs(n,nrhs,a,lda,ipiv,b,ldb,info,lower)\n+ \n+ ! Solve A * X = B for symmetric A matrix after calling ?sytrf\n+ \n+ callstatement (*f2py_func)((lower?\"L\":... | 2575d770d553f1c3d3b1255f9756fdd09f1d2a92 | diff --git a/scipy/linalg/flapack_sym_herm.pyf.src b/scipy/linalg/flapack_sym_herm.pyf.src
index 42a2ae217d8a..d0decd33c92e 100644
--- a/scipy/linalg/flapack_sym_herm.pyf.src
+++ b/scipy/linalg/flapack_sym_herm.pyf.src
@@ -302,6 +302,46 @@ end subroutine <prefix2c>heevd_lwork
end subroutine <prefix>sytrf_lwork
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
run-llama__llama_index-9624@aa7f6e1 | run-llama/llama_index | Python | 9,624 | Add support for Google Gemini models via VertexAI | # Description
Calling gemini models via VertexAI simplify moving an existing vertexAI application to gemini: all you need to do is to change the model to "gemini-pro" or "gemini-pro-vision".
Fixes #9607
Now it's possible to use VertexAI directly with Gemini models
```
llm = Vertex(temperature=0, model="gem... | 2023-12-19T22:10:49Z | [Feature Request]: Google Gemini model support via Vertex AI
### Feature Description
Currently Gemini is available also via Vertex AI API. I'd like to be able to switch from
```
from llama_index.llms import Vertex
Vertex(model="chat-bison")
```
to
```
from llama_index.llms import Vertex
Vertex(model="gemini-... | _🤖_
<!-- Greeting -->
Hello @nicoloboschi! 🖐️
I'm [Dosu](https://dosu.dev), an AI here to assist you with your issues and queries about LlamaIndex until a human maintainer can step in. I can help you troubleshoot bugs, answer questions, and guide you on how to contribute to the project. Don't worry, I'm here to make... | [
{
"body": "### Feature Description\n\nCurrently Gemini is available also via Vertex AI API. I'd like to be able to switch from \r\n```\r\nfrom llama_index.llms import Vertex\r\nVertex(model=\"chat-bison\")\r\n```\r\nto \r\n```\r\nfrom llama_index.llms import Vertex\r\nVertex(model=\"gemini-pro\")\r\n```\r\n\r\n... | d0cd534b1760551bc38044816b263015f3da14d5 | {
"head_commit": "aa7f6e17ab6bbf9f13313500e092a412ea09e406",
"head_commit_message": "fix import",
"patch_to_review": "diff --git a/llama_index/llms/vertex.py b/llama_index/llms/vertex.py\nindex b6f2764a33..7e527e0d6d 100644\n--- a/llama_index/llms/vertex.py\n+++ b/llama_index/llms/vertex.py\n@@ -28,6 +28,7 @@\n ... | [
{
"diff_hunk": "@@ -141,13 +164,51 @@ def _parse_chat_history(history: Any) -> Any:\n vertex_messages, context = [], None\n for i, message in enumerate(history):\n if i == 0 and message.role == MessageRole.SYSTEM:\n- context = message.content\n- elif message.role == MessageRole... | f9960dbe58e993a1d2aee3cc2ea0a97a9e1b159a | diff --git a/docs/examples/llm/vertex.ipynb b/docs/examples/llm/vertex.ipynb
index 297550d6dc..bc3f673c9b 100644
--- a/docs/examples/llm/vertex.ipynb
+++ b/docs/examples/llm/vertex.ipynb
@@ -38,7 +38,7 @@
"metadata": {},
"source": [
"## Basic Usage\n",
- "a Basic call to the text-bison model"
+ "Basi... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-21173@831efc5 | scipy/scipy | Python | 21,173 | BUG/CI: Compile and run tests with `ifx` + `MKL` on Linux | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-07-12T20:36:05Z | BUG: sparse.linalg: Segfault in `arpack` with `ifx`
### Describe your issue.
I am installing scipy from source on an HPC on top of python 3.11.6. The code builds without errors, but `scipy.test()` segfaults at `scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py`. We have intel MKL on the HPC, so I built scipy with... | Thanks for the report @AgilentGCMS. That ARPACK code has had recurring issues with some BLAS functions (`cdotc` & co.) that are sensitive to Fortran compiler ABI conventions. MKL is built with the opposite convention as the default one (gfortran).
Maybe this particular crash was always an issue with MKL from OneAPI,... | [
{
"body": "### Describe your issue.\n\nI am installing scipy from source on an HPC on top of python 3.11.6. The code builds without errors, but `scipy.test()` segfaults at `scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py`. We have intel MKL on the HPC, so I built scipy with \r\n```\r\nCC=icx CXX=icpx FC=... | d524084bccea0ebb84c0cc6e73d8cd6d6f07b2c7 | {
"head_commit": "831efc599eeea86dc112cf6078e0da44fd1c0539",
"head_commit_message": "DEV: Update PROPACK",
"patch_to_review": "diff --git a/.github/workflows/linux_intel_oneAPI.yml b/.github/workflows/linux_intel_oneAPI.yml\nnew file mode 100644\nindex 000000000000..0ca443ed7940\n--- /dev/null\n+++ b/.github/work... | [
{
"diff_hunk": "@@ -106,7 +106,7 @@ py3.extension_module('_slsqp',\n [f2py_gen.process('slsqp/slsqp.pyf'), 'slsqp/slsqp_optmz.f'],\n fortran_args: fortran_ignore_warnings,\n link_args: version_link_args,\n- dependencies: [fortranobject_dep],\n+ dependencies: [lapack_dep, blas_dep, fortranobject_dep],",
... | c0b35ca21a0f4819139f7d19d00f4437bd6b7a01 | diff --git a/.github/workflows/linux_intel_oneAPI.yml b/.github/workflows/linux_intel_oneAPI.yml
new file mode 100644
index 000000000000..0ca443ed7940
--- /dev/null
+++ b/.github/workflows/linux_intel_oneAPI.yml
@@ -0,0 +1,95 @@
+name: Intel Fortran tests
+
+on:
+ push:
+ branches:
+ - maintenance/**
+ pull_r... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-8838@081a42a | run-llama/llama_index | Python | 8,838 | remove commonly unpicklable entries | # Description
Tiktoken is famously un-picklable, but it's used all across LlamaIndex.
However, with a sneaky wave of a wand (and relying on `BaseComponent` inheritance), we can fix this by removing unpicklable entries.
This probably won't cover every edge case, but it gets most.
Tested with `pickle.dumps(in... | 2023-11-10T15:24:52Z | [Question]: How to Query RAG systems with Multiple prompt concurently
### Question Validation
- [X] I have searched both the documentation and discord for an answer.
### Question
I want to query the RAG system using multiple questions/queries concurrently.
I am using multiprocessing to do this but llama-index R... | _🤖_
<!-- Greeting -->
Hi @okoliechykwuka! Good to see you again. I'm diving into the issue you've reported about querying the RAG system with multiple prompts concurrently. I'll provide a thorough response shortly.
<!-- Will answer -->
_🤖_
<!-- Answer -->
Based on the information you've provided and the similar is... | [
{
"body": "### Question Validation\n\n- [X] I have searched both the documentation and discord for an answer.\n\n### Question\n\nI want to query the RAG system using multiple questions/queries concurrently.\r\n\r\nI am using multiprocessing to do this but llama-index RAG kept throwing an error `TypeError: cann... | 9672370a2a0c87dee77195f4a518db7b511fc2ed | {
"head_commit": "081a42a744ec1de178e538ba36594589f9e1c2cb",
"head_commit_message": "remove commonly unpicklable entries",
"patch_to_review": "diff --git a/llama_index/schema.py b/llama_index/schema.py\nindex 7df7059435..dc114a785d 100644\n--- a/llama_index/schema.py\n+++ b/llama_index/schema.py\n@@ -42,6 +42,14 ... | [
{
"diff_hunk": "@@ -42,6 +42,14 @@ def class_name(cls) -> str:\n name changes.\n \"\"\"\n \n+ def __getstate__(self) -> Dict[str, Any]:\n+ state = self.dict()\n+ # Remove common unpicklable entries\n+ state.pop(\"tokenizer\", None)\n+ state.pop(\"tokenizer_fn\", No... | ef8c0ebff8d72cf517d6cca02a631e5909b8c001 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac65157d48..e8292772ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
### Bug Fixes / Nits
- Fix retriever node postprocessors for `CitationQueryEngine` (#8818)
+- Fix `cannot pickle 'builtins.CoreBPE' object` in most scenarios (#8835)
## [0.8.66] - 20... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-21120@f9d2cb8 | scipy/scipy | Python | 21,120 | BUG: cluster: Avoid OOB write when distances are NaN in `centroid` | If a distance matrix with negative distances is passed, to centroid or median linkage, this can result in NaN distances written back to the distance matrix. If this happens, none of those distances will be considered less than inf, so find_min_distance() will return -1, which will eventually be used to index into an ar... | 2024-07-06T01:55:32Z | BUG: Double free or corruption when passing invalid arguments to some functions in the `scipy.cluster.hierarchy` module
### Describe your issue.
I was working on Pynguin, an automated unit test generation tool for Python, and the tool found that if we pass invalid arguments to some functions in the `scipy.cluster.hier... | I can confirm that this fails on current main.
I minimized the centroid test case to the following:
```
from scipy.cluster.hierarchy import centroid
y = [0, 0, -1]
centroid(y)
```
Here is what I have figured out about this failure:
If _centroid recomputes the distance, and the expression
```
cdef... | [
{
"body": "### Describe your issue.\n\nI was working on Pynguin, an automated unit test generation tool for Python, and the tool found that if we pass invalid arguments to some functions in the `scipy.cluster.hierarchy` module, Scipy crashes with a \"double free or corruption\" error. It's not a particularly se... | 805645223f428bed03b9c6c54bcea6334d27bd39 | {
"head_commit": "f9d2cb8817b8c9781bfb13ae4452206ecf050714",
"head_commit_message": "BUG: Avoid OOB write when distances are NaN\n\nIf a distance matrix with negative distances is passed, to centroid or\nmedian linkage, this can result in NaN distances written back to\nthe distance matrix. If this happens, none of ... | [
{
"diff_hunk": "@@ -1260,3 +1260,12 @@ def test_Heap(xp):\n pair = heap.get_min()\n assert_equal(pair['key'], 1)\n assert_equal(pair['value'], 10)\n+\n+\n+@skip_xp_backends(np_only=True, reasons=['scipy specific corner case'])",
"line": null,
"original_line": 1265,
"original_start_line":... | dc8d1b524fea8234ff6609ac748ec8317de4e9c1 | diff --git a/scipy/cluster/_hierarchy.pyx b/scipy/cluster/_hierarchy.pyx
index 511e47fa0e6b..d801236888dd 100644
--- a/scipy/cluster/_hierarchy.pyx
+++ b/scipy/cluster/_hierarchy.pyx
@@ -769,6 +769,12 @@ cdef Pair find_min_dist(int n, double[:] D, int[:] size, int x):
current_min = dist
y = i
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-9377@79187c5 | run-llama/llama_index | Python | 9,377 | feat: PgVectorStore support advanced metadata filtering | # Description
Apply `MetadataFilters.condition` to PGVectorStore query.
Fixes #9376
## Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
# How Has This Been Tested?
Tested on Python 3.11 on Windows with:
* no metadata filters applied
* metadata filters with a single filter and... | 2023-12-07T16:42:20Z | [Bug]: PGVectorStore metadata filters behaviour
### Bug Description
Applying the following `MetadataFilters` object via `PGVectorStore.as_retriever` does not behave as expected:
```python
vector_store = PGVectorStore.from_params(
database=DB_NAME,
host=url.host,
password=url.password,
port=ur... | _🤖_
<!-- Answer -->
That's great to hear that you've identified the issue and are planning to open a Pull Request to address it. Your contribution will be valuable in improving the functionality of LlamaIndex. Thank you for taking the initiative to help enhance the framework! If you have any questions or need assistan... | [
{
"body": "### Bug Description\r\n\r\nApplying the following `MetadataFilters` object via `PGVectorStore.as_retriever` does not behave as expected:\r\n\r\n```python\r\nvector_store = PGVectorStore.from_params(\r\n database=DB_NAME,\r\n host=url.host,\r\n password=url.password,\r\n port=url.port,\r\n... | f9370f0c4be69ea5284b126492aecf2416da9d3d | {
"head_commit": "79187c5118922593a1f6706f098d3d907cec47d4",
"head_commit_message": "fix: PGVectorStore metadata filters conditions",
"patch_to_review": "diff --git a/llama_index/vector_stores/postgres.py b/llama_index/vector_stores/postgres.py\nindex bedb5da24e..91e9bc2a43 100644\n--- a/llama_index/vector_stores... | [
{
"diff_hunk": "@@ -331,15 +331,25 @@ def _apply_filters_and_limit(\n ) -> Any:\n import sqlalchemy\n \n+ sqlalchemy_conditions = {\n+ \"or\": sqlalchemy.sql.or_,\n+ \"and\": sqlalchemy.sql.and_,\n+ }\n+\n if metadata_filters:\n- for filter_ in ... | b51e5798c06999b0fe24e97b6d490b231b4bebd1 | diff --git a/llama_index/vector_stores/postgres.py b/llama_index/vector_stores/postgres.py
index bedb5da24e..fa6d77ba3b 100644
--- a/llama_index/vector_stores/postgres.py
+++ b/llama_index/vector_stores/postgres.py
@@ -5,6 +5,7 @@
from llama_index.schema import BaseNode, MetadataMode, TextNode
from llama_index.vector... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-8228@d497247 | run-llama/llama_index | Python | 8,228 | BUG-8206-remove-kwargs-from-ReActAgent-from-tools | # Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes [#8206](https://github.com/run-llama/llama_index/issues/8206)
## Type of Change
Please delete options that are n... | 2023-10-21T05:19:10Z | [Bug]: index.as_chat_engine
### Bug Description
VectoreStoreIndex.as_chat_engine method not taking Streaming, k_similarity, or qa_template parameters anymore.
Not sure if this was a recent update, but none of those initializer parameters are working anymore.
### Version
0.8.46
### Steps to Reproduce
Create a Ve... | @XariZaru just remove the streaming kwarg, you don't need to pass this to chat engines since they have `chat()` and `stream_chat()` endpoints
> @XariZaru just remove the streaming kwarg, you don't need to pass this to chat engines since they have `chat()` and `stream_chat()` endpoints
When I remove the streaming kwa... | [
{
"body": "### Bug Description\n\nVectoreStoreIndex.as_chat_engine method not taking Streaming, k_similarity, or qa_template parameters anymore.\r\n\r\nNot sure if this was a recent update, but none of those initializer parameters are working anymore.\n\n### Version\n\n0.8.46\n\n### Steps to Reproduce\n\nCreate... | a009f98aa3c2515b9187673e935f020f884793b2 | {
"head_commit": "d4972479ecae1d06d0a03c2aca7dcfdcaa8f40b5",
"head_commit_message": "remove **kwargs from cls(..) of ReActAgent.from_tools; add doc string with NOTE on kwargs propagation",
"patch_to_review": "diff --git a/llama_index/agent/react/base.py b/llama_index/agent/react/base.py\nindex b44b93e18c..92a99ed... | [
{
"diff_hunk": "@@ -86,6 +86,16 @@ def from_tools(\n verbose: bool = False,\n **kwargs: Any,\n ) -> \"ReActAgent\":\n+ \"\"\"Convenience constructor method from set of of BaseTools (Optional).\n+\n+ NOTE: kwargs should have been exhausted by this point. In other words\n+ ... | 3d2bd8c2e01cf2ee7420d2e4a27e8668b9ba55ee | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2e2309144..1dd7c5af41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
### Bug Fixes / Nits
+- Fixed additional kwargs in ReActAgent.from_tools() (#8206)
- Fixed missing spaces in prompt templates (#8190)
## [0.8.47] - 2023-10-19
diff --git a/llama_in... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20915@25098f4 | scipy/scipy | Python | 20,915 | DOC: `integrate.quad_vec`: Add example when using `workers` | #### Reference issue
An attempt to close #18879
#### What does this implement/fix?
Write a second code example where the argument ``workers`` is used.
| 2024-06-06T16:19:12Z | BUG: `integrate.quad_vec`: Fatal error when using `workers` kwarg
### Describe your issue.
When using the workers keyword argument in integrate.quad_vec, a fatal error occurs and the threads are not properly closed, resulting in an infinite loop of overlapping tracebacks.
Part of the error is below, although multip... | Looks like Windows platform based on the paths? I was, however, able to reproduce on MacOS with latest `main` as well.
The default parallelisation used by `workers` is `multiprocessing.Pool`. Remember that a few things are necessary with `multiprocessing`, https://docs.python.org/3/library/multiprocessing.html#the-spaw... | [
{
"body": "### Describe your issue.\n\nWhen using the workers keyword argument in integrate.quad_vec, a fatal error occurs and the threads are not properly closed, resulting in an infinite loop of overlapping tracebacks.\r\n\r\nPart of the error is below, although multiple tracebacks end up overlapping one anot... | de85b05990a475bfe04bd5f113511c4e9c2e2c8f | {
"head_commit": "25098f42477f10835e1228d3af846e82ed5b9c49",
"head_commit_message": "DOC: Attempt to fix refguide-check error.\n\n[docs only]",
"patch_to_review": "diff --git a/scipy/integrate/_quad_vec.py b/scipy/integrate/_quad_vec.py\nindex 19218d196eb3..20362be84063 100644\n--- a/scipy/integrate/_quad_vec.py\... | [
{
"diff_hunk": "@@ -221,6 +221,27 @@ def quad_vec(f, a, b, epsabs=1e-200, epsrel=1e-8, norm='2', cache_size=100e6,\n >>> plt.ylabel(r\"$\\int_{0}^{2} x^\\alpha dx$\")\n >>> plt.show()\n \n+ When using the argument ``workers``, one should ensure\n+ the 'Safe importing of main module', for instance\... | 745d447b3c665634a5b125cc2b8acd2819452f3d | diff --git a/scipy/integrate/_quad_vec.py b/scipy/integrate/_quad_vec.py
index 19218d196eb3..74f2ba44cb1f 100644
--- a/scipy/integrate/_quad_vec.py
+++ b/scipy/integrate/_quad_vec.py
@@ -221,6 +221,23 @@ def quad_vec(f, a, b, epsabs=1e-200, epsrel=1e-8, norm='2', cache_size=100e6,
>>> plt.ylabel(r"$\int_{0}^{2} x^... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-16808@184ef85 | saleor/saleor | Python | 16,808 | Async payload generation | This PR adds the ability to generate subscription payload for webhook in the async task. Currently enabled for the following async events:
- `checkout_created`
- `checkout_updated`
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Removed A... | 2024-10-02T13:38:00Z | Bug: Async events triggered by the mutation have their payloads calculated synchronously
### What are you trying to achieve?
reasonable cloud performance on the premium supported cloud subscription
### Steps to reproduce the problem
add to cart takes more tan 10 seconds
### What did you expect to happen?
add to ca... | Thank you for the report, @dnplkndll. We're actively addressing the issue. The complexity stems from external synchronous webhooks, but our team is working on both resolution and mitigation.
We've identified that this is caused by events triggered by the mutation having their payloads calculated synchronously by the mu... | [
{
"body": "### What are you trying to achieve?\n\nreasonable cloud performance on the premium supported cloud subscription\n\n### Steps to reproduce the problem\n\nadd to cart takes more tan 10 seconds\n\n### What did you expect to happen?\n\nadd to cart takes less than 1 second. \n\n### Logs\n\n@JannikZed can ... | 5ec14504ece5711d2e41e99f53345c14ec5c9546 | {
"head_commit": "184ef851cfd648e5b04548753451d3fb1ead492c",
"head_commit_message": "Support deferred payloads in webhookTrigger mutation",
"patch_to_review": "diff --git a/saleor/core/utils/events.py b/saleor/core/utils/events.py\nindex ff49002c296..8132bcbd168 100644\n--- a/saleor/core/utils/events.py\n+++ b/sa... | [
{
"diff_hunk": "@@ -282,32 +307,69 @@ def trigger_webhooks_async_for_multiple_objects(\n )\n \n with allow_writer():\n- # Use transaction to ensure EventPayload and EventDelivery are created together, preventing inconsistent DB state.\n+ # Use transactio... | 98d19c316e64b79eb57fd5a1b52843f39819c84d | diff --git a/saleor/core/utils/events.py b/saleor/core/utils/events.py
index ff49002c296..8132bcbd168 100644
--- a/saleor/core/utils/events.py
+++ b/saleor/core/utils/events.py
@@ -8,6 +8,19 @@
from ...webhook.models import Webhook
+def get_is_deferred_payload(event_name: str) -> bool:
+ """Return True if the e... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20857@02231bc | scipy/scipy | Python | 20,857 | ENH: sparse: add axis parameter to `count_nonzero` method | The sparse matrix/array method `count_nonzero()` mimics `np.count_nonzero` but currently does not support the axis parameter. This PR adds support for the axis parameter in COO, CSR, CSC, and LIL formats. The other formats add the parameter but raise if not the default value `axis=None`. This mimics the support format... | 2024-06-01T17:21:32Z | ENH: sparse.csr_array: keep axis functionality in `getnnz()`
### Is your feature request related to a problem? Please describe.
I require this functionality and don't see an efficient way to hack it.
It is planned to disappear in version 1-13...
### Describe the solution you'd like.
have it work like before
### De... | One way to get the results of the axis parameter from `A.getnnz` is:
```python
# for axis=0
np.array([vec.nnz for vec in A.T])
# for axis=1
np.array([vec.nnz for vec in A])
```
Here's some code to test this:
```python
import numpy as np
import scipy as sp
A = sp.sparse.csr_array([[4, 5, 0], [7, 0, 0]])
A.ge... | [
{
"body": "### Is your feature request related to a problem? Please describe.\n\nI require this functionality and don't see an efficient way to hack it.\r\nIt is planned to disappear in version 1-13...\n\n### Describe the solution you'd like.\n\nhave it work like before\n\n### Describe alternatives you've consi... | ba7644bb6d69ac8e322b33f1b78673292a93cba5 | {
"head_commit": "02231bc9f2542b1c507c288f4e18f21c29636777",
"head_commit_message": "fix downcast for bincount in COO",
"patch_to_review": "diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py\nindex 510f7565065d..87a2dad8dba1 100644\n--- a/scipy/sparse/_base.py\n+++ b/scipy/sparse/_base.py\n@@ -263,7 +263,... | [
{
"diff_hunk": "@@ -124,14 +125,42 @@ def _getnnz(self, axis=None):\n axis, _ = self._swap((axis, 1 - axis))\n _, N = self._swap(self.shape)\n if axis == 0:\n- return np.bincount(downcast_intp_index(self.indices),\n- minlength=... | 2205d373ade9037f0212a7d6f8002c74c7749fa8 | diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py
index 510f7565065d..21244c62b40d 100644
--- a/scipy/sparse/_base.py
+++ b/scipy/sparse/_base.py
@@ -263,26 +263,71 @@ def _getmaxprint(self):
"""Maximum number of elements to display when printed."""
return self.maxprint
- def count_nonze... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-20816@d4e910c | scipy/scipy | Python | 20,816 | ENH: `special.rel_entr`: Avoid overflow before computing log | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-05-28T03:03:34Z | ENH: `special.rel_entr`: avoid premature overflow
### Describe your issue.
Looks like there's opportunity for improvement in `scipy.special.rel_entr`. Presumably, it takes the ratio `x/y` before taking the logarithm because it's faster than taking the difference of two logs, but this can overflow when the correct re... | It is clearly desirable to avoid premature overflow.
If x and y are greater than one, taking the log and then subtracting might reduce the accuracy, as the domain of logarithm is “larger” than its image. On the other hand, accuracy is not compromised if the arguments are less than one, which may be typical if rel_en... | [
{
"body": "### Describe your issue.\r\n\r\nLooks like there's opportunity for improvement in `scipy.special.rel_entr`. Presumably, it takes the ratio `x/y` before taking the logarithm because it's faster than taking the difference of two logs, but this can overflow when the correct result is finite. Perhaps a c... | 09769690f65cfc078c860f960f084aa3689df5b4 | {
"head_commit": "d4e910ca85e9706d6810786f527e59adc4d73ff9",
"head_commit_message": "DOC: Remove docs which require exact float match\n\nBecause rel_entr can be calculated in one of two ways, the relative\nentropy formula is no longer accurate for x and y which are similar to\none another. However, the numpy calcul... | [
{
"diff_hunk": "@@ -123,9 +123,9 @@ def entropy(pk: np.typing.ArrayLike,\n \n >>> D = entropy(pk, qk, base=base)\n >>> D\n- 0.7369655941662062\n- >>> D == np.sum(pk * np.log(pk/qk)) / np.log(base)\n- True\n+ 0.736965594166206\n+ >>> np.sum(pk * np.log(pk/qk)) / np.log(base)",
"line": ... | 3da2b2d69615cb44bdc613737793509e390035fe | diff --git a/scipy/special/_convex_analysis.pxd b/scipy/special/_convex_analysis.pxd
index 2fe95b95ccaf..aff10cb0562f 100644
--- a/scipy/special/_convex_analysis.pxd
+++ b/scipy/special/_convex_analysis.pxd
@@ -1,4 +1,6 @@
from libc.math cimport log, fabs, expm1, log1p, isnan, NAN, INFINITY
+from libc.float cimport DB... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
saleor__saleor-15248@9cdb040 | saleor/saleor | Python | 15,248 | Fix `OrderDiscount.type` when converting checkout to order. | I want to merge this change because it fixes https://github.com/saleor/saleor/issues/15233.
<!-- Please mention all relevant issue numbers. -->
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Removed API types, fields, or mutations
# ... | 2024-01-18T16:17:16Z | Bug: `CheckoutDiscount.type` is always set to `VOUCHER`
### What are you trying to achieve?
During `completeCheckout` mutation, when discount derives from promotion, I want to see the proper `CheckoutDiscount.type` ('promotion')
### Steps to reproduce the problem
1. Fetch `test_promotion_applied_on_order_with_speci... | [
{
"body": "### What are you trying to achieve?\n\nDuring `completeCheckout` mutation, when discount derives from promotion, I want to see the proper `CheckoutDiscount.type` ('promotion') \n\n### Steps to reproduce the problem\n\n1. Fetch `test_promotion_applied_on_order_with_specified_total` branch.\r\n2. Run `... | cd8bc063d8d37960952dc736b6fa33af0f81fa4f | {
"head_commit": "9cdb0409ab70be0b8a515661842c6176586dedff",
"head_commit_message": "Fix linter.",
"patch_to_review": "diff --git a/saleor/checkout/complete_checkout.py b/saleor/checkout/complete_checkout.py\nindex 7928ab92369..db4cf2e21c8 100644\n--- a/saleor/checkout/complete_checkout.py\n+++ b/saleor/checkout/... | [
{
"diff_hunk": "@@ -1053,21 +1053,39 @@ def _handle_allocations_of_order_lines(\n )\n \n \n-def _handle_checkout_discount(order: \"Order\", checkout: \"Checkout\"):\n+def _create_order_discount(order: \"Order\", checkout_info: \"CheckoutInfo\"):\n+ checkout = checkout_info.checkout\n if checkout.disc... | 7f0b80d3bffcafaa88be74fd9e88b0c7d4f66be9 | diff --git a/saleor/checkout/complete_checkout.py b/saleor/checkout/complete_checkout.py
index 7928ab92369..c8a257cbc85 100644
--- a/saleor/checkout/complete_checkout.py
+++ b/saleor/checkout/complete_checkout.py
@@ -26,7 +26,7 @@
from ..core.transactions import transaction_with_commit_on_errors
from ..core.utils.url... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
run-llama__llama_index-7783@eab7288 | run-llama/llama_index | Python | 7,783 | `StorageContext.persist` supporting `Path` | # Description
Closes https://github.com/jerryjliu/llama_index/issues/7777.
- Looks like https://github.com/jerryjliu/llama_index/pull/3778 added support for a new control flow, that could have been just one, so I moved to just one control flow
- Improved `concat_dirs` to have better arg names and cleaner docstring... | 2023-09-22T16:32:05Z | [Bug]: typing errors in `OllamaEmbeddings` and `StorageContext.persist`
### Bug Description
Running a line like this through `mypy`:
```python
import pathlib
from langchain.embeddings import OllamaEmbeddings
from llama_index import StorageContext
STORAGE_FOLDER = pathlib.Path(__file__).parent / "storage"
... | Actually, my apologies I realized `OllamaEmbeddings` stuff should be for LangChain (so I made https://github.com/langchain-ai/langchain/issues/10919).
However, type error for `StorageContext.persist` can be fixed here. Signature can be `persist_dir: str | os.PathLike`
@jamesbraza we use `mypy==0.991` in our CI. So,... | [
{
"body": "### Bug Description\r\n\r\nRunning a line like this through `mypy`:\r\n\r\n```python\r\nimport pathlib\r\n\r\nfrom langchain.embeddings import OllamaEmbeddings\r\nfrom llama_index import StorageContext\r\n\r\nSTORAGE_FOLDER = pathlib.Path(__file__).parent / \"storage\"\r\n\r\n_ = OllamaEmbeddings(mod... | 41104bd372bbadc0417673160aa05a0ad0ab6e53 | {
"head_commit": "eab728810c69fad783e0835d4190281fcf20c29b",
"head_commit_message": "Simplified control flow in persist, and supporting Path",
"patch_to_review": "diff --git a/llama_index/storage/storage_context.py b/llama_index/storage/storage_context.py\nindex c07b212e8b..78f99b4f12 100644\n--- a/llama_index/st... | [
{
"diff_hunk": "@@ -100,18 +101,12 @@ def persist(\n \n Args:\n persist_dir (str): directory to persist the storage context\n-\n \"\"\"\n- if fs is not None:\n- docstore_path = concat_dirs(persist_dir, docstore_fname)\n- index_store_path = concat_dirs(per... | 53306b9c3d8fdc6faf6a502613abb54f5ceb7d5b | diff --git a/llama_index/storage/storage_context.py b/llama_index/storage/storage_context.py
index c07b212e8b..47460fe716 100644
--- a/llama_index/storage/storage_context.py
+++ b/llama_index/storage/storage_context.py
@@ -1,6 +1,7 @@
from dataclasses import dataclass
from pathlib import Path
-from typing import Opti... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-8019@ba8108e | run-llama/llama_index | Python | 8,019 | Fix: ChromaVectorStore can attempt to add in excess of chromadb batch… | … size
# Description
Changed `ChromaVectorStore.add` to batch inputs at one less than chromadb's max to avoid the oversize error. Adds a class method to do chunking.
Fixes #7648
## Type of Change
Please delete options that are not relevant.
- [X] Bug fix (non-breaking change which fixes an issue)
... | 2023-10-07T08:52:10Z | [Bug]: Exceeding submit limit in ChromaVectorStore
### Bug Description
There are too many documents. When converting them into embeddings and loading them into chroma at once, chroma shows that they exceed the submit limit.
### Version
v0.8.24.post1 Latest
### Steps to Reproduce
```python
self.index = VectorStore... | here: .../llama_index/vector_stores/chroma.py:136
```python
for node in nodes:
embeddings.append(node.get_embedding())
metadatas.append(
node_to_metadata_dict(
node, remove_text=True, flat_metadata=self.flat_metadata
)
... | [
{
"body": "### Bug Description\n\nThere are too many documents. When converting them into embeddings and loading them into chroma at once, chroma shows that they exceed the submit limit.\n\n### Version\n\nv0.8.24.post1 Latest\n\n### Steps to Reproduce\n\n```python\r\nself.index = VectorStoreIndex.from_documents... | cad0aa70b1db35e02cbc27007fa9bf2fb5c276da | {
"head_commit": "ba8108ef39c12c9a3f89643c13ba0739343d44c0",
"head_commit_message": "Fix: ChromaVectorStore can attempt to add in excess of chromadb batch size",
"patch_to_review": "diff --git a/llama_index/vector_stores/chroma.py b/llama_index/vector_stores/chroma.py\nindex d2373fe206..3cf9f2b35d 100644\n--- a/l... | [
{
"diff_hunk": "@@ -129,27 +145,34 @@ def add(self, nodes: List[BaseNode]) -> List[str]:\n if not self._collection:\n raise ValueError(\"Collection not initialized\")\n \n- embeddings = []\n- metadatas = []\n- ids = []\n- documents = []\n- for node in nodes... | 8e91c18349d34f180ce09ba51179431057e09b78 | diff --git a/llama_index/vector_stores/chroma.py b/llama_index/vector_stores/chroma.py
index d2373fe206..4b7bd70b90 100644
--- a/llama_index/vector_stores/chroma.py
+++ b/llama_index/vector_stores/chroma.py
@@ -1,7 +1,7 @@
"""Chroma vector store."""
import logging
import math
-from typing import Any, Dict, List, Opt... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20642@aa257e0 | scipy/scipy | Python | 20,642 | TST: stats.ttest_1samp: fix xslow test | #### Reference issue
Closes gh-20641
#### What does this implement/fix?
Fixes the one test failure that occurs twice with each backend tested.
#### Additional information
```
[gh20641 aa257e0deb] TST: stats.ttest_1samp: fix xslow test
1 file changed, 3 insertions(+), 3 deletions(-)
(scipy-dev) matthaberlan... | 2024-05-04T14:06:53Z | BUG: stats: Two new XSLOW test failures
There are two new XSLOW test failures occurring in `stats`:
```
$ SCIPY_XSLOW=1 python3 dev.py test -t scipy.stats.tests.test_stats -m full -j 9
💻 ninja -C /home/warren/repos/git/forks/scipy/build -j12
ninja: Entering directory `/home/warren/repos/git/forks/scipy/build'
... | cc @mdhaber | [
{
"body": "There are two new XSLOW test failures occurring in `stats`:\r\n\r\n```\r\n$ SCIPY_XSLOW=1 python3 dev.py test -t scipy.stats.tests.test_stats -m full -j 9\r\n💻 ninja -C /home/warren/repos/git/forks/scipy/build -j12\r\nninja: Entering directory `/home/warren/repos/git/forks/scipy/build'\r\n[2/2] Gen... | 4a537b736203190a5bca1d00f7e2659a507e1ad3 | {
"head_commit": "aa257e0debe51179b5c303bea2405eac478d1431",
"head_commit_message": "TST: stats.ttest_1samp: fix xslow test\n\n[skip ci]",
"patch_to_review": "diff --git a/scipy/stats/tests/test_stats.py b/scipy/stats/tests/test_stats.py\nindex b0b3bc4c574d..483c0a40124b 100644\n--- a/scipy/stats/tests/test_stats... | [
{
"diff_hunk": "@@ -3711,8 +3711,8 @@ def test_1samp_ci_iv(self, xp):\n def test_pvalue_ci(self, alpha, data_axis, alternative, xp):\n # test relationship between one-sided p-values and confidence intervals\n data, axis = data_axis\n- data = data.astype(copy=True) # ensure byte order... | 43db12f41f94f9d62ff1c7432aaad6b19a6c4b39 | diff --git a/scipy/stats/tests/test_stats.py b/scipy/stats/tests/test_stats.py
index b0b3bc4c574d..676ef93d82e2 100644
--- a/scipy/stats/tests/test_stats.py
+++ b/scipy/stats/tests/test_stats.py
@@ -3559,10 +3559,12 @@ def test_kurtosis_constant_value(self):
@hypothesis.strategies.composite
def ttest_data_axis_strate... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20589@bcf0f04 | scipy/scipy | Python | 20,589 | TST: optimize.linprog/milp: add tests for various bug reports | #### Reference issue
Closes gh-18907 # already fixed by HiGHS 1.6.0, it seems
gh-20116
gh-20336
#### What does this implement/fix?
There were a few open bug reports that will may be closed after upgrading to the most recent HiGHS. In case we want regression tests, here they are. If not (since these are all upst... | 2024-04-26T16:10:39Z | BUG: `presolve` option in `milp` causing feasible problem to be reported as infeasible.
### Describe your issue.
When setting `presolve=True` via `options` dictionary in `scipy.optimize.milp` a feasible problem is being reported as infeasible. The exact same problem is "made" feasible by simply swapping to `presolv... | @jajhall I confirmed the report. Is this of interest?
Yes, thanks. We know that there are bugs in the MIP presolve - as exposed by various open issues on GitHub. Simple instances like this that expose bugs are very useful. I'll see whether I can reproduce the issue when setting up the model from C++ (allowing me to deb... | [
{
"body": "### Describe your issue.\r\n\r\nWhen setting `presolve=True` via `options` dictionary in `scipy.optimize.milp` a feasible problem is being reported as infeasible. The exact same problem is \"made\" feasible by simply swapping to `presolve=False`. \r\n\r\nAlternatively changing `c` also seems to make ... | 10e272dcdd8cd5afff95e362cc0429db2a19a37d | {
"head_commit": "bcf0f04c648e49ac6d20fcbeacdb937f9cabc1de",
"head_commit_message": "Merge branch 'main' into test_bugs_linprog_milp",
"patch_to_review": "diff --git a/scipy/optimize/tests/test_linprog.py b/scipy/optimize/tests/test_linprog.py\nindex cf4612a80d5c..664450e622b5 100644\n--- a/scipy/optimize/tests/t... | [
{
"diff_hunk": "@@ -387,7 +387,7 @@ def test_mip_rel_gap_passdown():\n # monotonically with the mip_rel_gap parameter.\n assert np.all(np.diff(sol_mip_gaps) < 0)\n \n-@pytest.mark.xfail(reason='Upstream / Wrapper issue, see gh-20589')\n+",
"line": null,
"original_line": 390,
"original_start_... | 323ceb57da2eb87e31ca7f6f240655411f600972 | diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py
index a5809095d621..04e2c44eaee8 100644
--- a/scipy/optimize/tests/test_milp.py
+++ b/scipy/optimize/tests/test_milp.py
@@ -387,7 +387,7 @@ def test_mip_rel_gap_passdown():
# monotonically with the mip_rel_gap parameter.
assert... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20573@ed9f2ce | scipy/scipy | Python | 20,573 | BUG: Fix error with 180 degree rotation in Rotation.align_vectors() with an infinite weight | #### Reference issue
Closes https://github.com/scipy/scipy/issues/20555
#### What does this implement/fix?
There are two related issues with exact rotations near 180 degrees:
* A perfect 180 deg rotation results in r = cross = [0, 0, 0], and is thus cast to a 0 degree rotation (critical defect)
* Numerical ins... | 2024-04-24T15:12:00Z | BUG: spatial: error in `Rotation.align_vectors()` with an infinite weight
### Describe your issue.
I found a degenerate case when aligning vectors exactly with `Rotation.align_vectors` and an infinite weight.
### Reproducing Code Example
```python
import numpy as np
from scipy.spatial.transform import Rotat... | I'm seeing the issue here, working on a fix. Problem is here:
https://github.com/scipy/scipy/blob/d55cb95282b5cfab381e373d3c127630c7e915a0/scipy/spatial/transform/_rotation.pyx#L3483-L3492
There are two related problems:
* A perfect 180 deg rotation results in `r = cross = [0, 0, 0]` (this bug, an error)
* Potent... | [
{
"body": "### Describe your issue.\r\n\r\nI found a degenerate case when aligning vectors exactly with `Rotation.align_vectors` and an infinite weight. \r\n\r\n### Reproducing Code Example\r\n\r\n```python\r\nimport numpy as np\r\nfrom scipy.spatial.transform import Rotation\r\n\r\n# Wrong:\r\nRotation.align_v... | f139e755af00dac849ff80934c5f4f9f47134b35 | {
"head_commit": "ed9f2ce89b0330879c3ca837b8ff3d934585fc74",
"head_commit_message": "Tests for exact near 180 deg rotations",
"patch_to_review": "diff --git a/scipy/spatial/transform/_rotation.pyx b/scipy/spatial/transform/_rotation.pyx\nindex f18a24270277..a1e29747ab1c 100644\n--- a/scipy/spatial/transform/_rota... | [
{
"diff_hunk": "@@ -1467,6 +1467,24 @@ def test_align_vectors_parallel():\n assert_allclose(R.apply(b[0]), a[0], atol=atol)\n \n \n+def test_align_vectors_antiparallel():\n+ # Test exact 180 deg rotation\n+ atol = 1e-12\n+ a = [[0, 1, 0], [-1, 0, 0]]\n+ b = [[0, -1, 0], [-1, 0, 0]]\n+ R, _ = ... | 6cb522da81fae9f3cc64374c182c349d5cfb6d07 | diff --git a/scipy/spatial/transform/_rotation.pyx b/scipy/spatial/transform/_rotation.pyx
index f18a24270277..2c4a3b70df41 100644
--- a/scipy/spatial/transform/_rotation.pyx
+++ b/scipy/spatial/transform/_rotation.pyx
@@ -3483,13 +3483,32 @@ cdef class Rotation:
# We first find the minimum angle rotation ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-6191@a248063 | run-llama/llama_index | Python | 6,191 | Add changelog | # Description
We desperately need a changelog. This PR adds that, as well as a workflow check so that every PR should (hopefully) be added to the changelog.
I know it seems annoying, but it's a small thing that will GREATLY improve the usability of the repo.
Future work is adding a hook to display the changelo... | 2023-06-07T20:26:37Z | [Feature Request]: Documentation to include release notes
### Feature Description
It is extremely challenging to follow up with the changes in the framework. Could you please provide release notes with every new version of llama index library released.
### Reason
_No response_
### Value of Feature
_No response_ | Yea, we are actively working on improving this. Expect to see improvements going forward soon! | [
{
"body": "### Feature Description\n\nIt is extremely challenging to follow up with the changes in the framework. Could you please provide release notes with every new version of llama index library released.\n\n### Reason\n\n_No response_\n\n### Value of Feature\n\n_No response_",
"number": 6184,
"titl... | fdadace151e10c37db14382b9af6086aee1bd804 | {
"head_commit": "a2480637b87510c317f96feee252c79b0f4e7121",
"head_commit_message": "add step to workflow to get changed files",
"patch_to_review": "diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml\nindex 2178f6b012..44dd53106e 100644\n--- a/.github/workflows/lint.yml\n+++ b/.github/workflows/... | [
{
"diff_hunk": "@@ -27,4 +29,19 @@ jobs:\n pip install -r data_requirements.txt\n - name: Run linter\n run: make lint\n- \n\\ No newline at end of file\n+ - name: Get changed files\n+ id: changed-files\n+ run: |\n+ if ${{ github.event_name == 'pull_requ... | f8132b75de2148e96ee76d1bf2eacaedf8fe19a8 | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 2178f6b012..86f2f0d824 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -16,6 +16,8 @@ jobs:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
+ with:
+ fetch-depth: ${{ gi... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
run-llama__llama_index-7005@ef9f2d6 | run-llama/llama_index | Python | 7,005 | opensearch-py client and enable llama-index's MetaFilters. Use appro… | …x-knn when no filters, and use painless-scripting method when there are (pre-)filters.
# Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #7004
## Type of Change
... | 2023-07-21T20:42:21Z | [Feature Request]: Support metadata filters in OpenSearchVectorStore and use opensearch-py
### Feature Description
The OpenSearchVectorStore is fairly bare bones and behind Langchain's implementation. We need pre-filtering at the very least, and should be using `opensearch-py`
OpenSearch is an important vector sto... | [
{
"body": "### Feature Description\n\nThe OpenSearchVectorStore is fairly bare bones and behind Langchain's implementation. We need pre-filtering at the very least, and should be using `opensearch-py`\r\n\r\nOpenSearch is an important vector store because it can be obtained from Amazon as a service, which make... | 4b25f6ee12e382497a1cd13aaab8393c9743806d | {
"head_commit": "ef9f2d6e5dbf752be03119bc25c5f43567f54b84",
"head_commit_message": "opensearch-py client and enable llama-index's MetaFilters. Use approx-knn when no filters, and use painless-scripting method when there are (pre-)filters.",
"patch_to_review": "diff --git a/llama_index/vector_stores/opensearch.p... | [
{
"diff_hunk": "@@ -1,16 +1,164 @@\n \"\"\"Elasticsearch/Opensearch vector store.\"\"\"\n-import json\n-from typing import Any, Dict, List, Optional, cast\n+from typing import Any, Dict, List, Optional, cast, Iterable, Union\n+\n+import uuid\n \n from llama_index.schema import MetadataMode, TextNode\n from llam... | 2c6393de12cc3f6b196a01751dba482150d5ccbb | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9d384968a..ecf6ea5d22 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
### New Features
- Added HotpotQADistractor benchmark evaluator (#7034)
- Add metadata filter and delete support for LanceDB (#7048)
+- Use MetadataFilters in opensearch (#7005)
### B... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
scipy__scipy-20349@ddb3964 | scipy/scipy | Python | 20,349 | Do not segfault in svd(a) with VT.size > INT_MAX | #### Reference issue
<!--Example: Closes gh-WXYZ.-->
closes https://github.com/scipy/scipy/issues/14001
#### What does this implement/fix?
<!--Please explain your changes.-->
`linalg.svd` with too large matrices may segfault if `m*n > int_max` on large-memory machines (on smaller memory machines it may fail ... | 2024-03-28T10:24:18Z | Pycharm scipy SVD returning error code without message
I am trying to compute the SVD of a large matrix (4799 x 53130) using Pycharm as my IDE. The following returns the exit code -1073741819 (0xC0000005), but no error message is displayed. I have looked up this error code on here and people have found a mixture of thi... | You probably run out of 32bit indexing. Could you try building both using 64bit Lapack known as ilp64? Here is the first hit after a search about mkl and openblas
https://github.com/pytorch/pytorch/issues/51720
> You probably run out of 32bit indexing. Could you try building both using 64bit Lapack known as ilp64? ... | [
{
"body": "I am trying to compute the SVD of a large matrix (4799 x 53130) using Pycharm as my IDE. The following returns the exit code -1073741819 (0xC0000005), but no error message is displayed. I have looked up this error code on here and people have found a mixture of things causing it. I have re-installed ... | 01ef73eb419ef42943f81b433d559d523eaf5be9 | {
"head_commit": "ddb3964535b5936450e00621b5b1c754c68ef2f0",
"head_commit_message": "BUG: linalg: avoid a segfault in ?gesdd\n\nlinalg.svd with too large matrices may segfault if\nmax(m, n)*max(m, n) > int_max on large-memory machines (on smaller memory machines\nit may fail with a MemoryError instead). The root ca... | [
{
"diff_hunk": "@@ -116,6 +116,20 @@ def svd(a, full_matrices=True, compute_uv=True, overwrite_a=False,\n if lapack_driver not in ('gesdd', 'gesvd'):\n message = f'lapack_driver must be \"gesdd\" or \"gesvd\", not \"{lapack_driver}\"'\n raise ValueError(message)\n+\n+ if lapack_driver == ... | b810fdbb0ec7b8ad6a0ead1ecc8be24b24bfdb91 | diff --git a/scipy/linalg/_decomp_svd.py b/scipy/linalg/_decomp_svd.py
index 24be62752e62..a2452e3dc21b 100644
--- a/scipy/linalg/_decomp_svd.py
+++ b/scipy/linalg/_decomp_svd.py
@@ -116,6 +116,20 @@ def svd(a, full_matrices=True, compute_uv=True, overwrite_a=False,
if lapack_driver not in ('gesdd', 'gesvd'):
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20318@4c5e2c1 | scipy/scipy | Python | 20,318 | BUG: signal: Fix scalar input issue of signal.lfilter | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-03-23T13:03:51Z | lfilter error when input b is 0-dim
When using lfilter to apply an auto-regressive filter, i.e., with feedback coefficients only, then there is an error if b is either just a single number or a 0-dim numpy array. Note that if b is a single element list or a 1-dim numpy array, there is no error.
I am not sure if this... | I also have the same issue. Have you found a way to resolve this?
yes, the solution is just to add `b = np.atleast_1d(b)` at line 1817 of signaltools.py in scipy.signal
HI! I added b = np.atleast_1d(b) at line 1817 of signaltools.py in scipy.signal but I have always the same problem. Can you help me, please!!
@lucasc... | [
{
"body": "When using lfilter to apply an auto-regressive filter, i.e., with feedback coefficients only, then there is an error if b is either just a single number or a 0-dim numpy array. Note that if b is a single element list or a 1-dim numpy array, there is no error.\r\n\r\nI am not sure if this behaviour is... | e4655a65036585d2c91ff8fb336b0cbce01a3b3f | {
"head_commit": "4c5e2c160ad7e5176cbb6b12069b4b4c8652784c",
"head_commit_message": "BUG: signal: Fix scalar input issue of signal.lfilter",
"patch_to_review": "diff --git a/scipy/signal/_signaltools.py b/scipy/signal/_signaltools.py\nindex 0ce436853bd7..214b35c596dd 100644\n--- a/scipy/signal/_signaltools.py\n++... | [
{
"diff_hunk": "@@ -1864,6 +1864,14 @@ def test_do_not_modify_a_b_FIR(self):\n assert_equal(b, b0)\n assert_equal(a, a0)\n \n+ @pytest.mark.parametrize(\"a\", [1.0, [1.0], np.array(1.0)])\n+ @pytest.mark.parametrize(\"b\", [1.0, [1.0], np.array(1.0)])\n+ def test_scalar_input(self, a, b... | 583a6dc79a6e7697e4ac16e6dfeb550c5003c021 | diff --git a/scipy/signal/_signaltools.py b/scipy/signal/_signaltools.py
index 0ce436853bd7..214b35c596dd 100644
--- a/scipy/signal/_signaltools.py
+++ b/scipy/signal/_signaltools.py
@@ -2087,6 +2087,7 @@ def lfilter(b, a, x, axis=-1, zi=None):
>>> plt.show()
"""
+ b = np.atleast_1d(b)
a = np.atleas... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
run-llama__llama_index-6764@62855f3 | run-llama/llama_index | Python | 6,764 | feat(node_parser): `MetadataExtractor` - Feature Augmentation via node parser post-processing | # Description
Rendered link to notebook:
https://github.com/jerryjliu/llama_index/blob/56060f7c3ee1643d6cdca0fd24c9d4b96acecf60/docs/examples/metadata_extraction/MetadataExtractionSEC.ipynb
Fixes https://github.com/jerryjliu/llama_index/issues/6627
Partial implementation: https://github.com/jerryjliu/llama_ind... | 2023-07-07T01:28:31Z | [Feature Request]: Pattern: Enriched Document Embedding
### Feature Description
To have a more robust embedding, I propose the following strategies:
1. Extract title, file name, subsections, other metadata (summary of sub section and article, keyword extraction)
2. Embed a summary of the previous chunk and next ... | TODO:
1. Investigate other methods for long-document understanding.
2. Ideally, feature augmentation has good defaults optimized to particular use-cases (long-form documents, financial documents, presentations). The first lesson of ML is that the more we know about the data, the better we do (bootstrapping). Automati... | [
{
"body": "### Feature Description\r\n\r\nTo have a more robust embedding, I propose the following strategies:\r\n\r\n1. Extract title, file name, subsections, other metadata (summary of sub section and article, keyword extraction)\r\n2. Embed a summary of the previous chunk and next chunk.\r\n\r\nProblems solv... | 6c6c8efedd59ef94729ceeb9e720d3b6a0905a5a | {
"head_commit": "62855f3609127fd1a8285a894aacf844bd05a990",
"head_commit_message": "commit",
"patch_to_review": "diff --git a/examples/metadata_extraction/MetadataExtractionSEC.ipynb b/examples/metadata_extraction/MetadataExtractionSEC.ipynb\nnew file mode 100644\nindex 0000000000..2a4b6f74ff\n--- /dev/null\n+++... | [
{
"diff_hunk": "@@ -0,0 +1,393 @@\n+\"\"\"\n+Metadata extractors for nodes. Applied as a post processor to node parsing.\n+Currently, only `TextNode` is supported.\n+\n+Supported metadata:\n+Node-level:\n+ - `SummaryExtractor`: Summary of each node, and pre and post nodes\n+ - `QuestionsAnsweredExtractor`... | 9b02b92e1dbacce3f08f1c0a620abad52cff3a49 | diff --git a/docs/examples/metadata_extraction/MetadataExtractionSEC.ipynb b/docs/examples/metadata_extraction/MetadataExtractionSEC.ipynb
new file mode 100644
index 0000000000..6f66ab9b9a
--- /dev/null
+++ b/docs/examples/metadata_extraction/MetadataExtractionSEC.ipynb
@@ -0,0 +1,655 @@
+{
+ "cells": [
+ {
+ "cell_... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-20393@c92a476 | scipy/scipy | Python | 20,393 | MAINT/BLD: Remove `stats._boost` and add the distribution related functions to ``scipy.special._ufuncs`` | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-04-05T09:47:17Z | Combining extensions in `stats._boost` into one
After gh-15770 I noticed another wheel size increase. With the current codegen it's easy to add new functions, but it looks like a separate new Python extension per function isn't all that sustainable:
```
$ ls -l build/scipy/stats/_boost/
...
-rwxr-xr-x 1 rgommers ... | > That's ~350kb per function
Per distribution (9 functions: pdf, sf, kurtosis, etc.), but I understand the concern. It should be smaller than that.
That would probably work -- we could also rewrite the code gen to use the numpy ufunc C API instead of the Cython API. Thinking quickly about it, that would reduce t... | [
{
"body": "After gh-15770 I noticed another wheel size increase. With the current codegen it's easy to add new functions, but it looks like a separate new Python extension per function isn't all that sustainable:\r\n```\r\n$ ls -l build/scipy/stats/_boost/\r\n...\r\n-rwxr-xr-x 1 rgommers staff 403276 Jul 12 ... | 86c3a5bf8d7bc965a7873b744127ee076a8c3fa1 | {
"head_commit": "c92a476cae41cb4898e40edf3c3b228efa020fb5",
"head_commit_message": "DEV: Remove max_root_iterations in StatsPolicy",
"patch_to_review": "diff --git a/mypy.ini b/mypy.ini\nindex aa840b19701e..4910a0f3776c 100644\n--- a/mypy.ini\n+++ b/mypy.ini\n@@ -200,9 +200,6 @@ ignore_missing_imports = True\n [... | [
{
"diff_hunk": "@@ -12659,3 +12659,1011 @@ def add_newdoc(name, doc):\n r\"\"\"\n Internal function, do not use.\n \"\"\")\n+\n+add_newdoc(\n+ \"_beta_pdf\",\n+ \"\"\"",
"line": null,
"original_line": 12665,
"original_start_line": null,
"path": "scipy/special/_add_newdocs.py",
... | 3f58d5954a1b0e950648a3e7ef61e12b49b3a4d7 | diff --git a/mypy.ini b/mypy.ini
index 99fce31da139..11fe54c67475 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -16,6 +16,9 @@ check_untyped_defs = True
[mypy-scipy.special.tests.test_sf_error]
check_untyped_defs = True
+[mypy-scipy.special.tests.test_boost_ufuncs]
+ignore_errors = True
+
[mypy-scipy.spatial.tests.test_... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20299@6ee4f79 | scipy/scipy | Python | 20,299 | BUG: Optimize: NewtonCG min crashes with xtol=0 | The minimize function crashes if `xtol` is set to `0`. This is because the initial value of a loop variable is `2 * xtol`, which is intended to ensure the loop runs at least once. However, if `xtol = 0` then the loop never runs, a variable isn't instantiated that is used outside of the loop, and an `UnboundLocalError` ... | 2024-03-20T23:45:48Z | BUG: minimize(method="newton-cg") crashes with UnboundLocalError if xtol=0
### Describe your issue.
I was trying to debug an issue where I was unable to find the minimum of a function with Newton-CG. As one of my debugging steps, I tried setting the solver option `xtol` to zero. I expected this to disable termination ... | I've done some reading of the code involved, and it seems to be related to the termination condition of this loop:
https://github.com/scipy/scipy/blob/4edfcaa3ce8a387450b6efce968572def71be089/scipy/optimize/_optimize.py#L2151
`update_l1norm` is the l1norm of the previous update. Before the loop, it is set to 2 * ... | [
{
"body": "### Describe your issue.\n\nI was trying to debug an issue where I was unable to find the minimum of a function with Newton-CG. As one of my debugging steps, I tried setting the solver option `xtol` to zero. I expected this to disable termination due to x convergence, but what actually happens is tha... | cd60e810c17442f71ab7f7788eccd1013fc265f1 | {
"head_commit": "6ee4f792b3ecbae1ec9548f707795feb6373621b",
"head_commit_message": "TST: Optimize: NewtonCF Minimize when xtol=0\n\nRegression test for gh-20214 which addressed an issue in the\nNewton CG method which would raise an UnboundLocalVariable error\nif `xtol` was set to zero. It also ensures the method f... | [
{
"diff_hunk": "@@ -2025,7 +2025,7 @@ def terminate(warnflag, msg):\n cg_maxiter = 20*len(x0)\n \n xtol = len(x0) * avextol\n- update_l1norm = 2 * xtol\n+ update_l1norm = np.finfo(float).max",
"line": 2029,
"original_line": 2028,
"original_start_line": null,
"path": "scipy/optimize... | 388f5984d911527d5f561142f23e75ebc27247c8 | diff --git a/scipy/optimize/_optimize.py b/scipy/optimize/_optimize.py
index d16b4512be71..a8846bc91e42 100644
--- a/scipy/optimize/_optimize.py
+++ b/scipy/optimize/_optimize.py
@@ -1153,7 +1153,7 @@ def _line_search_wolfe12(f, fprime, xk, pk, gfk, old_fval, old_old_fval,
def fmin_bfgs(f, x0, fprime=None, args=(), ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20295@5365543 | scipy/scipy | Python | 20,295 | BUG: linalg: support empty arrays | #### Reference issue
<!--Example: Closes gh-WXYZ.-->
supersedes and closes gh-18673, supersedes and closes gh-18141
closes https://github.com/scipy/scipy/issues/17658
closes https://github.com/scipy/scipy/issues/14389
closes https://github.com/scipy/scipy/issues/14244
closes https://github.com/scipy/scipy/iss... | 2024-03-20T10:48:18Z | cho_factor and cho_solve don't support (0,0)-shape matrices
`scipy.linalg.cho_factor` doesn't support arrays with shape `(0, 0)`. I think it could be supported and this would avoid writing if-else conditions outside this function.
### Reproducing code example:
```python
import scipy
scipy.linalg.cho_factor(np.one... | And similarly for `cho_solve`.
Seems to work in 1.0.0rc2
... except cho_solve apparently doesn't
This is a bit unfortunate that these are exposed to the public API. `cho_solve` only works with the input produced by `cho_factor` and for this special case it is not guarded.
In the ideal world there would be only a c... | [
{
"body": "`scipy.linalg.cho_factor` doesn't support arrays with shape `(0, 0)`. I think it could be supported and this would avoid writing if-else conditions outside this function.\r\n\r\n### Reproducing code example:\r\n```python\r\nimport scipy\r\nscipy.linalg.cho_factor(np.ones((0,0)))\r\n```\r\n\r\n### Err... | 8b22ba9a4495c871dd129722ac164c2c841f6499 | {
"head_commit": "5365543616a78507f7211aa2bd2fe210bb4209ff",
"head_commit_message": "MAINT: fix issue with undefined variable in linalg.svd\n\nIntroduced because of a cross-merge conflict with another PR.",
"patch_to_review": "diff --git a/scipy/linalg/_basic.py b/scipy/linalg/_basic.py\nindex c781236f2573..1fdea... | [
{
"diff_hunk": "@@ -1043,6 +1114,14 @@ def test_empty_edge_cases(self):\n with assert_raises(ValueError, match='Last 2 dimensions'):\n det(np.array([[[]]]))\n \n+ @pytest.mark.xfail(reason=\"det(float32) -> float64, is it a bug?\")",
"line": null,
"original_line": 1117,
"origi... | 91a1bdcc71262e98693550c6e10b48547e4ca3c2 | diff --git a/scipy/linalg/_basic.py b/scipy/linalg/_basic.py
index c781236f2573..13894e6f68a2 100644
--- a/scipy/linalg/_basic.py
+++ b/scipy/linalg/_basic.py
@@ -163,7 +163,8 @@ def solve(a, b, lower=False, overwrite_a=False,
# accommodate empty arrays
if b1.size == 0:
- return np.asfortranarray(b1.... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-15051@dde7d82 | saleor/saleor | Python | 15,051 | Recalculate prices with celery beat | Calculate the prices in the background. In the previous solution any action on product, variant, sale, promotion, rule was triggering the action of recalculating prices in the background. In case of huge amount of actions this could trigger a lot of duplicated tasks. We change this approach to only set the `dirty` flag... | 2023-12-15T12:16:30Z | Introduce the flag for products to mark the objects that needs recalculation
We should refactor the way that the product prices are recalculated.
### Problem
Currently the discounted price recalculation method is called each time the related sale is changing. This may result in calling recalculation multiple times for... | Task functions to refactor:
- `update_products_discounted_prices_for_promotion_task`
- `update_products_discounted_prices_of_promotion_task`
We could try to use a custom Celery scheduler that will schedule the task only if there are products that need recalculating. An example custom schedule based on this logic was ad... | [
{
"body": "We should refactor the way that the product prices are recalculated.\n\n### Problem\nCurrently the discounted price recalculation method is called each time the related sale is changing. This may result in calling recalculation multiple times for single product what is not efficient.\n\n## Solution\n... | 55446279690df20014327c1445d145f760d6b109 | {
"head_commit": "dde7d829e78996d21200635ef4497246052295cf",
"head_commit_message": "fix tests.",
"patch_to_review": "diff --git a/saleor/discount/migrations/0074_promotionrule_variants_dirty.py b/saleor/discount/migrations/0074_promotionrule_variants_dirty.py\nnew file mode 100644\nindex 00000000000..dd6b3a3801c... | [
{
"diff_hunk": "@@ -47,6 +47,4 @@ def bulk_action(cls, info, queryset):\n for product in products:\n cls.call_event(manager.product_updated, product, webhooks=webhooks)\n \n- update_products_discounted_prices_for_promotion_task.delay(\n- [product.id for product in products]... | a53df4d6dadb1f85c4676c26752869cf555a0647 | diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 992b6367c78..ef4927ff300 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -87,7 +87,10 @@
VariantMedia,
)
from ...product.search import update_products_search_vector
-from ...product.task... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
run-llama__llama_index-6806@5705103 | run-llama/llama_index | Python | 6,806 | feat(UX): provide `all-MiniLM-L6-v2` as local `embed_model` | # Description
Usage:
```python
service_context = ServiceContext(embed_model="local")
```
<details>
For the choice of `all-MiniLM-L6-v2`, see the cost performance analysis [here](https://medium.com/@nils_reimers/openai-gpt-3-text-embeddings-really-a-new-state-of-the-art-in-dense-text-embeddings-6571fe3ec9d9). ... | 2023-07-09T13:22:01Z | [Feature Request]: Local-model defaults for non-predictor sensitive experimentation
### Feature Description
It can be costly to run experiments using paid APIs, especially, if code is accidentally re-run.
Hence, it should be as easy as `ServiceContext(local=true)` to download e.g. from huggingface, store in local... | Good proposal, in my opinion.
Once https://github.com/jerryjliu/llama_index/issues/6692 is implemented, we should decide if it's better to also use the subprocess service.
One concern is that any model that is that size (100M-500M) parameters will likely not be useful enough as an LLM. LLMs at this size (like GPT-2) st... | [
{
"body": "### Feature Description\r\n\r\nIt can be costly to run experiments using paid APIs, especially, if code is accidentally re-run.\r\n\r\nHence, it should be as easy as `ServiceContext(local=true)` to download e.g. from huggingface, store in local cache, and utilize local model. Local model should be li... | aa8151e90e2ff322587f4548f50a9786c4f64177 | {
"head_commit": "57051031cdfa306c363314ee9383690b84dd05e1",
"head_commit_message": "commit",
"patch_to_review": "diff --git a/llama_index/indices/service_context.py b/llama_index/indices/service_context.py\nindex c192bfdb86..e7921ed938 100644\n--- a/llama_index/indices/service_context.py\n+++ b/llama_index/indic... | [
{
"diff_hunk": "@@ -111,6 +113,21 @@ def from_defaults(\n )\n chunk_size = chunk_size_limit\n \n+ if isinstance(embed_model, str):\n+ if embed_model != \"local\":\n+ raise ValueError(\n+ \"embed_model must be str 'local' or of type Base... | 349ca12d5c4731f2a7579ce434708707fcdedc09 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3427a73525..bcba00a37c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# ChangeLog
+## Unreleased
+
+### New Features
+- specify `embed_model="local"` to use default local embbeddings in the service context (#6806)
+
## [v0.7.8] - 2023-07-13
### New Fe... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-20259@5571e2d | scipy/scipy | Python | 20,259 | BUG: linalg: fix `expm` for large arrays | #### Reference issue
Supersedes gh-20234 and closes gh-18086.
#### What does this implement/fix?
The first commit is gh-19020. The second commit is from gh-20234. The third commit fixes gh-18086 in accordance with [this comment](https://github.com/scipy/scipy/pull/20234#issuecomment-2001625323). The fourth commit ... | 2024-03-16T08:41:54Z | BUG: `scipy.linalg.expm` generates inconsistent results between runs
### Describe your issue.
For a custom `(400, 400)` matrix , `scipy.linalg.expm` generates inconsistent results between runs. I understand that the documentation mentions for `n>=400`, some approximation will be applied. However, there are just too ... | What is the inconsistency nature you mention? The entries or the eigenvalues or something else?
The results, they are just ... different between runs.
```
In [5]: scipy.linalg.expm(data)
Out[5]:
array([[ 2.88426183e+00, -6.02503658e-01, -5.65874903e-01, ...,
-7.52170398e-09, 2.10243969e-07, 1.34680865e-... | [
{
"body": "### Describe your issue.\r\n\r\nFor a custom `(400, 400)` matrix , `scipy.linalg.expm` generates inconsistent results between runs. I understand that the documentation mentions for `n>=400`, some approximation will be applied. However, there are just too much differences between runs, potentially cau... | 8e5b96af972a57038a9899ce91ec46baaacc6607 | {
"head_commit": "5571e2d98bf644871df740e8c9ef546eaebe16f8",
"head_commit_message": "BUG: expm must compute A^8 when needed",
"patch_to_review": "diff --git a/scipy/linalg/_matfuncs_expm.pyx.in b/scipy/linalg/_matfuncs_expm.pyx.in\nindex 67006c042fc0..eddd77fae65d 100644\n--- a/scipy/linalg/_matfuncs_expm.pyx.in\... | [
{
"diff_hunk": "@@ -728,6 +729,24 @@ def test_readonly(self):\n a.flags.writeable = False\n expm(a)\n \n+ def test_gh18086(self):\n+ A = np.zeros((400, 400), dtype=float)\n+ i = np.random.default_rng(0).integers(0, 399, 500)\n+ j = np.random.default_rng(100).integers(0, 3... | db0501ebcb94b891b6295e12516112ceb4aa23bc | diff --git a/scipy/linalg/_matfuncs_expm.pyx.in b/scipy/linalg/_matfuncs_expm.pyx.in
index 67006c042fc0..eddd77fae65d 100644
--- a/scipy/linalg/_matfuncs_expm.pyx.in
+++ b/scipy/linalg/_matfuncs_expm.pyx.in
@@ -1,5 +1,10 @@
# cython: language_level=3
+# cython: boundscheck=False
+# cython: initializedcheck=False
+# cy... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20261@dd58ade | scipy/scipy | Python | 20,261 | BUG:linalg:Remove the 2x2 branch in expm | Closes #19584
The 2x2 shortcut branch is not numerically stable for overflow/underflows. It might also be the numpy implementation of hyperbolic functions but there is not much performance gain to insist on that branch we can leave it for future.
In the meantime, fixed a missing dtype branch separation. | 2024-03-16T11:25:38Z | BUG: MATLAB expm vs scipy.linalg.expm: overflow/invalid value warnings, resulting in nan
### Describe your issue.
I want to reproduce MATLAB expm-function in scipy
scipy.linalg.expm produces nan array
scipy.sparse.linalg.expm works, the result is exactly the same as in MATLAB.
All use the same algorithms, so ... | I forgot to post the Matlab code. Here it is:
>> A = [-494.08845191 0; 12566.3706 -12566.3706;]
A =
1.0e+04 *
-0.0494 0
1.2566 -1.2566
>> w = 2*pi
w =
6.2832
>> expm((pi/w)*A)
ans =
1.0e-107 *
0.5129 0
0.5339 0
Might be a different iss... | [
{
"body": "### Describe your issue.\n\nI want to reproduce MATLAB expm-function in scipy\r\n\r\nscipy.linalg.expm produces nan array\r\n\r\nscipy.sparse.linalg.expm works, the result is exactly the same as in MATLAB.\r\n\r\nAll use the same algorithms, so i think there is some issue in scipy.linalg\n\n### Repro... | ff99a9b900785c71bd049ff72f7eeecd9c08d31c | {
"head_commit": "dd58ade0c90c3941421eb410dcee33308d90164a",
"head_commit_message": "BUG:linalg:Remove the 2x2 branch in expm",
"patch_to_review": "diff --git a/scipy/linalg/_matfuncs.py b/scipy/linalg/_matfuncs.py\nindex 6364c72b62ff..5089c11a7f55 100644\n--- a/scipy/linalg/_matfuncs.py\n+++ b/scipy/linalg/_matf... | [
{
"diff_hunk": "@@ -299,35 +299,14 @@ def expm(A):\n return np.exp(a)\n \n if not np.issubdtype(a.dtype, np.inexact):\n- a = a.astype(float)\n+ a = a.astype(np.float64)\n elif a.dtype == np.float16:\n a = a.astype(np.float32)\n \n- # Explicit formula for 2x2 case, formul... | f14c056b05d7172d0805872dc013067f79e61836 | diff --git a/scipy/linalg/_matfuncs.py b/scipy/linalg/_matfuncs.py
index 6364c72b62ff..64fc65df291d 100644
--- a/scipy/linalg/_matfuncs.py
+++ b/scipy/linalg/_matfuncs.py
@@ -6,7 +6,6 @@
import numpy as np
from numpy import (dot, diag, prod, logical_not, ravel, transpose,
conjugate, absolute, amax... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20284@675dde6 | scipy/scipy | Python | 20,284 | ENH: stats.pearsonr: add array API support | #### Reference issue
gh-20137
Closes gh-20324
#### What does this implement/fix?
This explores the addition of Array API support to `scipy.stats.pearsonr`. Only the last commit is relevant; the others are from gh-20137.
#### Additional information
Need to resolve merge conflicts and skip a test on 32-bit, but... | 2024-03-19T02:27:22Z | MAINT, BUG (?): pearsonr statistic return type change
Originally reported by @stefanv on mailing list, for an issue that was detected in `skimage`. My local testing suggests that the issue is reproducible for NumPy `1.26.4` and NumPy `2.0.0b1` though, so the reason may be due to a code change we've made directly.
I ... | [
{
"body": "Originally reported by @stefanv on mailing list, for an issue that was detected in `skimage`. My local testing suggests that the issue is reproducible for NumPy `1.26.4` and NumPy `2.0.0b1` though, so the reason may be due to a code change we've made directly.\r\n\r\nI confirmed locally that the test... | 06f223a63619f10a01a68583cdd6cece60507910 | {
"head_commit": "675dde66a0460b38dfc7e433260b7e19374449fe",
"head_commit_message": "stats.pearsonr: add Array API support",
"patch_to_review": "diff --git a/scipy/stats/_morestats.py b/scipy/stats/_morestats.py\nindex 8da934504184..13d6824f7461 100644\n--- a/scipy/stats/_morestats.py\n+++ b/scipy/stats/_morestat... | [
{
"diff_hunk": "@@ -4347,47 +4350,47 @@ def _pearsonr_fisher_ci(r, n, confidence_level, alternative):\n Fisher's transformation is used to compute the confidence interval\n (https://en.wikipedia.org/wiki/Fisher_transformation).\n \"\"\"\n- if r == 1:\n- zr = np.inf\n- elif r == -1:\n- ... | dedd975d21ecf40690bc5a6019615e10bfcf3444 | diff --git a/.github/workflows/array_api.yml b/.github/workflows/array_api.yml
index 5a2b0ef4d94e..8b02fcb5b900 100644
--- a/.github/workflows/array_api.yml
+++ b/.github/workflows/array_api.yml
@@ -94,3 +94,4 @@ jobs:
python dev.py --no-build test -b all -s fft -- --durations 3 --timeout=60
python de... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
run-llama__llama_index-6610@3210442 | run-llama/llama_index | Python | 6,610 | Updated SelectionOutputParser to handle JSON objects and arrays | This commit updates the `SelectionOutputParser` class in the llama-index library to correctly handle both JSON objects and arrays. Previously, the `_marshal_llm_to_json` method was designed to extract a JSON array from a string, but it failed when the output was a JSON object, resulting in a `json.JSONDecodeError`.
... | 2023-06-27T20:31:43Z | [Bug]: SelectionOutputParser incorrectly parsing Router Query Engine
### Bug Description
The `SelectionOutputParser` class in the llama-index library was unable to correctly parse JSON objects when used with a router query engine and a `LLMSingleSelector` with only one tool. The `_marshal_llm_to_json` method was desig... | **Solution Outline**
1. **Problem Identification**: The issue was identified in the `SelectionOutputParser` class of the llama-index library. The `_marshal_llm_to_json` method was designed to extract a JSON array from a string, but it failed when the output was a JSON object. This resulted in a `json.JSONDecodeError... | [
{
"body": "### Bug Description\n\nThe `SelectionOutputParser` class in the llama-index library was unable to correctly parse JSON objects when used with a router query engine and a `LLMSingleSelector` with only one tool. The `_marshal_llm_to_json` method was designed to extract a JSON array from a string, but i... | a1a7292b8277394c644e3bdba24ca3161a1fd990 | {
"head_commit": "32104424aacca37f6c1b08434c420d09b6459cbd",
"head_commit_message": "Updated SelectionOutputParser to handle JSON objects and arrays\n\nThis commit updates the `SelectionOutputParser` class in the llama-index library to correctly handle both JSON objects and arrays. Previously, the `_marshal_llm_to_... | [
{
"diff_hunk": "@@ -48,27 +48,35 @@ class Answer(DataClassJsonMixin):\n \n class SelectionOutputParser(BaseOutputParser):\n def _marshal_llm_to_json(self, output: str) -> str:\n- \"\"\"Extract a valid JSON array from a string.\n- Extracts a substring that represents a valid JSON array.\n+ ... | 3405d50ee2000d3c426dd90d228b59c6ed309940 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7ab059a4a1..dfc5acb8a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@
### New Features
- Redis support for index stores and docstores (#6575)
+### Bug Fixes / Nits
+- More robust JSON parsing from LLM for `SelectionOutputParser` (#6610)
+
### Bug Fixes /... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-20242@1b0788e | scipy/scipy | Python | 20,242 | DOC: sparse: Correct `todense` documentation | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2024-03-13T15:28:53Z | DOC: Sparse arrays: todense() does not return numpy.matrix
### Issue with current documentation:
The documentation states that the `todense()` method of each of the sparse array classes returns a `numpy.matrix` but they return a `numpy.ndarray`.
### Idea or request for content:
Modify the documentation to state the ... | @henry50 would you be interested in opening a PR?
See also #18898 | [
{
"body": "### Issue with current documentation:\n\nThe documentation states that the `todense()` method of each of the sparse array classes returns a `numpy.matrix` but they return a `numpy.ndarray`.\n\n### Idea or request for content:\n\nModify the documentation to state the return type is `numpy.ndarray`.\n\... | 488db3d39dae9f65d61d6dc1f4bccdcea92321cd | {
"head_commit": "1b0788e2567dc43a0562544e034a9e8a2f92df55",
"head_commit_message": "Added optional parameters to todense method",
"patch_to_review": "diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py\nindex 3c0e9bb209fd..94d8b21ee665 100644\n--- a/scipy/sparse/_base.py\n+++ b/scipy/sparse/_base.py\n@@ -... | [
{
"diff_hunk": "@@ -111,3 +111,35 @@ def getrow(self, i):\n matrix (row vector).\n \"\"\"\n return self._getrow(i)\n+\n+ def todense(self, order=None, out=None):\n+ \"\"\"\n+ Return a dense representation of this sparse matrix.\n+\n+ Parameters\n+ ---------... | 4e353665881e322f2cd0e98193924126faefdf81 | diff --git a/scipy/sparse/_base.py b/scipy/sparse/_base.py
index 3c0e9bb209fd..db99d48f7417 100644
--- a/scipy/sparse/_base.py
+++ b/scipy/sparse/_base.py
@@ -928,7 +928,7 @@ def _getrow(self, i):
def todense(self, order=None, out=None):
"""
- Return a dense representation of this sparse array/ma... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Documentation Updates"
} |
saleor__saleor-14240@7a8ddef | saleor/saleor | Python | 14,240 | Optimize webhooks calls in bulk mutations | I want to merge this change because it reduces the number of webhook queries for bulk mutations
resolves: https://github.com/saleor/saleor/issues/14112
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Removed API types, fields, or mutatio... | 2023-10-10T08:20:17Z | Optimize loading webhooks for event
The `get_webhooks_for_event` should be rewritten into a dataloader. Currently, there is a performance issue visible in bulk mutations where webhooks are triggered in a loop for each instance modified in the bulk mutation, and for each instance, it's running `get_webhooks_for_event`. ... | Example trace: https://app.datadoghq.com/apm/trace/15459061078129668117?graphType=flamegraph&shouldShowLegend=true&sort=time&spanID=4396032202316836865&spanViewType=metadata | [
{
"body": "The `get_webhooks_for_event` should be rewritten into a dataloader. Currently, there is a performance issue visible in bulk mutations where webhooks are triggered in a loop for each instance modified in the bulk mutation, and for each instance, it's running `get_webhooks_for_event`. Each call trigger... | bfa079a2a55956121b6bc988c3feda5f13cf6764 | {
"head_commit": "7a8ddefba316fffdce70ddc6107e94a74119672c",
"head_commit_message": "optimize webhooks calls in bulk mutations",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex faa3268e52f..f86fa317e81 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -90,6 +90,33 @@ All notable, unreleased c... | [
{
"diff_hunk": "@@ -90,6 +90,33 @@ All notable, unreleased changes to this project will be documented in this file.\n \n ### Breaking changes\n - Deprecate `external_url` on `Invoice` GraphQL type in favour of `url`. No matter if the invoice is stored on Saleor or is a link to an external invoice it will get re... | aca0e222e64fbcc256a684400f3f33fe8263f598 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index faa3268e52f..bc9bb952066 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -90,6 +90,32 @@ All notable, unreleased changes to this project will be documented in this file.
### Breaking changes
- Deprecate `external_url` on `Invoice` GraphQL type in favour of `url`. No ma... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
scipy__scipy-20222@90815ee | scipy/scipy | Python | 20,222 | DOC add likelihood formula to stats.CensoredData | #### Reference issue
Closes #19732
#### What does this implement/fix?
Write the likelihood formula used when ``CensoredData`` is passed to ``fit``. | 2024-03-09T07:43:12Z | DOC: Likelihood function depending on censoring type
### Issue with current documentation:
Hi all!
I am using the CensoredData class introduced in scipy v1.11.0 to model a censored dataset. I think that in the documentation for this class is not very clear which type of censoring is considered, or if there is the... | I believe this is the relevant code:
https://github.com/scipy/scipy/blob/5e4a5e3785f79dd4e8930eed883da89958860db2/scipy/stats/_distn_infrastructure.py#L2308
Since you have the book, please let us know what type this corresponds with.
@gbene, I don't have the Karim and Islam book, but some relevant references that w... | [
{
"body": "### Issue with current documentation:\r\n\r\nHi all!\r\n\r\nI am using the CensoredData class introduced in scipy v1.11.0 to model a censored dataset. I think that in the documentation for this class is not very clear which type of censoring is considered, or if there is the possibility to change the... | 6d59768e634330cf475dc6c67ab18d2cab619199 | {
"head_commit": "90815ee66dad290edb788f6aac8b5f116e24e92a",
"head_commit_message": "DOC add likelihood formula to stats.CensoredData\n\nSee #19732\n\n[docs only]",
"patch_to_review": "diff --git a/scipy/stats/_censored_data.py b/scipy/stats/_censored_data.py\nindex f6fee500f1d9..eca16f1711b3 100644\n--- a/scipy/... | [
{
"diff_hunk": "@@ -115,6 +115,27 @@ class CensoredData:\n to use `uncensored`, `left` and `right` for uncensored, left-censored and\n right-censored observations, respectively.\n \n+ The ``fit`` method of continuous univariate SciPy distributions find\n+ the maximum likelihood estimates by minimi... | b80c4cc442392043608642677380a084a8a1e295 | diff --git a/scipy/stats/_distn_infrastructure.py b/scipy/stats/_distn_infrastructure.py
index d32704cf2326..916b5d74d395 100644
--- a/scipy/stats/_distn_infrastructure.py
+++ b/scipy/stats/_distn_infrastructure.py
@@ -2415,8 +2415,8 @@ def objective(theta, x):
elif method == "mle":
objective = se... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Documentation Updates"
} |
saleor__saleor-14177@edf7217 | saleor/saleor | Python | 14,177 | Order bulk create allow to import archive orders | Fix: https://github.com/saleor/saleor/issues/11720
To enable importing archive orders, we for now we introduce 2 changes to bulk create:
- allow to not provide user at all
- allow to skip variants
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutatio... | 2023-10-04T09:05:19Z | Allow to create Order with arbitrary product lines
### What I'm trying to achieve
I want to create integration that imports orders from another commerce engine to Saleor.
I assume orders are already fulfilled or "archived" at some point (I don't modify them, I only transfer the history)
At the moment Order re... | The [bulkOrderCreate](https://docs.saleor.io/docs/3.x/developer/bulks/bulk-orders) mutation should work in this case, the only thing we would need to change is not requiring a valid variant ID. In Saleor orders and their lines can exist without matching variants in the database, but this mutation requires that. Since t... | [
{
"body": "### What I'm trying to achieve\r\n\r\nI want to create integration that imports orders from another commerce engine to Saleor.\r\n\r\nI assume orders are already fulfilled or \"archived\" at some point (I don't modify them, I only transfer the history)\r\n\r\nAt the moment Order require relation to a... | dc08f06119f5dec7f77a83f24a241af9a2156d0f | {
"head_commit": "edf72179b24ca517c6a265aed421b542e982b648",
"head_commit_message": "add changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 6eaa5da8b1d..95ba723fc2d 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -78,6 +78,11 @@ All notable, unreleased changes to this project will ... | [
{
"diff_hunk": "@@ -1700,7 +1709,13 @@ def create_single_fulfillment(\n )\n return None\n \n- if order_line.line.variant.id != variant.id:\n+ if (\n+ variant\n+ and order_line.line.variant\n+ and order_line.line.v... | 2ec82787f07a24865bdcdc2c2f13008d77b784c9 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6eaa5da8b1d..ed228d58fbf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -80,6 +80,12 @@ All notable, unreleased changes to this project will be documented in this file.
### GraphQL API
+- **Feature preview change**:
+ - Order bulk create allow to import archive orde... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
run-llama__llama_index-9488@708750c | run-llama/llama_index | Python | 9,488 | Support for Nvidia Triton LLM | # Description
This PR includes support for the Nvidia Triton Inference Server LLM. To keep the PR as small as possible it only includes the GRPC client for now and not HTTP (follow up PR to come) and also only supports sync `chat` and `complete` methods while all others are marked as `NotImplemented` for now.
Fix... | 2023-12-13T15:34:31Z | [Feature Request]: Nvidia Triton Tensor RT LLM Integrations
### Feature Description
I would like to add support for Nvidia Triton TensorRT LLMs in llama index. There is currently support for several other LLM endpoints and Nvidia has several interesting offerings with their Triton LLM endpoints that I think others wou... | _🤖_
<!-- Answer -->
It seems like you've got this under control, if you want help or have specific questions, let me know what I can do for you! | [
{
"body": "### Feature Description\n\nI would like to add support for Nvidia Triton TensorRT LLMs in llama index. There is currently support for several other LLM endpoints and Nvidia has several interesting offerings with their Triton LLM endpoints that I think others would find useful in llama_index.\n\n### R... | 9289ef042a9d633e737bf638d959cbf58404a126 | {
"head_commit": "708750c167efdc9016cb5d20ed2118bc806f0d69",
"head_commit_message": "make format auto fixes",
"patch_to_review": "diff --git a/llama_index/llms/__init__.py b/llama_index/llms/__init__.py\nindex 786b6ab6bf..48a13487bc 100644\n--- a/llama_index/llms/__init__.py\n+++ b/llama_index/llms/__init__.py\n@... | [
{
"diff_hunk": "@@ -73,6 +73,7 @@ rank-bm25 = {optional = true, version = \"^0.2.2\"}\n scikit-learn = {optional = true, version = \"*\"}\n spacy = {optional = true, version = \"^3.7.1\"}\n aiostream = \"^0.5.2\"\n+tritonclient = {version = \">=2.39.0\"}",
"line": null,
"original_line": 76,
"origina... | 7d01d066a9d2f4d7ed16f676b0ee4a747ef1bca8 | diff --git a/.gitignore b/.gitignore
index 2313f2f35e..990c18de22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -142,6 +142,9 @@ dmypy.json
modules/
*.swp
+# VsCode
+.vscode
+
# pipenv
Pipfile
Pipfile.lock
diff --git a/docs/examples/llm/nvidia_triton.ipynb b/docs/examples/llm/nvidia_triton.ipynb
new file mode 1006... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-20137@88a27ff | scipy/scipy | Python | 20,137 | ENH: stats.pearsonr: add support for `axis` argument | #### Reference issue
Closes gh-9307
#### What does this implement/fix?
This adds native support for an `axis` argument to `pearsonr`, greatly improving the speed of vectorized calls (e.g. [pairwise comparisons](https://stackoverflow.com/questions/62817623/improve-speed-of-scipy-pearson-correlation-for-many-pairwis... | 2024-02-22T17:34:07Z | feature request: make `scipy.stats.pearsonr` accept 2-D arrays
I'd love to see `scipy.stats.pearsonr` modified to allow 2-D arrays to be passed, with one column per variable and one row per observation. The output would be a pair of 2-D arrays--one for the Pearson correlation coefficient and one for the p-value. Curr... | I know this is probably no more relevant for you, but maybe it could help someone else.
you can convert your data to a pandas dataFrame, and apply the function pandas.DataFrame.corr with parameter method='pearson'. https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html
The only (regret... | [
{
"body": "I'd love to see `scipy.stats.pearsonr` modified to allow 2-D arrays to be passed, with one column per variable and one row per observation. The output would be a pair of 2-D arrays--one for the Pearson correlation coefficient and one for the p-value. Currently, obtaining something like this require... | 65bb18c07795e887803fe65522ce26f4b9a0888f | {
"head_commit": "88a27ff1e18f9afd262255079abf66d7034e4f9a",
"head_commit_message": "MAINT: stats.pearsonr: respect dtype",
"patch_to_review": "diff --git a/scipy/stats/_morestats.py b/scipy/stats/_morestats.py\nindex 8da934504184..13d6824f7461 100644\n--- a/scipy/stats/_morestats.py\n+++ b/scipy/stats/_morestats... | [
{
"diff_hunk": "@@ -4716,106 +4740,138 @@ def pearsonr(x, y, *, alternative='two-sided', method=None):\n than zero which happens in about half of the cases if we sample x and y.\n \n \"\"\"\n- n = len(x)\n- if n != len(y):\n- raise ValueError('x and y must have the same length.')\n+ x = ... | 5cbe4ab884aa9be2ebad3ed4f0626b3fae8b7815 | diff --git a/scipy/stats/_morestats.py b/scipy/stats/_morestats.py
index 8da934504184..13d6824f7461 100644
--- a/scipy/stats/_morestats.py
+++ b/scipy/stats/_morestats.py
@@ -1250,6 +1250,12 @@ def boxcox_normmax(
6.000...
"""
x = np.asarray(x)
+
+ if np.any(~np.isfinite(x) | (x < 0)):
+ messag... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saleor__saleor-14150@6b0076c | saleor/saleor | Python | 14,150 | Add zero downtime support for multiple codes for voucher | Add zero downtime support for https://github.com/saleor/saleor/pull/14123.
Resolves https://github.com/saleor/saleor/issues/13912
<!-- Please mention all relevant issue numbers. -->
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Remo... | 2023-10-02T13:28:44Z | Zerodowntime for VoucherCodes: add new fields + celery task
For 3.17:
- add new fields for voucher code
- add new relation between Order and VoucherCode
- add new relation between VoucherCustomer and VoucherCode
- add celery task that will copy data over from voucher.code to VoucherCode
- add celery task for Order - Vo... | [
{
"body": "For 3.17:\n- add new fields for voucher code\n- add new relation between Order and VoucherCode\n- add new relation between VoucherCustomer and VoucherCode\n- add celery task that will copy data over from voucher.code to VoucherCode\n- add celery task for Order - VoucherCode\n- add celery task for Vou... | 785bc526bb7d2b04d18abb23f9079d8f956297b8 | {
"head_commit": "6b0076cdcc8a19b20cc89dbe6d8e6054a9332882",
"head_commit_message": "Update OrderBulkCreate",
"patch_to_review": "diff --git a/saleor/celeryconf.py b/saleor/celeryconf.py\nindex 2bd58a9cd81..cd30d51fc9d 100644\n--- a/saleor/celeryconf.py\n+++ b/saleor/celeryconf.py\n@@ -33,5 +33,11 @@ def setup_ce... | [
{
"diff_hunk": "@@ -120,12 +121,17 @@ def _process_voucher_data_for_order(checkout_info: \"CheckoutInfo\") -> dict:\n return {}\n \n if voucher.usage_limit:\n- increase_voucher_usage(voucher)\n+ # type-ignore added as we ensure that voucher code instance is created",
"line": null,
... | 40af2893f00c5ba0762d1af04f49c8eaa8b61704 | diff --git a/saleor/celeryconf.py b/saleor/celeryconf.py
index 2bd58a9cd81..cd30d51fc9d 100644
--- a/saleor/celeryconf.py
+++ b/saleor/celeryconf.py
@@ -33,5 +33,11 @@ def setup_celery_logging(loglevel=None, **kwargs):
],
related_name="saleor3_17",
)
+app.autodiscover_tasks(
+ packages=[
+ "saleor.... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
scipy__scipy-19923@5872794 | scipy/scipy | Python | 19,923 | ENH: stats.mannwhitneyu: replace exact p-value calculation | #### Reference issue
gh-4933
Closes gh-17559
#### What does this implement/fix?
https://github.com/scipy/scipy/pull/4933#issuecomment-1898082691 suggested a different algorithm for the `mannwhitneyu` exact p-value calculation that greatly improves performance (e.g. factor of 675 for $m \approx n \approx 100$) and... | 2024-01-20T09:18:18Z | ENH: _mannwhitneyu.py computation of exact MWU statistics may be simplified
### Describe your issue.
This is not really a bug but an invitation for improvement and simplification. Imho the _MWU class in _mannwhitneyu.py may be abolished.
In pmf_recursive() or pmf_iterative() a 3-dimensional array is used, which store... | [
{
"body": "### Describe your issue.\n\nThis is not really a bug but an invitation for improvement and simplification. Imho the _MWU class in _mannwhitneyu.py may be abolished.\r\nIn pmf_recursive() or pmf_iterative() a 3-dimensional array is used, which stores fmnk s for all combinations of m, n, k i.e. stores ... | a160e856a3f7684402ae0f4b9463417f75741e56 | {
"head_commit": "587279478363ff6ce51ea069d2edb4c11d0d7c30",
"head_commit_message": "MAINT: stats.mannwhitneyu: fix CI test failure",
"patch_to_review": "diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py\nindex a796edf075e7..77c7b27f8bc5 100644\n--- a/scipy/stats/_mannwhitneyu.py\n+++ b/sci... | [
{
"diff_hunk": "@@ -35,143 +50,100 @@ def pmf(self, k, m, n):\n # i = k2 < k\n # k[i] = k2[i]\n \n- if (self._recursive is None and m <= 500 and n <= 500\n- or self._recursive):\n- return self.pmf_recursive(k, m, n)\n- else:\n- return self.pmf_i... | 9d9e4508289f80abe92c7106c5a83f4a2b85e417 | diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py
index a796edf075e7..bfc291560fde 100644
--- a/scipy/stats/_mannwhitneyu.py
+++ b/scipy/stats/_mannwhitneyu.py
@@ -19,14 +19,29 @@ def _broadcast_concatenate(x, y, axis):
class _MWU:
'''Distribution of MWU statistic under the null hypothesi... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
scipy__scipy-20017@9a85d03 | scipy/scipy | Python | 20,017 | BUG: loglaplace moment should be non-negative. | The current implementation of scipy.stats.loglaplace.moments incorrectly returns a negative number when the requested moment does not exist. This commit fixes this bug and correctly returns np.inf instead.
A test case is added for parameter combinations that lead to non-finite moments. Non-central moment is allowed ... | 2024-02-03T08:02:25Z | BUG: scipy.stats.loglaplace may return negative moments
### Describe your issue.
When the $r$-th moment of `scipy.stats.LogLaplace` diverges, the moment function returns a negative number instead.
The error is due to the `_munp` method not checking arguments. The fix is to return `np.inf` when |r|>=c.
### Reproduc... | [
{
"body": "### Describe your issue.\n\nWhen the $r$-th moment of `scipy.stats.LogLaplace` diverges, the moment function returns a negative number instead.\r\n\r\nThe error is due to the `_munp` method not checking arguments. The fix is to return `np.inf` when |r|>=c.\n\n### Reproducing Code Example\n\n```python... | fe967c70d783197511e1b0d45a0c34e0f1b5f8ba | {
"head_commit": "9a85d0357a570b91dca9c0ded65df8fbb9fb732b",
"head_commit_message": "BUG: loglaplace moment should be non-negative.\n\nThe current implementation of scipy.stats.loglaplace.moments incorrectly\nreturns a negative number when the requested moment does not exist. This\ncommit fixes this bug and correct... | [
{
"diff_hunk": "@@ -6373,7 +6373,9 @@ def _isf(self, q, c):\n return np.where(q > 0.5, (2.0*(1.0 - q))**(1.0/c), (2*q)**(-1.0/c))\n \n def _munp(self, n, c):\n- return c**2 / (c**2 - n**2)\n+ # Return inf if abs(n) >= c\n+ with np.errstate(divide='ignore'):\n+ return ... | 9316db22944cc99de773de403a0207afd7296898 | diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py
index 779077fb8c1a..6e23727fa973 100644
--- a/scipy/stats/_continuous_distns.py
+++ b/scipy/stats/_continuous_distns.py
@@ -6373,7 +6373,9 @@ def _isf(self, q, c):
return np.where(q > 0.5, (2.0*(1.0 - q))**(1.0/c), (2*q)**(-1.0/... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-13786@56a19fc | saleor/saleor | Python | 13,786 | Add missing currency in action for transaction requests | I want to merge this change because it resolves #13725
<!-- Please mention all relevant issue numbers. -->
# Impact
- [ ] New migrations
- [ ] New/Updated API fields or mutations
- [ ] Deprecated API fields or mutations
- [ ] Removed API types, fields, or mutations
# Docs
<!-- Docs are stored in a sep... | 2023-08-24T20:13:22Z | Missing `currency` in action for transaction requests
## Problem
I want to easily fetch the currency when processing the webhooks like `TransactionChargeRequested`. Currently `action` doesn't have a ` currency` field. It means that I need to additionally fetch `transactions` to get a correct `currency`.
<!-- Desc... | [
{
"body": "## Problem\r\n\r\nI want to easily fetch the currency when processing the webhooks like `TransactionChargeRequested`. Currently `action` doesn't have a ` currency` field. It means that I need to additionally fetch `transactions` to get a correct `currency`.\r\n\r\n<!-- Describe what you are trying to... | ac3e7b4bd2feded5220f21f847f69ea52e8113c7 | {
"head_commit": "56a19fc94f4c43d9673af1c486798cfec691641f",
"head_commit_message": "Add missing currency in action for transaction requests",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex a3565acbe5c..dc29ef6d185 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -21,6 +21,7 @@ in 3.17. Use... | [
{
"diff_hunk": "@@ -1599,6 +1599,7 @@ class TransactionAction(SubscriptionObjectType, AbstractType):\n amount = PositiveDecimal(\n description=\"Transaction request amount. Null when action type is VOID.\",\n )\n+ currency = graphene.String(description=\"Currency code.\")",
"line": null,
... | b62635bc2246c27b3d901592b0722b25579a826f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b2d96a2ba9..b46eff20eb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ in 3.17. Use `PaymentSettings.defaultTransactionFlowStrategy` instead.
### Other changes
- Fix error in variant available stock calculation - 13593 by @awaisdar001
+- Add missing cu... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
scipy__scipy-19781@eb1dfb8 | scipy/scipy | Python | 19,781 | CI, MAINT: switch to stable python release | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2023-12-31T09:15:23Z | CI, MAINT: some easy cleanups for Python version
Just glancing at the CI config code flanking the diffs in a few recent PRs, you can see some places where switching to the stable release makes sense: `git grep -E -i -P "3\.\d[2]-dev"`
```
.github/workflows/linux_meson.yml: python-version: ['3.10', '3.12-dev'... | If this is changed could we have a comment saying something along the lines of "these are the runs which would use python dev versions"? So we know which ones to use for 3.13-dev
Good point, dealing with CPython pre-releases is clearly the purpose of that job, and it even excludes running on maintenance branches, so is... | [
{
"body": "Just glancing at the CI config code flanking the diffs in a few recent PRs, you can see some places where switching to the stable release makes sense: `git grep -E -i -P \"3\\.\\d[2]-dev\"`\r\n\r\n```\r\n.github/workflows/linux_meson.yml: python-version: ['3.10', '3.12-dev']\r\n.github/workflo... | ae3ca70a72ef04547fbc28501009246cef5ee6c8 | {
"head_commit": "eb1dfb833b55b260b71591beb4f9da13b779db18",
"head_commit_message": "Update linux_meson.yml",
"patch_to_review": "diff --git a/.github/workflows/linux_meson.yml b/.github/workflows/linux_meson.yml\nindex 36ecf637a3ff..584f2ef9b4dd 100644\n--- a/.github/workflows/linux_meson.yml\n+++ b/.github/work... | [
{
"diff_hunk": "@@ -36,12 +36,12 @@ jobs:\n runs-on: ubuntu-22.04\n strategy:\n matrix:\n- python-version: ['3.10', '3.12-dev']\n+ python-version: ['3.10', '3.12'] # these are the runs which would use python dev versions",
"line": null,
"original_line": 39,
"original_star... | 659ef6c86c438d262d447400554b7597568f6b0c | diff --git a/.github/workflows/linux_meson.yml b/.github/workflows/linux_meson.yml
index 36ecf637a3ff..8566b078d7c0 100644
--- a/.github/workflows/linux_meson.yml
+++ b/.github/workflows/linux_meson.yml
@@ -36,12 +36,12 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
- python-version: ['3.10', ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Dependency Updates & Env Compatibility"
} |
saleor__saleor-13436@cd96898 | saleor/saleor | Python | 13,436 | Update last_login on various auth flows | I want to merge this change because it updates `last_login` on authentication flows across saleor.
Resolves https://github.com/saleor/saleor/issues/13435
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] Deprecated API fields or... | 2023-07-17T10:24:18Z | externalRefresh (token) mutation does not update the user last_login
### What are you trying to achieve?
Make the user last_login updated when using token related mutations because other mechanisms depends on it.
### Steps to reproduce the problem
Ex. Use externalRefresh mutation. Watch the token is issued but... | [
{
"body": "### What are you trying to achieve?\r\n\r\nMake the user last_login updated when using token related mutations because other mechanisms depends on it.\r\n\r\n### Steps to reproduce the problem\r\n\r\nEx. Use externalRefresh mutation. Watch the token is issued but user `last_login` is not updated.\r\n... | c790f4702f2f22efb9f62a3aff92ad7ce90fd032 | {
"head_commit": "cd968980aef6e7395ca03df6ea3af81395f635a1",
"head_commit_message": "Fix openid connect",
"patch_to_review": "diff --git a/saleor/graphql/account/mutations/authentication/external_refresh.py b/saleor/graphql/account/mutations/authentication/external_refresh.py\nindex 4a96bf6751f..f378b37d34c 10064... | [
{
"diff_hunk": "@@ -457,9 +457,13 @@ def _update_user_details(\n fields_to_save.append(\"email\")\n if last_login:\n if not user.last_login or user.last_login.timestamp() < last_login:\n- login_time = make_aware(datetime.fromtimestamp(last_login))\n+ login_time = timezo... | 7eb5a68f7e55c4b2ce5c913c8e780be871e37259 | diff --git a/saleor/graphql/account/mutations/authentication/external_refresh.py b/saleor/graphql/account/mutations/authentication/external_refresh.py
index 4a96bf6751f..f378b37d34c 100644
--- a/saleor/graphql/account/mutations/authentication/external_refresh.py
+++ b/saleor/graphql/account/mutations/authentication/ext... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
scipy__scipy-19749@e8fdbfe | scipy/scipy | Python | 19,749 | ENH: stats.mannwhitneyu: vectorize statistic calculation | #### Reference issue
Closes gh-19642
#### What does this implement/fix?
gh-19642 asked to speed up `stats.mannwhitneyu`. The bottleneck there appeared to be computation of the statistic itself (whereas in gh-19692 the problem was with the exact p-value). This PR vectorizes the calculation of data ranks and compute... | 2023-12-24T01:36:51Z | Speeding up Mann-Whitney U-Test
The current Mann-Whitney U-Test is very fast, but it's still slow for large datasets. As there are tens of CPU for some servers, is it possible to speed up using some high performance techinques such as multi-threading and paralleling to use more CPUs on the server. | > The current Mann-Whitney U-Test is very fast
Thanks for noticing!
> is it possible to speed up...?
There are a few things I know offhand, like there is at least a factor of two in the calculation of exact p-values, and the ranking calculation is not natively vectorized. But which answer is relevant depends o... | [
{
"body": "\r\nThe current Mann-Whitney U-Test is very fast, but it's still slow for large datasets. As there are tens of CPU for some servers, is it possible to speed up using some high performance techinques such as multi-threading and paralleling to use more CPUs on the server.\r\n\r\n",
"number": 1964... | c77938cd5efc24c0a87867dbd5a37b85889e19cd | {
"head_commit": "e8fdbfe477205a3371b15a987cdec59d48e100cb",
"head_commit_message": "MAINT: stats.mannwhitneyu: use new _rankdata",
"patch_to_review": "diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py\nindex 342eccbacf87..abbc25ecda59 100644\n--- a/scipy/stats/_mannwhitneyu.py\n+++ b/scipy... | [
{
"diff_hunk": "@@ -471,14 +456,14 @@ def mannwhitneyu(x, y, use_continuity=True, alternative=\"two-sided\",\n \n n1, n2 = x.shape[-1], y.shape[-1]\n \n- if method == \"auto\":\n- method = _mwu_choose_method(n1, n2, xy, method)\n-\n # Follows [2]\n- ranks = stats.rankdata(xy, axis=-1) # me... | 269673d30af06a14354f5dabf88c21673e607c04 | diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py
index 342eccbacf87..65b72afe5dbb 100644
--- a/scipy/stats/_mannwhitneyu.py
+++ b/scipy/stats/_mannwhitneyu.py
@@ -2,6 +2,7 @@
from collections import namedtuple
from scipy import special
from scipy import stats
+from scipy.stats._stats_py impor... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
saleor__saleor-13368@017f9c2 | saleor/saleor | Python | 13,368 | Delete event deliveries in batches | This is a port of changes from #13246 since we decided to merge it to main instead of 3.9.
I want to merge this change because it adds batches to event deliveries delete task. Fixes https://github.com/saleor/saleor/issues/13235
I'm switching back to using django delete() instead od raw SQL query (which was introduc... | 2023-07-10T15:42:34Z | Handle event deliveries delete in batches
Event deliveries, event delivery attempts and payloads are deleted in a `delete_event_payloads_task` without using batches.
This should be done in batches as it can lead to timeouts on db in case of large number of event delivery fails in two weeks period. | [
{
"body": "Event deliveries, event delivery attempts and payloads are deleted in a `delete_event_payloads_task` without using batches.\nThis should be done in batches as it can lead to timeouts on db in case of large number of event delivery fails in two weeks period.",
"number": 13235,
"title": "Handle... | ce277f9b106dfafc08c75bd25e62f9652d310fd3 | {
"head_commit": "017f9c299812983d8383a8f3a5d314b3a3ad46c4",
"head_commit_message": "fix linters",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2b870aec097..0416847b34e 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -98,6 +98,7 @@ All notable, unreleased changes to this project will be ... | [
{
"diff_hunk": "@@ -16,18 +21,15 @@ def delete_from_storage_task(path):\n @app.task\n def delete_event_payloads_task():\n delete_period = timezone.now() - settings.EVENT_PAYLOAD_DELETE_PERIOD\n- deliveries = EventDelivery.objects.filter(created_at__lte=delete_period)\n- attempts = EventDeliveryAttempt... | 2ba58d529b49699c1248cd0334d165562eb5aa89 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7fd98c328b1..e4be216db36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -103,6 +103,7 @@ Shipping methods can be removed by the user after it has been assigned to a chec
- Add missing descriptions to Product module. - #13259 by @FremahA
- Add missing description for Inv... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} | |
scipy__scipy-19744@bcb7583 | scipy/scipy | Python | 19,744 | ENH: stats.mannwhitneyu: speed improvement, memory reduction, and `PermutationMethod` support | #### Reference issue
Closes gh-19692
#### What does this implement/fix?
gh-19692 reported high memory consumption in the `stats.mannwhitneyu` p-value calculation. Several improvements were suggested in https://github.com/scipy/scipy/issues/19692#issuecomment-1863311504. This implements most of those improvement id... | 2023-12-23T07:19:54Z | BUG: memory issues in mannwhitneyu with unbalanced data
### Describe your issue.
One of our pipelines calls the `mannwhitneyu` method using the "two-sided" alternative. We've noticed that the method can consume a substantial amount of RAM. For example, in a call with a total of 17,002 values the `mannwhitneyu` call... | Like many SciPy functions, `mannwhitneyu` doesn't consider the memory limitations of your machine when deciding which method to use. If either of the two samples has fewer than 8 observations, and `method='auto'` (the default), it still chooses the exact method, which can consume large amounts of memory. You can select... | [
{
"body": "### Describe your issue.\r\n\r\nOne of our pipelines calls the `mannwhitneyu` method using the \"two-sided\" alternative. We've noticed that the method can consume a substantial amount of RAM. For example, in a call with a total of 17,002 values the `mannwhitneyu` call peaks at nearly 24GB of RAM.\r... | ccee92ebe3c215319e77893bfdb33ec4593c09ff | {
"head_commit": "bcb7583d7cb20c9fd1110c00a0d9feefe022cb36",
"head_commit_message": "MAINT: stats.mannwhitneyu: minor adjustments",
"patch_to_review": "diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py\nindex 342eccbacf87..99fb78cad3e4 100644\n--- a/scipy/stats/_mannwhitneyu.py\n+++ b/scipy... | [
{
"diff_hunk": "@@ -304,6 +321,10 @@ def mannwhitneyu(x, y, use_continuity=True, alternative=\"two-sided\",\n is less than or equal to 8 and there are no ties;\n chooses ``'asymptotic'`` otherwise.\n \n+ `method` may also be an instance of `stats.PermutationMethod`, in which",
"li... | c7893feeb21ca933a1f2521cf920323986a079f6 | diff --git a/scipy/stats/_mannwhitneyu.py b/scipy/stats/_mannwhitneyu.py
index 342eccbacf87..715708e5a105 100644
--- a/scipy/stats/_mannwhitneyu.py
+++ b/scipy/stats/_mannwhitneyu.py
@@ -26,6 +26,14 @@ def __init__(self):
self._recursive = None
def pmf(self, k, m, n):
+
+ # In practice, `pmf` is ... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scipy__scipy-19723@5867a4c | scipy/scipy | Python | 19,723 | ENH, MAINT: voronoi_plot_2d nicer inf lines | * Fixes #19653
* we currently set the plotted length of infinitely-long Voronoi edges as a function of the largest x-or-y Voronoi generator range; in cases where the range of one axis is substantially larger than the other, it seems that we can produce a more appealing representation of the infinitely-long line by a... | 2023-12-20T22:30:54Z | ENH: Voronoi diagram gives unexpected results from scipy.spatial
### Describe your issue.
When I try to plot the Voronoi diagram using the scipy.spatial, the results show (please see in the reproducing code example section), insstead of getting 5 areas, I am getting 4, even though I provide 5 points in the 2D space. M... | Two potential problems I'm seeing here:
1. When I try to run the reproducing code I get:
```
Traceback (most recent call last):
File "/Users/treddy/rough_work/test.py", line 19, in <module>
centers_dt[['d', 'p']]
^^^^^^^^^^
NameError: name 'centers_dt' is not defined
```
2. You're using SciPy `... | [
{
"body": "### Describe your issue.\n\nWhen I try to plot the Voronoi diagram using the scipy.spatial, the results show (please see in the reproducing code example section), insstead of getting 5 areas, I am getting 4, even though I provide 5 points in the 2D space. Moreover the space separation seems to be a b... | b3ba73a1526441824935e0c3d424415892bec84a | {
"head_commit": "5867a4caddfba17f3cee4596f8298f7941d6171b",
"head_commit_message": "ENH, MAINT: voronoi_plot_2d nicer inf lines\n\n* Fixes #19653\n\n* we currently set the plotted length of infinitely-long\nVoronoi edges as a function of the largest x-or-y Voronoi\ngenerator range; in cases where the range of one ... | [
{
"diff_hunk": "@@ -46,9 +42,29 @@ def test_convex_hull(self):\n # Smoke test\n fig = plt.figure()\n tri = ConvexHull(self.points)\n- with suppress_warnings() as sup:\n- # filter can be removed when matplotlib 1.x is dropped\n- sup.filter(message=\"The ishold... | 1af49500820d1d05c8346b7cb2ec16d9efdd1090 | diff --git a/scipy/spatial/_plotutils.py b/scipy/spatial/_plotutils.py
index 7aa99889330d..9e7e0998a5a7 100644
--- a/scipy/spatial/_plotutils.py
+++ b/scipy/spatial/_plotutils.py
@@ -249,7 +249,8 @@ def voronoi_plot_2d(vor, ax=None, **kw):
direction = np.sign(np.dot(midpoint - center, n)) * n
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-13230@a2c47ff | saleor/saleor | Python | 13,230 | Added metadata for channels | I want to merge this change because it will support metadata for channels
it resolves #13228
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
* [ ] Removed API types, fields, or mutations
*... | 2023-06-29T08:25:40Z | Add metadata support to channels
Extend the `Channel` type with `ObjectWithMetadata` interface to add support for metadata in channels. See other types that use this interface for reference implementation.
Use case:
Useful for storing channel level configuration, for apps, logistics, languages, localization etc. | [
{
"body": "Extend the `Channel` type with `ObjectWithMetadata` interface to add support for metadata in channels. See other types that use this interface for reference implementation.\r\n\r\nUse case:\r\nUseful for storing channel level configuration, for apps, logistics, languages, localization etc.",
"num... | d4d2f1e12b0e8e7272c5710383800b35b779a1a6 | {
"head_commit": "a2c47ffe6652a82afb1567faf7d498cfda208e64",
"head_commit_message": "Added metadata to ChannelInput and updated the changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 0931c88c735..f4cfab11959 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -29,6 +29,7 @@ All notable... | [
{
"diff_hunk": "@@ -125,6 +128,16 @@ class ChannelInput(BaseInputObjectType):\n description=\"The channel order settings\" + ADDED_IN_312,\n required=False,\n )\n+ metadata = common_types.NonNullList(\n+ MetadataInput,\n+ description=\"Channel public metadata.\" + ADDED_IN_3... | 389059b2c0bc96571f387a620def15bcdfffaa14 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d4f37a4f92..7798a749a39 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -63,6 +63,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Deprecate `Order.trackingClientId` field - #13146 by @SzymJ
- Fix error "Cannot return null for non-... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
saleor__saleor-13156@26d17e2 | saleor/saleor | Python | 13,156 | Drop translation proxy | Issue: https://github.com/saleor/saleor/issues/13143
I want to merge this change, because TranslationProxy is no longer useful as we don't rely on localisation middleware. Any references to the translated property should be fixed to return proper translation in the current context, ie. for checkout and order usages ... | 2023-06-21T13:58:00Z | Drop TranslationProxy
Drop the `TranslationProxy`, which is no longer useful as we don't rely on localization middleware. Any references to the `translated` property should be fixed to return proper translation in the current context. For checkout and order usages we should rely on `language_code` that can be set by mu... | [
{
"body": "Drop the `TranslationProxy`, which is no longer useful as we don't rely on localization middleware. Any references to the `translated` property should be fixed to return proper translation in the current context. For checkout and order usages we should rely on `language_code` that can be set by mutat... | b1b673819007af0f9fee83b60723ec52495661f8 | {
"head_commit": "26d17e22cb152eee110196bb1fca7d17867bba36",
"head_commit_message": "Update changelog.",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b1f3fa4b7b1..d7df111ac0c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -20,6 +20,8 @@ All notable, unreleased changes to this project wi... | [
{
"diff_hunk": "@@ -620,9 +620,10 @@ def recalculate_checkout_discount(\n else discount\n )\n checkout.discount_name = voucher.name\n+ language_code = checkout.language_code\n checkout.translated_discount_name = (\n- voucher.translate... | f9fe6236c081e6f57575b37240b0f31debf481d0 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1f3fa4b7b1..d7df111ac0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,8 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix Error Cannot return null for non-nullable field Webhook.name. - #12989 by @cyborg7898
- Remove u... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
saleor__saleor-13173@76fb2fe | saleor/saleor | Python | 13,173 | Add `search` to giftcard query | Issue: https://github.com/saleor/saleor/issues/13082
I want to merge this change, because I want to add full text search to `giftCards` query.
<!-- Please mention all relevant issue numbers. -->
# Impact
* [x] New migrations
* [x] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
... | 2023-06-23T10:17:18Z | Search query for giftcards
## Problem
Customer support needs to able to find gift cards by the name or email of customers.
`usedBy` filter field doesn't help as it only accepts IDs of existing accounts, which doesn't cover anonymous users.
Another pain point is that admins want to use generic search that acce... | - `GiftCard` model changes:
- Add `search_index_dirty = models.BooleanField(default=False, db_index=True)` field
- Add `search_vector = SearchVectorField(blank=True, null=True)` field.
- Fields to include in the search vector:
- `GiftCard.code`
- `GiftCard.used_by_email`
- `GiftCard.crea... | [
{
"body": "## Problem\r\n\r\nCustomer support needs to able to find gift cards by the name or email of customers. \r\n\r\n`usedBy` filter field doesn't help as it only accepts IDs of existing accounts, which doesn't cover anonymous users.\r\n\r\nAnother pain point is that admins want to use generic search that ... | da174ddc1886c5553cc25466982ac63b00971bec | {
"head_commit": "76fb2feb26e75227ad920efa4b480f079efc2078",
"head_commit_message": "Config celery task.",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex ac094f22768..3c8039d3766 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -21,6 +21,7 @@ All notable, unreleased changes to this project ... | [
{
"diff_hunk": "@@ -49,6 +50,11 @@ class GiftCardQueries(graphene.ObjectType):\n filter=GiftCardFilterInput(\n description=(\"Filtering options for gift cards.\" + ADDED_IN_31)\n ),\n+ search=graphene.String(\n+ description=\"Look up gift cards by multiple fields.\"... | e2e47755b819d9c774513ba0adf5a97d2f52267e | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 31b594ce9da..bea4ecbd813 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -65,6 +65,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Added `GiftCardFilterInput.createdByEmail` filter - #13132 by @Smit-Parmar
- Remove `Preview feature... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saleor__saleor-13019@b9544a0 | saleor/saleor | Python | 13,019 | Allow to add a gift card to a checkout without email | I want to merge this change because it allows user to use a gift card code on a checkout without an email address.
Wider context in issue https://github.com/saleor/saleor/issues/12997
Resolves https://github.com/saleor/saleor/issues/12997
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New... | 2023-06-05T11:05:52Z | Allowing use of gift cards without checkout email
## Problem
Currently, to use a gift card code during checkout, the checkout instance must have an assigned email. If the email is not set, a validation error is returned when adding a gift card code. This requirement is in place to ensure that the provided gift card ... | [
{
"body": "## Problem\r\n\r\nCurrently, to use a gift card code during checkout, the checkout instance must have an assigned email. If the email is not set, a validation error is returned when adding a gift card code. This requirement is in place to ensure that the provided gift card is not owned by someone els... | f4617a81e77e60b0df4c7cc16e76f43719088c4e | {
"head_commit": "b9544a09a7a2fe739cb6192a106ea5e90b84cf4c",
"head_commit_message": "Drop rules of user validation on gift cards and fix tests accordingly",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 05613783bf8..d5f1468b40c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,6 +7,7 @@ ... | [
{
"diff_hunk": "@@ -7,6 +7,7 @@ All notable, unreleased changes to this project will be documented in this file.\n ### Breaking changes\n \n - `path` field for errors related with product variants input in `ProductBulkCreate` will return more detailed paths: `variants.1.stocks.0.warehouse` instead of `variants.... | c5e633005c84e29323d52a0ff225d87ccd82916e | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04a649fc3f6..389774c2894 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ All notable, unreleased changes to this project will be documented in this file.
### Breaking changes
+- Gift cards can now be applied on a checkout without an email, fields `used_... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
scipy__scipy-19408@7b6dc44 | scipy/scipy | Python | 19,408 | BUG: Fix typecasting problem in scipy.sparse.lil_matrix truediv | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2023-10-19T14:28:28Z | BUG: scipy.sparse.lil_matrix division by complex number leads to inconsistent behavior
### Describe your issue.
When dividing a `scipy.sparse.lil_array` by a complex number, and subsequently trying to convert it to `scipy.sparse.csr_array`, a `TypeError` is raised during the conversion.
The same does not happen f... | Hi @dschult!
Thanks for the quick reply and the proposed solutions. IMO the first option seems alright and avoids unnecessary conversions to and from CSR.
I'll open a PR with your proposed changes. | [
{
"body": "### Describe your issue.\r\n\r\nWhen dividing a `scipy.sparse.lil_array` by a complex number, and subsequently trying to convert it to `scipy.sparse.csr_array`, a `TypeError` is raised during the conversion.\r\n\r\nThe same does not happen for other sparse matrix types.\r\n\r\n### Reproducing Code Ex... | 9a5bc10655c066be6ee92157303217ce875bdbab | {
"head_commit": "7b6dc44946a629b010a2e890d306d6833b435eaa",
"head_commit_message": "Fix typecasting problem",
"patch_to_review": "diff --git a/scipy/sparse/_lil.py b/scipy/sparse/_lil.py\nindex d0323a9c2297..deff7aa9e0aa 100644\n--- a/scipy/sparse/_lil.py\n+++ b/scipy/sparse/_lil.py\n@@ -287,6 +287,10 @@ def _mu... | [
{
"diff_hunk": "@@ -287,6 +287,10 @@ def _mul_scalar(self, other):\n def __truediv__(self, other): # self / other\n if isscalarlike(other):\n new = self.copy()\n+ new_dtype = np.result_type(self.dtype, np.array(other).dtype)\n+ if new_dtype != self.dtype:\... | 3447c369d5685033600d66c4e1e8252c8f2703d2 | diff --git a/scipy/sparse/_lil.py b/scipy/sparse/_lil.py
index d0323a9c2297..b55900103861 100644
--- a/scipy/sparse/_lil.py
+++ b/scipy/sparse/_lil.py
@@ -287,6 +287,7 @@ def _mul_scalar(self, other):
def __truediv__(self, other): # self / other
if isscalarlike(other):
new = self.co... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-12855@e8cb04e | saleor/saleor | Python | 12,855 | Added custom price to OrderLine. | I want to merge this change because it resolves https://github.com/saleor/saleor/issues/12777
The `OrderLineCreateInput` is extended with the optional price field `price`: PositiveDecimal, so the custom price could be set in the following mutation:
`DraftOrderCreate`
`orderLinesCreate`
<!-- Please mention all r... | 2023-05-18T10:29:06Z | Add Field price to the OrderLineCreateInput to add custom price to the order line
Right now in Saleor there is a mutation to add product to the checkout called checkouLinesAdd.
This mutation has argument called lines, in lines there is a possibility to add variants by their id and there is also possibility to add cust... | ### 1. API changes
## Mutations
Add new field `price` to OrderLineCreateInput
```
input OrderLineCreateInput @doc(category: "Orders") {
quantity: Int!
variantId: ID!
forceNewLine: Boolean = false
price: PositiveDecimal
}
```
### 2. Database changes
Add `price_override` to the `OrderLine` model... | [
{
"body": "Right now in Saleor there is a mutation to add product to the checkout called checkouLinesAdd.\r\nThis mutation has argument called lines, in lines there is a possibility to add variants by their id and there is also possibility to add custom price of this item.\r\nWe have the case that we need to wo... | ce3f535366e3e58a8e46a374121b9f17b4780487 | {
"head_commit": "e8cb04e703ff84913271a40f8715f2ac0a1897f0",
"head_commit_message": "fix.",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 83306e99fc6..3d6b367d07f 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -48,6 +48,7 @@ All notable, unreleased changes to this project will be documen... | [
{
"diff_hunk": "@@ -715,6 +715,11 @@ class OrderLine(ModelObjectType[models.OrderLine]):\n \"permissions to access.\" + ADDED_IN_39\n ),\n )\n+ price_override = graphene.Field(",
"line": null,
"original_line": 718,
"original_start_line": null,
"path": "saleor/graphql/o... | 80bc912d40c53205b0d9743014c879646f8dd59c | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f54749a86d0..e41c7bccd4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Upgrade checkout `complete_checkout` to assign guest checkout to account if exists - #12758 by @Frema... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-19335@6b20a32 | scipy/scipy | Python | 19,335 | BUG: fix pow method for sparrays with power zero | Even after the fix #16430 fixed #15948 so the sparse array ** operator matches numpy **, they don't match when the power is `0`. The result of `A ** 0` is `np.ones(A.shape)` for a ndarray, but sparse arrays set `A ** 0` to ones only for originally non-zero values. Thus
```python
A = sp.sparse.csr_array([[0,2,-3]])
... | 2023-10-01T21:50:46Z | BUG: Power operator behaviour for sparse arrays
### Describe your issue.
Currently, applying the `**` operator to a sparse array implements the `numpy.linalg.matrix_power` function. This is not compatible with the `np.array` implementation of `**`, which does element-wise power. This should be fixed as part of the mig... | My duplicate issue (#15950) is closed, but there is a slight difference which might be important for you, so I just want to comment here.
This issue is for sparse arrays, and the same problem occurs also with the sparse matrices (which, I guess, is no longer supported ?)
```python
import scipy.sparse as sp
som... | [
{
"body": "### Describe your issue.\n\nCurrently, applying the `**` operator to a sparse array implements the `numpy.linalg.matrix_power` function. This is not compatible with the `np.array` implementation of `**`, which does element-wise power. This should be fixed as part of the migration from sparse \"matric... | 166e1f2b1ea0a1a2c3d7b030bd829549f8a5844a | {
"head_commit": "6b20a3241429f9f6f9b3f2d183e3728c54987926",
"head_commit_message": "fix pow method for sparrays with power 0\n\nA**0 means every entry is 1, not just the originally non-zero entries.\nSo, the A**x function changes the nonzero structure to dense in a\ndiscontinuous fashion near x=0. There is a quest... | [
{
"diff_hunk": "@@ -140,10 +140,16 @@ def test_matmul(A):\n assert np.all((A @ A.T).todense() == A.dot(A.T).todense())\n \n \n-@parametrize_square_sparrays\n-def test_pow(B):\n- assert isinstance((B**0), scipy.sparse.sparray), \"Expected array, got matrix\"\n- assert isinstance((B**2), scipy.sparse.sp... | 17a639e9e1fd4317d4a13119df1f52c8475161a8 | diff --git a/scipy/sparse/_data.py b/scipy/sparse/_data.py
index 87e5f6534e38..fe9088461974 100644
--- a/scipy/sparse/_data.py
+++ b/scipy/sparse/_data.py
@@ -107,12 +107,25 @@ def power(self, n, dtype=None):
Parameters
----------
- n : n is a scalar
+ n : scalar
+ n is a no... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-13159@25829f6 | saleor/saleor | Python | 13,159 | Unify country fetching | I want to merge this change because it unifies how active country is fetched for orders and checkouts.
Country code is fetched in the following order:
1. shipping address
2. billing address
3. default country from channel
fixes #13140
the function used to unify this can also be used with address data from mu... | 2023-06-22T09:03:07Z | Unify fetching addresses for checkouts and orders
Review the logic for patterns used to get users' address or their parts in the logic and possibly unify them to follow the same rules. One example is `get_tax_country`, which follows this logic:
- get the country from the shipping address if it exists and shipping is ... | [
{
"body": "Review the logic for patterns used to get users' address or their parts in the logic and possibly unify them to follow the same rules. One example is `get_tax_country`, which follows this logic: \r\n- get the country from the shipping address if it exists and shipping is required\r\n- get the country... | 961f8b3c180d9dd0cace56276b06e690c39bfcd8 | {
"head_commit": "25829f6b9e03434fa33669bbedac6edb16127df8",
"head_commit_message": "remove commented code",
"patch_to_review": "diff --git a/saleor/core/utils/country.py b/saleor/core/utils/country.py\nnew file mode 100644\nindex 00000000000..c86a4d648da\n--- /dev/null\n+++ b/saleor/core/utils/country.py\n@@ -0,... | [
{
"diff_hunk": "@@ -0,0 +1,33 @@\n+from typing import Any, Dict, Optional\n+\n+from saleor.account.models import Address\n+from saleor.channel.models import Channel",
"line": null,
"original_line": 4,
"original_start_line": 3,
"path": "saleor/core/utils/country.py",
"start_line": null,
"... | 0072dd355e149fa59b6f2be6d0b90747792225a1 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac094f22768..77cee807a13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,12 @@ All notable, unreleased changes to this project will be documented in this file.
- `ProductPricingInfo.priceRangeLocalCurrency`
- `VariantPricingInfo.discountLocalCurrency`
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
saleor__saleor-12758@98b4394 | saleor/saleor | Python | 12,758 | Associate guest checkout with account if exists | I want to merge this change because it fixes associating guest checkout emails with an account if it exists.
It fixes #12443
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
* [ ] Removed API... | 2023-05-05T15:06:36Z | Associate guest checkout with an account if it exists
### What I'm trying to achieve
I have an active customer account at Saleor. When I place an order as a guest but use my account's email, the order is not associated with the account. If the email is confirmed (email confirmation is enabled), my order should be auto... | [
{
"body": "### What I'm trying to achieve\r\nI have an active customer account at Saleor. When I place an order as a guest but use my account's email, the order is not associated with the account. If the email is confirmed (email confirmation is enabled), my order should be automatically associated with my acco... | e0d2fcda1761f34f34014420bb4a1183f0c26bde | {
"head_commit": "98b4394fb853a3a95f681dc51b75a8fa19190220",
"head_commit_message": "changelog edit",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex ddaf93a2ccc..883a1908f5b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -38,6 +38,7 @@ All notable, unreleased changes to this project will ... | [
{
"diff_hunk": "@@ -0,0 +1,53 @@\n+import pytest\n+from unittest import mock\n+from saleor.checkout.complete_checkout import complete_checkout\n+from saleor.channel import MarkAsPaidStrategy\n+from ..fetch import fetch_checkout_info, fetch_checkout_lines\n+from ...plugins.manager import get_plugins_manager\n+\n... | 32e44a26ff2b4a5e0e9c180e2df0edba0eaf3f49 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09da33df19b..7c9377b77cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,7 +48,8 @@ All notable, unreleased changes to this project will be documented in this file.
- Add `ORDER_REFUNDED`, `ORDER_FULLY_REFUNDED`, `ORDER_PAID` webhooks - #12533 by @korycins
- Handle e... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
saleor__saleor-12325@e69878e | saleor/saleor | Python | 12,325 | Add backwards compatibility for taxCode field | Fixes #12321
Acceptance criteria:
- [ ] Providing `taxCode` field should create a tax class and assign it to the product type or product. When the tax class doesn't exist, it should be created automatically (the next checkpoint describes matching criteria). This should work for the following mutations:
- [ ] `p... | 2023-03-16T16:15:28Z | Bug: taxCode field is not respected when creating a product or product type
### What are you trying to achieve?
I'm trying to create a product type and provide a tax code using the old deprecated `taxCode` field. The same issue happens for `productTypeUpdate`, `productCreate` and `productUpdate` mutations.
### Steps ... | [
{
"body": "### What are you trying to achieve?\n\nI'm trying to create a product type and provide a tax code using the old deprecated `taxCode` field. The same issue happens for `productTypeUpdate`, `productCreate` and `productUpdate` mutations.\n\n### Steps to reproduce the problem\n\n1. Run the following muta... | 1710c58be387f590d01a0dfdac8bb1f39c31ad68 | {
"head_commit": "e69878e2afe710a3592efa103201ebb10a97ea76",
"head_commit_message": "Adjust test",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5f70a2b4ada..f9765ea1af4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -13,6 +13,7 @@ All notable, unreleased changes to this project will be ... | [
{
"diff_hunk": "@@ -0,0 +1,29 @@\n+from django.db.models import Q\n+\n+from ....plugins.manager import PluginsManager\n+from ....tax.models import TaxClass\n+\n+\"\"\"\n+Clean deprecated `taxCode` field.\n+\n+This function provides backwards compatibility for the `taxCode` input field. If the\n+`taxClass` is no... | 8a5443c4b78ca219dff0fb1398dbadb414484fa5 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f70a2b4ada..f9765ea1af4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add new optional field `Manifest.requiredSaleorVersion`
- Add `requiredSaleorVersion` validation... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-13068@f0f8141 | saleor/saleor | Python | 13,068 | add remove_shipping_method | I want to merge this change because it allows shipping method to be removed by user after it has been assigned to the checkout.
It fixes #13062
# Impact
* [ ] New migrations
* [ x] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
* [ ] Removed API types, fields, or mutations
* [... | 2023-06-13T21:04:35Z | Allow to remove shipping method
Current state:
Once the Shipping Method is assigned to the checkout, it cannot be removed by the user.
DoD:
make `checkoutShippingMethodUpdate.shippingMethodId` argument nullable
if null is passed as a value, remove the shipping method from the checkout | [
{
"body": "Current state:\r\nOnce the Shipping Method is assigned to the checkout, it cannot be removed by the user.\r\n\r\nDoD:\r\nmake `checkoutShippingMethodUpdate.shippingMethodId` argument nullable\r\nif null is passed as a value, remove the shipping method from the checkout",
"number": 13062,
"tit... | be5d70448a7302da1e407873507303d63a249b1e | {
"head_commit": "f0f81412db8cc7ebb91fa9d4c7d32961767421ee",
"head_commit_message": "Update CHANGELOG.md\n\nCo-authored-by: Marcin Gębala <5421321+maarcingebala@users.noreply.github.com>",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex cca5d813e33..cb434297c44 100644\n--- a/CHANGELOG.md\n+++ ... | [
{
"diff_hunk": "@@ -0,0 +1,67 @@\n+from unittest.mock import patch\n+\n+import pytest\n+\n+from ....core.utils import to_global_id_or_none\n+from ....tests.utils import get_graphql_content\n+\n+MUTATION_UPDATE_SHIPPING_METHOD = \"\"\"\n+ mutation checkoutShippingMethodUpdate(\n+ $id: ID, $shippingMeth... | 4edd0e9014144749869e94b4fcb9d604dccc1543 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b870aec097..9407bed4dbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,7 +56,9 @@ All notable, unreleased changes to this project will be documented in this file.
2. Billing address
3. Channel's default country
+
### GraphQL API
+Shipping methods can... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
saleor__saleor-12272@ad3b276 | saleor/saleor | Python | 12,272 | Create order discounts for all voucher types | Create order discounts for all voucher types.
Fixes https://github.com/saleor/saleor/issues/12109, https://github.com/saleor/saleor/issues/8910
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutati... | 2023-03-09T14:03:50Z | Bug: Missing discount info for orders with applied specific products and "once per order" vouchers.
### What are you trying to achieve?
As the specific product, and apply "once per order" vouchers are now included in the checkout discount, we should also create the appropriate `discount` object for the order when ch... | [
{
"body": "### What are you trying to achieve?\r\n\r\nAs the specific product, and apply \"once per order\" vouchers are now included in the checkout discount, we should also create the appropriate `discount` object for the order when checkout is completed. It allows for properly showing the information about t... | f02712698f5962424a9acb67b6c45cc2623b8872 | {
"head_commit": "ad3b2762d2e2eec514e08979fcb26c03c3a7be61",
"head_commit_message": "Update changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5852b9f23de..432d468fc87 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -10,6 +10,7 @@ All notable, unreleased changes to this project wil... | [
{
"diff_hunk": "@@ -553,23 +552,15 @@ def _create_order(\n # store voucher as a fixed value as it this the simplest solution for now.\n # This will be solved when we refactor the voucher logic to use .discounts\n # relations\n- voucher = order_data.get(\"voucher\")\n- # Whe... | 57764591649565d75a42b6f9da9060206302a8fe | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5852b9f23de..432d468fc87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ All notable, unreleased changes to this project will be documented in this file.
- [Preview] Add `StockBulkUpdate` mutation - #12139 by @SzymJ
### Other changes
+- Create order disc... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-12268@af524ba | saleor/saleor | Python | 12,268 | Add CustomerBulkUpdate mutation | I want to merge this change because it adds `CustomerBulkUpdate` mutation. Resolves #12057
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [x] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
* [ ] Removed API types, fields, or mutations
* [ ]... | 2023-03-08T12:14:18Z | Bulk customer mutations
Introduce bulk update mutation for customers.
# 1. General Assumptions
1. Allow updating multiple customers in one bulk mutation.
2. `ID` or `externalReference` can be used to identify `Customer`.
3. `CUSTOMER_UPDATED` webhook event should be sent for every updated customer instance.... | Mutation return password cannot be blank, but the password is not part of CustomerInput
variables:
```
{
"errorPolicy": "IGNORE_FAILED",
"customers": [
{
"id": "VXNlcjo5NzU=",
"input": {
"firstName": "Carol"
}
}
]
}
```
Response:
```
"customerBulkUpdate"... | [
{
"body": "Introduce bulk update mutation for customers.\r\n\r\n# 1. General Assumptions\r\n 1. Allow updating multiple customers in one bulk mutation.\r\n 2. `ID` or `externalReference` can be used to identify `Customer`.\r\n 3. `CUSTOMER_UPDATED` webhook event should be sent for every updated customer inst... | d6a9fbe84e97a36e64841a27a6eb5e05a53e8e4f | {
"head_commit": "af524baa5721423f2afc1b2bae1046aae6b56de2",
"head_commit_message": "Add doc_category to customerBulkUpdate mutation",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex a5954d0d5d1..d72743d5870 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -15,6 +15,7 @@ All notable, unrelea... | [
{
"diff_hunk": "@@ -0,0 +1,598 @@\n+from collections import defaultdict\n+from copy import copy\n+\n+import graphene\n+from django.core.exceptions import ValidationError\n+from django.db.models import Q\n+from graphene.utils.str_converters import to_camel_case\n+\n+from ....account import models\n+from ....acco... | 6c696cf749810b7edb1e54da64bcb0fe2fe737b2 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5954d0d5d1..d72743d5870 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add new field `author` to `Manifest` and `App` object types - #12166 by @przlada
- Add backwards com... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saleor__saleor-12122@ede1a59 | saleor/saleor | Python | 12,122 | Fix invalid discount calculaion for specific product voucher that is applied once per order | For a specific product voucher with the "apply once per order" flag set to true, the discount is applied to the cheapest line item, rather than the cheapest line item that the voucher covers.
Fixes https://github.com/saleor/saleor/issues/12107
<!-- Please mention all relevant issue numbers. -->
# Impact
* [... | 2023-02-24T11:14:00Z | Bug: Discount applied on wrong line for specific product voucher with apply once per order set to True
### What are you trying to achieve?
For a specific product voucher with the "apply once per order" flag set to true, the discount is applied to the cheapest line item, rather than the cheapest line item that the vou... | [
{
"body": "### What are you trying to achieve?\n\nFor a specific product voucher with the \"apply once per order\" flag set to true, the discount is applied to the cheapest line item, rather than the cheapest line item that the voucher covers.\n\n### Steps to reproduce the problem\n\n1. Create a specific vouche... | 28b4e5beadb330fb25b1aa0a0b718af7518ea47a | {
"head_commit": "ede1a594281b74df55851388f600d6106fe31626",
"head_commit_message": "Fix invalid discount calculaion for specific product voucher that is applied once per order",
"patch_to_review": "diff --git a/saleor/checkout/fetch.py b/saleor/checkout/fetch.py\nindex 207b740d2be..c387a37184a 100644\n--- a/sale... | [
{
"diff_hunk": "@@ -543,6 +544,78 @@ def test_checkout_add_category_code_checkout_with_sale(\n assert checkout.discount_amount == Decimal(0)\n \n \n+def test_checkout_add_variant_voucher_code_apply_once_per_order(\n+ api_client, checkout_with_items, voucher_specific_product_type\n+):\n+ # TODO: update... | a2d91b110fac0cde30a8f2a113a4d48420a1455c | diff --git a/saleor/checkout/fetch.py b/saleor/checkout/fetch.py
index 207b740d2be..f2de7c9d7a8 100644
--- a/saleor/checkout/fetch.py
+++ b/saleor/checkout/fetch.py
@@ -360,33 +360,43 @@ def apply_voucher_to_checkout_line(
voucher = voucher_info.voucher
discounted_lines_by_voucher: List[CheckoutLineInfo] = ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-11920@813708c | saleor/saleor | Python | 11,920 | Use default db for synchronous tax webhooks | https://github.com/saleor/saleor/issues/11906
I want to merge this change because when tax webhooks are triggered during mutation, subscription payload is generated based on replica db, so changes done by the mutation are not visible in the payload.
<!-- Please mention all relevant issue numbers. -->
# Impact
... | 2023-02-06T10:41:39Z | Bug: Two request context in single Django request.
### What are you trying to achieve?
When CalculateTaxes event is triggered during `odrerDiscountAdd` mutation (within transaction), subscription payload is prepared base on replica db. This leads to uncommitted changes not being visible in the payload.
### Steps ... | [
{
"body": "### What are you trying to achieve?\r\n\r\nWhen CalculateTaxes event is triggered during `odrerDiscountAdd` mutation (within transaction), subscription payload is prepared base on replica db. This leads to uncommitted changes not being visible in the payload.\r\n\r\n### Steps to reproduce the problem... | 4c7b8f6aa597bfd72fe2957dc33a5af1063dd4c6 | {
"head_commit": "813708c1367474acabe155dc36b99d1fa9a8b18f",
"head_commit_message": "Rename flag to allow_replica, add test.",
"patch_to_review": "diff --git a/saleor/graphql/context.py b/saleor/graphql/context.py\nindex 06142aaa9ab..2440bca9ae6 100644\n--- a/saleor/graphql/context.py\n+++ b/saleor/graphql/contex... | [
{
"diff_hunk": "@@ -18,7 +18,9 @@\n logger = get_task_logger(__name__)\n \n \n-def initialize_request(requestor=None, sync_event=False) -> SaleorContext:\n+def initialize_request(\n+ requestor=None, sync_event=False, is_mutation=False",
"line": null,
"original_line": 22,
"original_start_line": nu... | cf349e4822d9b4244ea4217fa561e9ece8366ce7 | diff --git a/saleor/graphql/account/mutations/base.py b/saleor/graphql/account/mutations/base.py
index 28348a87f57..4c4a670e979 100644
--- a/saleor/graphql/account/mutations/base.py
+++ b/saleor/graphql/account/mutations/base.py
@@ -28,7 +28,7 @@
from ...app.dataloaders import get_app_promise
from ...channel.utils im... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
scipy__scipy-19208@64d93cb | scipy/scipy | Python | 19,208 | BUG: freqz rfft grid fix | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2023-09-07T23:54:06Z | freqz: suboptimal performance for worN=2**n+1, include_nyquist=True and real coefficients
### Describe your issue.
freqz can be way faster, when the coefficients are real, `worN=2**n+1` and `include_nyquist=True`. In this case `rfft` can be used directly.
The attached code illustrates this, I hope.
Thanks for th... | Hi @drestebon, thanks for reporting. Looking at the documentation, there are some rules to observe so that (R)FFT is used (I did not look at the implementation yet). https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.freqz.html
Did you have a look? Are you suggesting something else?
Hi @tupui, thanks ... | [
{
"body": "### Describe your issue.\n\nfreqz can be way faster, when the coefficients are real, `worN=2**n+1` and `include_nyquist=True`. In this case `rfft` can be used directly.\r\n\r\nThe attached code illustrates this, I hope.\r\n\r\nThanks for the great work!\n\n### Reproducing Code Example\n\n```python\ni... | ccb4f8ee67cd1a5b4dd8577fd04eb12dcb3a45e7 | {
"head_commit": "64d93cbd5ebb776ee466d7cb0f32e792c08c3061",
"head_commit_message": "BENCH: removed vectorized input #17289 #15273",
"patch_to_review": "diff --git a/benchmarks/benchmarks/signal_filtering.py b/benchmarks/benchmarks/signal_filtering.py\nindex b887bc90fd57..8c688b02caaa 100644\n--- a/benchmarks/ben... | [
{
"diff_hunk": "@@ -893,6 +893,23 @@ def test_nyquist(self):\n assert_array_almost_equal(w1, w2)\n assert_array_almost_equal(h1, h2)\n \n+ # https://github.com/scipy/scipy/issues/17289\n+ # https://github.com/scipy/scipy/issues/15273\n+ @pytest.mark.parametrize('whole,nyquist,worN',\n+ ... | c28db66a795e701c06b92f93fbfaf563ba252bed | diff --git a/benchmarks/benchmarks/signal_filtering.py b/benchmarks/benchmarks/signal_filtering.py
index b887bc90fd57..8c688b02caaa 100644
--- a/benchmarks/benchmarks/signal_filtering.py
+++ b/benchmarks/benchmarks/signal_filtering.py
@@ -6,7 +6,7 @@
with safe_import():
from scipy.signal import (lfilter, firwin... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Performance Optimizations"
} |
saleor__saleor-11701@f9ce315 | saleor/saleor | Python | 11,701 | Add support for metadata for Address model | - Add metadata to `Address` model and type
- Allow updating metadata with use of update and delete metadata mutations
Resolves https://github.com/saleor/saleor/issues/11678
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] De... | 2023-01-11T06:56:35Z | Add support for metadata for Address model
### What I'm trying to achieve
Set metadata for an address object.
### Describe a proposed solution
Re-use the current solution that we have for other models and API. In the API updateMetadata for the Address type should be protected with MANAGE_USERS permission, plus own... | [
{
"body": "### What I'm trying to achieve\r\nSet metadata for an address object.\r\n\r\n### Describe a proposed solution\r\nRe-use the current solution that we have for other models and API. In the API updateMetadata for the Address type should be protected with MANAGE_USERS permission, plus owners of the addre... | b8786c1bf4d3a6f47963e546634c6e3732ca2345 | {
"head_commit": "f9ce3156b33277dee314b7458c7dde440984388f",
"head_commit_message": "Set correct version in Address metadata fields descriptions",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 78e33ff7f4f..8a43853b5a2 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -22,6 +22,7 @@ All nota... | [
{
"diff_hunk": "@@ -22,6 +22,7 @@ All notable, unreleased changes to this project will be documented in this file.\n - Extend invoice object types with `Order` references - #11505 by @przlada\n - Add `Invoice.order` field\n - Add `InvoiceRequested.order`, `InvoiceDeleted.order` and `InvoiceSent.order` field... | 10e937a74dae005b729974bb9508e31c4ea20f6f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 78e33ff7f4f..4a902fdfadf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Extend invoice object types with `Order` references - #11505 by @przlada
- Add `Invoice.order` fie... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
saleor__saleor-12434@ea68aa6 | saleor/saleor | Python | 12,434 | Add mutations to update and remove order note | I want to merge this change because it resolves https://github.com/saleor/saleor/issues/12397.
- Added `OrderNoteAdd` and marked `OrderAddNote` mutation as deprecated. New mutation works the same as old one.
- Added `NOTE_UPDATED` option to `OrderEvents` enum.
- Added `OrderNoteUpdate` mutation.
How it works:
... | 2023-03-29T07:38:07Z | Introduce the way to edit and remove notes on orders
### What I'm trying to achieve
To maintain order and clarity of information in order notes,
As a staff member creating an order for the customer,
I need to be able to edit and remove notes from the order
### Describe a proposed solution
In case when the order ... | [
{
"body": "### What I'm trying to achieve\r\nTo maintain order and clarity of information in order notes,\r\nAs a staff member creating an order for the customer,\r\nI need to be able to edit and remove notes from the order\r\n\r\n### Describe a proposed solution\r\nIn case when the order is made by the shop's ... | e22490efe5abb05a42451d80b476ef06cd20fa35 | {
"head_commit": "ea68aa6567739c597fad42b7de570d6cad62ac23",
"head_commit_message": "Update changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 77d9d3d6bdd..fb7b0158399 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -35,6 +35,7 @@ All notable, unreleased changes to this project wil... | [
{
"diff_hunk": "@@ -0,0 +1,58 @@\n+import graphene\n+\n+from ....core.tracing import traced_atomic_transaction\n+from ....order import OrderEvents, events, models\n+from ....permission.enums import OrderPermissions\n+from ...app.dataloaders import get_app_promise\n+from ...core import ResolveInfo\n+from ...core... | ff29c3031ffd18ce7ccce04a92904915a4e73f90 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04a649fc3f6..97839359097 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ All notable, unreleased changes to this project will be documented in this file.
### GraphQL API
+- Add `orderNoteAdd` and `orderNoteUpdate` mutations and deprecate `orderAddNote` mu... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
saleor__saleor-11375@8e3a78c | saleor/saleor | Python | 11,375 | Add default tax calculation strategy | I want to merge this change because it fixes #11343
We want tax calculation strategy to be always provided. So I added default strategy to `tax_calculation_strategy` field of `TaxConfiguration`.
At the moment we leave the field nullable as we want to keep backward-compatibility.
Resolver for `tax_calculation_stra... | 2022-12-02T08:35:53Z | Bug: Saleor returns totalPrice 0 if taxCalculationStrategy is null
### What are you trying to achieve?
By default, the tax charge method is empty, so if I forgot to change it and do checkout totalPrice will be 0.
### Steps to reproduce the problem
1. Create a new channel
2. Assign Shipping methods, Warehous... | [
{
"body": "### What are you trying to achieve?\r\n\r\nBy default, the tax charge method is empty, so if I forgot to change it and do checkout totalPrice will be 0. \r\n\r\n### Steps to reproduce the problem\r\n\r\n1. Create a new channel \r\n2. Assign Shipping methods, Warehouse, products \r\n3. You can run que... | 32bbfb8851b99c98731c326492329d5116b771c3 | {
"head_commit": "8e3a78cc7c14ca740be7646ee36498da88ff9d1d",
"head_commit_message": "add default tax calculation strategy",
"patch_to_review": "diff --git a/saleor/checkout/calculations.py b/saleor/checkout/calculations.py\nindex fef7b1e66cc..42fa4a8133f 100644\n--- a/saleor/checkout/calculations.py\n+++ b/saleor... | [
{
"diff_hunk": "@@ -221,6 +221,44 @@ def test_fetch_checkout_prices_if_expired_flat_rates(\n assert checkout.shipping_tax_rate == Decimal(\"0.2300\")\n \n \n+@patch(\n+ \"saleor.checkout.calculations.update_checkout_prices_with_flat_rates\",\n+ wraps=update_checkout_prices_with_flat_rates,\n+)\n+def t... | 9d320866701c41d95b69533f4d4eea9f74336833 | diff --git a/saleor/checkout/calculations.py b/saleor/checkout/calculations.py
index fef7b1e66cc..42fa4a8133f 100644
--- a/saleor/checkout/calculations.py
+++ b/saleor/checkout/calculations.py
@@ -348,7 +348,7 @@ def _calculate_and_add_tax(
# Get the taxes calculated with apps and apply to checkout.
t... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-11284@4c83a91 | saleor/saleor | Python | 11,284 | Make email authentication case insensitive | https://github.com/saleor/saleor/issues/11277
I want to merge this change, because I want to make email authentication case insensitive. It should be possible to login under the same account using [test@test.com](mailto:test@test.com) and [Test@test.com](mailto:Test@test.com).
This PR also force emails to be lowe... | 2022-11-23T19:51:29Z | Make email case insensitive
### What are you trying to achieve?
Make emails case insensitive to prevent login issues.
### Steps to reproduce the problem
Create account Test@test.com
Login with test@test.com
### What did you expect to happen?
It should be possible to login under the same account using test@test.c... | @timuric Should we also take into account the case where we have email provided with upper case? Like [test@test.com](mailto:test@test.com), [Test@test.com](mailto:Test@test.com) and TEST@TEST.COM? | [
{
"body": "### What are you trying to achieve?\n\nMake emails case insensitive to prevent login issues.\n\n### Steps to reproduce the problem\n\nCreate account Test@test.com\r\nLogin with test@test.com\n\n### What did you expect to happen?\n\nIt should be possible to login under the same account using test@test... | 9e2d7968cad980e58416b890cd8caffe883ef1f4 | {
"head_commit": "4c83a913a2c43a31630cc8fc481f4884048d82fa",
"head_commit_message": "correct changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 9b87b2ac2eb..b17580bd83a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -38,7 +38,7 @@ All notable, unreleased changes to this project wi... | [
{
"diff_hunk": "@@ -510,3 +510,21 @@ def check_is_owner_or_has_one_of_perms(\n \"\"\"\n if not is_owner_or_has_one_of_perms(requestor, owner, *perms):\n raise PermissionDenied(permissions=list(perms) + [AuthorizationFilters.OWNER])\n+\n+\n+def retrieve_user_by_email(email):",
"line": null,
... | f1aa9f43b8587ca17fa3d6ba527c2a04584688ad | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59b36898cc0..84974a37eb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add new properties in the `Product` type - #10537 by @kadewu
- Add new fields: `Product.attribute`... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-19226@3c6d83c | scipy/scipy | Python | 19,226 | DEP: improve message for deprecated private API for `sparse` | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2023-09-12T06:40:36Z | BUG: utils from scipy.sparse.sputils are not available from scipy.sparse module
### Describe your issue.
It seems that the deprecation warning of the `scipy.sparse.sputils` is incorrect. The utilities are not available from the `scipy.sparse` module.
This might be on purpose but then the deprecation warning is misl... | [
{
"body": "### Describe your issue.\n\nIt seems that the deprecation warning of the `scipy.sparse.sputils` is incorrect. The utilities are not available from the `scipy.sparse` module.\r\n\r\nThis might be on purpose but then the deprecation warning is misleading.\n\n### Reproducing Code Example\n\n```python\nI... | b7133442e796a32c22e4429e7a029697d549d629 | {
"head_commit": "3c6d83c7eaf03219dc97dc68b93058f59189ba27",
"head_commit_message": "DEP scipy#18279 improve deprecated modules",
"patch_to_review": "diff --git a/scipy/_lib/tests/test_public_api.py b/scipy/_lib/tests/test_public_api.py\nindex 4446a50af009..19a9bc26e627 100644\n--- a/scipy/_lib/tests/test_public_... | [
{
"diff_hunk": "@@ -2,14 +2,25 @@\n # Use the `scipy.sparse.linalg` namespace for importing the functions\n # included below.\n \n-import warnings\n-from . import _isolve\n+from scipy._lib.deprecation import _sub_module_deprecation\n \n \n __all__ = [ # noqa: F822\n- 'bicg', 'bicgstab', 'cg', 'cgs', 'gcrotm... | 45c25120995f86bfcd2401c9affd6445a3f94ba8 | diff --git a/scipy/_lib/tests/test_public_api.py b/scipy/_lib/tests/test_public_api.py
index 7b6b9be67d91..965a19648528 100644
--- a/scipy/_lib/tests/test_public_api.py
+++ b/scipy/_lib/tests/test_public_api.py
@@ -353,6 +353,15 @@ def check_importable(module_name):
('scipy.optimize.slsqp', N... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-11275@bbc622d | saleor/saleor | Python | 11,275 | Add `schemaVersion` field to `Shop` type | https://github.com/saleor/saleor/issues/11274
I want to merge this change because I want to fetch minor version of Saleor as anonymous user.
```graphql
type Shop {
...
schemaVersion: String!
}
```
<!-- Please mention all relevant issue numbers. -->
# Impact
* [ ] New migrations
* [x] New/Update... | 2022-11-22T15:31:36Z | Add `schemaVersion` field to `Shop` type
### What I'm trying to achieve
I want to add public information about Saleor's api version to `Shop` type.
### Describe a proposed solution
```graphql
type Shop {
...
schemaVersion: String!
}
```
`schemaVersion` will be displayed without any permissions and wi... | I think it needs to be `String!` as it's guaranteed not to return `null`. | [
{
"body": "### What I'm trying to achieve\r\nI want to add public information about Saleor's api version to `Shop` type.\r\n\r\n### Describe a proposed solution\r\n```graphql\r\ntype Shop {\r\n ...\r\n schemaVersion: String!\r\n}\r\n```\r\n\r\n`schemaVersion` will be displayed without any permissions and wi... | 74d1c8d8504dbdd339865ff97ca4ac9bd30a8faf | {
"head_commit": "bbc622dde4c8ac314f48b5461b381295338d1299",
"head_commit_message": "add schemaVersion field to Shop type",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 151b824fbfc..b1befcae8c9 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -236,6 +236,7 @@ All notable, unreleased chang... | [
{
"diff_hunk": "@@ -506,6 +511,10 @@ def resolve_limits(_, _info):\n def resolve_version(_, _info):\n return __version__\n \n+ @staticmethod\n+ def resolve_schema_version(_, _info):\n+ return f'{__version__.split(\".\")[0]}.{__version__.split(\".\")[1]}'",
"line": null,
"origina... | 5e6edb4f5c310e19c6d0ffc110a8fac913ac78ce | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 151b824fbfc..b1befcae8c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -236,6 +236,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Expose manifest in the `App` type (#10055) (f0f944066)
- Deprecate `configurationUrl` and `dataPri... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
scipy__scipy-18968@eb13c6d | scipy/scipy | Python | 18,968 | DEP: optimize: improve deprecation of private modules named without underscore prefix | <!--
Thanks for contributing a pull request! Please ensure that
your PR satisfies the checklist before submitting:
http://scipy.github.io/devdocs/dev/contributor/development_workflow.html#checklist-before-submitting-a-pr
Also, please name and describe your PR as you would write a
commit message:
http://scipy.g... | 2023-07-26T16:15:40Z | BUG: Deprecation warning says to use non-existent symbols
### Describe your issue.
There is a deprecation warning for importing `MemoizeJac` that recommends importing it from `scipy.optimize` as a new approach, but I can't import it from `scipy.optimize`.
### Reproducing Code Example
```python
Python 3.8.15 | packag... | A relative of https://github.com/scipy/scipy/pull/16532#issuecomment-1173112142 ?
Yes, looks the same. So this will be fixed in 1.10?
I see that the PR you referenced didn't address this class. So I guess the same fix could be applied.
Would you be willing to send a PR with the fix? It should go to the main branch, on... | [
{
"body": "### Describe your issue.\n\nThere is a deprecation warning for importing `MemoizeJac` that recommends importing it from `scipy.optimize` as a new approach, but I can't import it from `scipy.optimize`.\n\n### Reproducing Code Example\n\n```python\nPython 3.8.15 | packaged by conda-forge | (default, No... | 0aa5aa9e78f81493f1cd9f6fc149a0bb856c2e11 | {
"head_commit": "eb13c6d77af05d4427669a3976505c6096f350cd",
"head_commit_message": "STY: fix style errors",
"patch_to_review": "diff --git a/scipy/_lib/tests/test_public_api.py b/scipy/_lib/tests/test_public_api.py\nindex ca4f3872c8c9..e096d40cea21 100644\n--- a/scipy/_lib/tests/test_public_api.py\n+++ b/scipy/_... | [
{
"diff_hunk": "@@ -32,13 +31,6 @@ def __dir__():\n \n \n def __getattr__(name):\n- if name not in __all__:\n- raise AttributeError(\n- \"scipy.optimize.zeros is deprecated and has no attribute \"\n- f\"{name}. Try looking in scipy.optimize instead.\")\n-\n- warnings.warn(f\"P... | 1d218be53f23fcee26b8bd07364cd041eb07afeb | diff --git a/scipy/_lib/tests/test_public_api.py b/scipy/_lib/tests/test_public_api.py
index ca4f3872c8c9..e096d40cea21 100644
--- a/scipy/_lib/tests/test_public_api.py
+++ b/scipy/_lib/tests/test_public_api.py
@@ -317,7 +317,18 @@ def check_importable(module_name):
@pytest.mark.parametrize(("module_name", "correc... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saleor__saleor-10833@26b0cfe | saleor/saleor | Python | 10,833 | Fix attribute value matching during attribute update | I want to merge this change because if we use `productVariantUpdate` mutation and update attribute values our changed values would not change if slug for the name was unchanged (e.g. slug for both "12L" and "12.L" values is "12L").
It is because `get_or_create` was used and if id and slug matched it returned the inst... | 2022-10-06T08:40:14Z | Fix: updating attribute values with similar values
Updating attribute value with similar value e.g: "424l" to "42.4l" does not update the value.
to reproduce use query:
```
mutation {
productVariantUpdate(
id: "UHJvZHVjdFZhcmlhbnQ6MjAz"
input: { attributes: { id: "QXR0cmlidXRlOjE1", values: ["24l"] } }
) ... | @jakubkuc Please provide more steps to reproduce, at least Saleor version and example mutation/query that causes the issue. | [
{
"body": "Updating attribute value with similar value e.g: \"424l\" to \"42.4l\" does not update the value. \n\nto reproduce use query:\n```\nmutation {\n productVariantUpdate(\n id: \"UHJvZHVjdFZhcmlhbnQ6MjAz\"\n input: { attributes: { id: \"QXR0cmlidXRlOjE1\", values: [\"24l\"] } }\n ) {\n errors ... | b15a0e0615bd1e4c61b54820c174aadad3d2708e | {
"head_commit": "26b0cfe0fdb2daa2ddc752c8f2ae949937c30c09",
"head_commit_message": "change function in pre_save_values from get_or_create to update_or_create",
"patch_to_review": "diff --git a/saleor/graphql/attribute/utils.py b/saleor/graphql/attribute/utils.py\nindex 4a2ad0d0eae..3fcc60641d0 100644\n--- a/sale... | [
{
"diff_hunk": "@@ -143,14 +143,14 @@ def _resolve_attribute_global_id(cls, error_class, global_id: str) -> int:\n def _pre_save_values(\n cls, attribute: attribute_models.Attribute, attr_values: AttrValuesInput\n ):\n- \"\"\"Lazy-retrieve or create the database objects from the supplied ... | b1137ff0299942986c7c9205fce69977b29f762f | diff --git a/saleor/graphql/attribute/utils.py b/saleor/graphql/attribute/utils.py
index 4a2ad0d0eae..8eda43e33e6 100644
--- a/saleor/graphql/attribute/utils.py
+++ b/saleor/graphql/attribute/utils.py
@@ -144,19 +144,22 @@ def _pre_save_values(
cls, attribute: attribute_models.Attribute, attr_values: AttrValue... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
redis__redis-py-3534@a8a1ce7 | redis/redis-py | Python | 3,534 | fix(lock): Fix LockError message when releasing a lock. | Fix #3535
### Pull Request check-list
_Please make sure to review and check all of these items:_
- [ ] Do tests and lints pass with this change?
- [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
- [ ] Is the new or changed code ... | 2025-02-27T09:27:33Z | Release a lock from a non-owned thread should raise proper error
Reproduce code:
```python
import redis
import threading
import time
# Create Redis client
r = redis.Redis()
lock_name = "lock:example"
def thread1_function():
print("Thread 1: Starting")
lock = r.lock(lock_name, timeout=5)
if lock.ac... | [
{
"body": "Reproduce code:\n\n```python\nimport redis\nimport threading\nimport time\n\n\n# Create Redis client\nr = redis.Redis()\nlock_name = \"lock:example\"\n\n\ndef thread1_function():\n print(\"Thread 1: Starting\")\n \n lock = r.lock(lock_name, timeout=5)\n if lock.acquire():\n print(\... | 577b4acb3b9a599e079151b086818f1e5acd69e9 | {
"head_commit": "a8a1ce71534ced9727609624928b510acb51f0e1",
"head_commit_message": "fix(lock): raise LockNotOwnedError when release a lock from non-owned thread",
"patch_to_review": "diff --git a/redis/lock.py b/redis/lock.py\nindex f44ed629da..7d77bafb95 100644\n--- a/redis/lock.py\n+++ b/redis/lock.py\n@@ -251... | [
{
"diff_hunk": "@@ -251,7 +251,13 @@ def release(self) -> None:\n \"\"\"\n expected_token = self.local.token\n if expected_token is None:\n- raise LockError(\"Cannot release an unlocked lock\", lock_name=self.name)\n+ if self.owned():",
"line": null,
"origin... | 1468b1359c4509c2269166b6b02922d4675f2bf6 | diff --git a/redis/asyncio/lock.py b/redis/asyncio/lock.py
index e1d11a882d..bb2cccab52 100644
--- a/redis/asyncio/lock.py
+++ b/redis/asyncio/lock.py
@@ -249,7 +249,10 @@ def release(self) -> Awaitable[None]:
"""Releases the already acquired lock"""
expected_token = self.local.token
if expec... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
saleor__saleor-10694@bc95171 | saleor/saleor | Python | 10,694 | Add ability to filter customers by ids | Add ids filter to customers endpoint
Fix [9523](https://github.com/saleor/saleor/issues/9523)
# Impact
* [ ] New migrations
* [ ] New/Updated API fields or mutations
* [ ] Deprecated API fields or mutations
* [ ] Removed API types, fields, or mutations
* [ ] Documentation needs to be updated
# Pull Reques... | 2022-09-21T08:17:19Z | add filter to get customers by id's.
### What I'm trying to achieve
Get customer by id.
### Describe a proposed solution
User/Programmer should be able to get customers based on customer/user id.
### Other solutions I've tried and won't work
We are able to get users by id, but In my case, I want to filter cust... | + +1 we need this too.
+2 We want this too. | [
{
"body": "### What I'm trying to achieve\r\nGet customer by id.\r\n\r\n### Describe a proposed solution\r\nUser/Programmer should be able to get customers based on customer/user id.\r\n\r\n### Other solutions I've tried and won't work\r\nWe are able to get users by id, but In my case, I want to filter customer... | a5c3dd97b5c81bb8121617ed019971fb96ab8172 | {
"head_commit": "bc951713d287a71a3d8c1169611a573ebf6d6065",
"head_commit_message": "Add help text",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 7e865c343b5..164a93e997f 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -8,6 +8,7 @@ All notable, unreleased changes to this project will be ... | [
{
"diff_hunk": "@@ -51,6 +52,9 @@ def filter_search(qs, _, value):\n \n \n class CustomerFilter(MetadataFilterBase):\n+ ids = GlobalIDMultipleChoiceFilter(\n+ field_name=\"id\", help_text=f\"Filter by ids {ADDED_IN_38}\"",
"line": null,
"original_line": 56,
"original_start_line": null,
... | 39ad2be5598b3a85b9981bc16386bdeb77feb89b | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e865c343b5..164a93e997f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add ability to filter by slug. #10578 by @kadewu
- Affected types: Attribute, Category, Collection, ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
Subsets and Splits
Review Test Instances
Retrieves basic metadata about code review instances but doesn't provide any analytical insights or patterns beyond raw data access.