sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: langchain
Issue: Azure search similarity_search_with_score method error
Labels: Ɑ: vector store

### Checked other resources

- [x] I added a very descriptive title to this issue.
- [x] I searched the LangChain documentation with the integrated search.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```
from langchain_community.vectorstores.azuresearch import AzureSearch


azure_search = AzureSearch(
            azure_search_endpoint=search_url,
            index_name=index_name,
            embedding_function=embedding_function,
            azure_credential=credential,
        )
result = azure_search.similarity_search_with_score(
      query="example query",
      k=10,
      search_type='similarity'
  )
```

### Error Message and Stack Trace (if applicable)

_No response_

### Description

When passing the search_type parameter to the similarity_search_with_score it fails later because it is passed as a kwarg. The error is this:

TypeError: Session.request() got an unexpected keyword argument 'search_type'

The error comes from the method definition [in line 682](https://github.com/langchain-ai/langchain/blob/dbb6b7b103d9c32cea46d3848839a4c9cbb493c3/libs/community/langchain_community/vectorstores/azuresearch.py#L682)
and the solution would simply be to add search_type as a parameter in the method:

def similarity_search_with_score(
self, query: str, *, k: int = 4, search_type: str, **kwargs: Any
) -> List[Tuple[Document, float]]:

### System Info

System Information
------------------
> OS:  Windows
> OS Version:  10.0.19045
> Python Version:  3.11.2 (tags/v3.11.2:878ead1, Feb  7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)]

Package Information
-------------------
> langchain_core: 0.3.31
> langchain: 0.3.15
> langchain_community: 0.3.15
> langsmith: 0.3.1
> langchain_openai: 0.2.3
> langchain_postgres: 0.0.12
> langchain_text_splitters: 0.3.5
> langchain_unstructured: 0.1.6
> langgraph_sdk: 0.1.44

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> aiohttp: 3.11.11
> async-timeout: Installed. No version info available.
> dataclasses-json: 0.6.7
> httpx: 0.28.1
> httpx-sse: 0.4.0
> jsonpatch: 1.33
> langsmith-pyo3: Installed. No version info available.
> numpy: 1.26.4
> onnxruntime: 1.19.2
> openai: 1.56.2
> orjson: 3.10.15
> packaging: 24.2
> pgvector: 0.2.5
> psycopg: 3.2.3
> psycopg-pool: 3.2.3
> pydantic: 2.10.5
> pydantic-settings: 2.7.1
> pytest: 8.3.3
> PyYAML: 6.0.2
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> rich: Installed. No version info available.
> sqlalchemy: 2.0.37
> SQLAlchemy: 2.0.37
> tenacity: 9.0.0
> tiktoken: 0.8.0
> typing-extensions: 4.12.2
> unstructured-client: 0.28.1
> unstructured[all-docs]: Installed. No version info available.
> zstandard: 0.23.0
Repository: react-native
Issue: [Text on Android]: setting selectable to true breaks the text truncation and lineHeight on Android
Labels: Platform: Android,Needs: Triage :mag:

### Description

I use Text component that has to contain selectable text and should be truncated if it extends the width of the parent component.
On iOS everything works fine. On Android if I set `selectable={true}` truncation and line height of the text are breaking.



### Steps to reproduce

1. import Text component from react-native
2. render Text component, add `selectable={true}`, `numberOfLines={1}`
3. the text is cut off instead of being truncated, the line height is bigger than it should be, the top of the second line of text is visible

### React Native Version

0.75.4

### Affected Platforms

Runtime - Android

### Output of `npx react-native info`

```text
-
```

### Stacktrace or Logs

```text
-
```

### Reproducer

https://github.com/dariakoko/text-component-on-android

### Screenshots and Videos

<img width="338" alt="Image" src="https://github.com/user-attachments/assets/a1ae3cd8-4f1f-4a5a-99af-9f65e04d66e3" />

```
      <View style={{width: 200}}>
        <Text style={{color: 'green'}}>default: </Text>
        <Text style={{backgroundColor: 'yellow'}}>
          Some long very very very very very long text
        </Text>

        <Text>-------------</Text>

        <Text style={{color: 'green'}}>not selectable: </Text>
        <Text numberOfLines={1} style={{backgroundColor: 'yellow'}}>
          Some long very very very very very long text
        </Text>

        <Text>-------------</Text>

        <Text style={{color: 'red'}}>selectable (issue): </Text>
        <Text
          selectable={true}
          numberOfLines={1}
          style={{backgroundColor: 'yellow'}}>
          Some long very very very very very long text
        </Text>
        <View style={{height: 20, backgroundColor: 'pink'}}></View>
      </View>
```
Repository: pytorch
Issue: Kw argument `dtype` less relative with the functions themselves
Labels: triaged,module: random,module: edge cases

### 🐛 Describe the bug

The docs of [`torch.randint()`](https://pytorch.org/docs/stable/generated/torch.randint.html#torch-randint), [`torch.randint_like()`](https://pytorch.org/docs/stable/generated/torch.randint_like.html#torch-randint-like), [`torch.randperm()`](https://pytorch.org/docs/stable/generated/torch.randperm.html#torch-randperm) show their returns as below:

> torch.randint: Returns a tensor filled with random integers generated uniformly between low (inclusive) and high (exclusive).

> torch.randint_like: Returns a tensor with the same shape as Tensor input filled with random integers generated uniformly between low (inclusive) and high (exclusive).

> torch.randperm: Returns a random permutation of integers from 0 to n - 1.

All of them show that their return should be of integers. They have the same kw arguments `dtype`, but when `dtype` is of float, they all can run well (expected TypeError).

### Minified repro
```python
import torch
dtype = torch.double # choice: torch.double, torch.half, torch.float
randint_result = torch.randint(0, 10, (100, 100), dtype=dtype)
randint_like_result = torch.randint_like(randint_result, 0, 10, dtype=dtype)
randperm_result = torch.randperm(10, dtype=dtype)
print('randint_result:', randint_result)
print('randint_like_result:', randint_like_result)
print('randperm_result:', randperm_result)
```

### Outputs
```txt
randint_result: tensor([[0., 4., 5.,  ..., 3., 3., 4.],
        [6., 0., 2.,  ..., 0., 1., 4.],
        [8., 3., 0.,  ..., 5., 6., 9.],
        ...,
        [8., 9., 5.,  ..., 2., 8., 6.],
        [2., 5., 4.,  ..., 5., 8., 4.],
        [6., 1., 5.,  ..., 3., 8., 6.]], dtype=torch.float64)
randint_like_result: tensor([[5., 7., 6.,  ..., 0., 0., 0.],
        [1., 0., 7.,  ..., 1., 6., 0.],
        [1., 7., 0.,  ..., 9., 7., 8.],
        ...,
        [9., 1., 4.,  ..., 5., 5., 5.],
        [2., 1., 8.,  ..., 7., 9., 8.],
        [8., 9., 1.,  ..., 1., 5., 3.]], dtype=torch.float64)
randperm_result: tensor([0., 2., 1., 5., 7., 6., 3., 9., 8., 4.], dtype=torch.float64)
```


### Versions

pytorch==2.5.0
torchvision==0.20.0
torchaudio==2.5.0
pytorch-cuda=12.1

cc @pbelevich @vincentqb @jbschlosser @albanD @janeyx99 @crcrpar @svekars @brycebortree @sekyondaMeta @mruberry @walterddr @mikaylagawarecki
Repository: electron
Issue: Ubuntu 24.04 BrowserWindow setIcon does not change the icon
Labels: platform/linux,bug :beetle:,component/BrowserWindow,has-repro-gist,33-x-y

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

33.2.1

### What operating system(s) are you using?

Ubuntu

### Operating System Version

Ubuntu 24.04

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

The `setIcon(nativeImage)` method of a `BrowserWindow` instance changes the icon shown in the Ubuntu dock.

### Actual Behavior

The method call does not have any effect.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: langchain
Issue: LangGraph + PromptFlow KeyError __pf_main__ on instruction StateGraph(State)
Labels: 🤖:bug

### Checked other resources

- [x] I added a very descriptive title to this issue.
- [x] I searched the LangChain documentation with the integrated search.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

from langgraph.graph import StateGraph
from langgraph.graph.message import add_messages
from typing import Annotated, TypedDict

class State(TypedDict):
    question: Optional[str]
    messages: Annotated[list, add_messages]
    check_ups: Optional[list]
    check_ups_preparations: Optional[list]
    triggered_actions: Optional[list]
    triggered_actions_indexes: Optional[list]
    triggered_actions_thought: Optional[str]
    step_is_manual: Optional[bool]
    step_has_preparation: Optional[bool]
    manual_step_executed: Optional[dict]
    interaction_attempt_executed: Optional[dict]

graph_builder = StateGraph(State)

### Error Message and Stack Trace (if applicable)

KeyError __pf_main__

### Description

Hi,
I am building RAG applications using Azure Promptflow and LangGraph, but the my app crashes when the StateGraph and more specifically its schema is initiated (on instructions: StateGraph(State)), then i get an error that says key error: pf_main.

The crash happens on instruction "self._add_schema(state_schema)" on StateGraph init of the script ...\Lib\site-packages\langgraph\graph\state.py of LangGraph.

I tried even with the latest versions of the libraries LangChain (0.2.17), LangGraph (0.2.61), PromptFlow (1.17.1)

It seems to be due to the addition of state_schema handling in LangGraph and the use of PromptFlow in Azure. Does anyone have any idea how to fix this?

Thank you in advance

### System Info

C:\XX\pythonProject3\YY\Scripts\python.exe -m promptflow._cli._pf.entry flow test --flow c:\XX\YY\agent_assistant\flows\standard --user-agent "prompt-flow-extension/1.20.2 (win32; x64) VSCode/1.94.0"
Prompt flow service has started...
Repository: transformers
Issue: Support Shared Cache
Labels: Feature request,Cache

### Feature request

A new cache class that supports sharing the same or part of the KV cache between different layers to improve cache efficiency.

### Motivation

Many studies have shown that attention weights between different attention layers are always similar, and `KV cache sharing` only causes a small quality degradation, while improving **2~3 times token/sec**.

### Your contribution

I would try to submit a PR.
Repository: transformers
Issue: Mask2Former _init_weights
Labels: Core: Modeling,bug,Vision

### System Info

- `transformers` version: 4.45.2
- Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39
- Python version: 3.11.9
- Huggingface_hub version: 0.24.6
- Safetensors version: 0.4.4
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.4.0+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: no
- Using GPU in script?: yes
- GPU type: NVIDIA RTX A6000

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Run _init_weights

### Expected behavior

The _init_weights method of Mask2Former has multiple problems. It initializes nn.Embeddings with an std of .02 (original Mask2Former code uses PyTorch's default init with std of 1.0). Similarly, the mask MLP is initialised wrongly with zero biases. Finally, another example of a problem is that the initialisation of the multi-scale deformable attention is overwritten by the branch for the Mask2FormerPixelDecoderEncoderOnly.
Repository: PowerToys
Issue: Environmental Variables are not included in Backup
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.87.1

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

Yes

### Area(s) with issue?

Environment Variables

### Steps to reproduce

1) Having some additional/any environmental varbiables in windows
or having some added through PowerToys as a profile

2) backing up settings (as admin or not)

3) fresh installed windows 10 (or you could just remove a variable you put in for testing)

4) restoring backup
-> fancyzones are back
-> environmental variables not.

### ✔️ Expected Behavior

having all the variables back

### ❌ Actual Behavior

no variables are restored

### Other Software

_No response_
Repository: svelte
Issue: Cannot read properties of undefined (reading 'call')
Labels: awaiting submitter

### Describe the bug

It works in browser and Astro's `npm run dev` .
I'm getting this error when trying to test  with Vitest  of Astro page with svelte file.
```
TypeError: Cannot read properties of undefined (reading 'call')
 
// edited - moved to Logs section
```

### Reproduction

If required then later might try to repro. Its big page with runes, functions passed as props and template.
EDIT:
https://stackblitz.com/edit/github-ch9tapzs?file=test%2Fhappy-dom-env.test.ts&on=stackblitz
After dependencies install, stop npm in terminal and run `npm run test`


### Logs

```shell
TypeError: Cannot read properties of undefined (reading 'call')
 ❯ get_first_child node_modules/svelte/src/internal/client/dom/operations.js:81:28
     80| /**
     81|  * @template {Node} N
     82|  * @param {N} node
       |      ^
     83|  * @returns {Node | null}
     84|  */
 ❯ eval node_modules/svelte/src/internal/client/dom/template.js:48:91
 ❯ eval node_modules/svelte/src/internal/client/dev/elements.js:13:15
 ❯ Test src/components/test.svelte:15:12
 ❯ render node_modules/svelte/src/internal/server/index.js:121:2
 ❯ Object.renderToStaticMarkup node_modules/@astrojs/svelte/server.js:45:49
 ❯ renderFrameworkComponent node_modules/astro/dist/runtime/server/render/component.js:189:68
 ❯ renderComponent node_modules/astro/dist/runtime/server/render/component.js:368:10
```

### System Info

```shell
System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz
    Memory: 464.32 MB / 3.82 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 9.15.2 - ~/.local/share/pnpm/pnpm
    bun: 1.1.6 - ~/.bun/bin/bun
    Watchman: 20201115.021953.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 132.0.6834.83
  npmPackages:
    svelte: ^5.1.3 => 5.16.2
```

### Severity

blocking all usage of svelte
Repository: godot
Issue: Always on top does not work
Labels: needs testing,topic:gui

### Tested versions

[alwaysontop.zip](https://github.com/user-attachments/files/18536259/alwaysontop.zip)

Reproducable in 4.4 Beta 1 but not in 4.3

### System information

Godot v4.4.beta1 - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Laptop GPU (NVIDIA; 31.0.15.4618) - 13th Gen Intel(R) Core(TM) i9-13900HX (32 threads)

### Issue description

I expected the windows to be on top once I tick "Always on Top" in the project settings, but it doesn't work as intended.

### Steps to reproduce

Go to Project Settings > Windows > tick Always On Top

[alwaysontop.zip](https://github.com/user-attachments/files/18536286/alwaysontop.zip)

### Minimal reproduction project (MRP)

[alwaysontop.zip](https://github.com/user-attachments/files/18536290/alwaysontop.zip)
Repository: vscode
Issue: Settings option to disable overtype mode.
Labels: info-needed


Type: <b>Feature Request</b>

I don't begrudge people that use overtype/overstrike mode. I expected that there would be a settings entry to control allowing the previous behaviour or the new behaviour. This seems to usually be the case for new features that change an existing behaviour. 

Accessibility wise, if one's keyboard aim for Home or Del keys isn't perfect, a user can end up in overstrike mode without realizing. The solution for such bad aim, combined with no-choice overstrike mode, is to remove the insert key to eliminate accidents. 

Please implement a settings option that allows a user to "disable overtype". 

VS Code version: Code 1.96.3 (91fbdddc47bc9c09064bf7acf133d22631cbf083, 2025-01-09T18:14:09.060Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2


<!-- generated by issue reporter -->
Repository: rust
Issue: `extern { fn f(_: *const __m128); }` emits `improper_ctypes`
Labels: A-diagnostics,T-compiler,L-improper_ctypes,L-false-positive

### Code

```Rust
use std::arch::x86_64::__m128;

extern
{
    fn f(_: *const __m128);
}
```

### Current output

```Shell
warning: `extern` block uses type `__m128`, which is not FFI-safe
 --> <source>:5:13
  |
5 |     fn f(_: *const __m128);
  |             ^^^^^^^^^^^^^ not FFI-safe
  |
  = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
  = note: this struct has unspecified layout
  = note: `#[warn(improper_ctypes)]` on by default
```

### Desired output

```Shell

```

### Rationale and extra context

I don’t see why passing `*const __m128` over FFI could cause ABI problems (as opposed to passing `__m128` by value, which is [known to miscompile](https://github.com/rust-lang/rust/issues/116558)). C and Rust agree on the size and alignment of `__m128`, and for `extern` functions, on the argument passing convention for pointers.

### Other cases

```Rust

```

### Rust Version

```Shell
rustc 1.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: x86_64-unknown-linux-gnu
release: 1.84.0
LLVM version: 19.1.5
```

### Anything else?

_No response_
Repository: kubernetes
Issue: Add ability to override maxWaitForUnmountDuration for attach detach controller in controller manager
Labels: sig/storage,kind/feature,needs-triage

### What would you like to be added?

When node non graceful shutdown occur kube controller manager updates taints on node and sets `node.kubernetes.io/unreachable` taint.
When pod's `tolerationSeconds` expired controller manager evict pod from node. I set `tolerationSeconds: 60` for my pod and it's get evicted in time. But cannot start because I use storage with RWO and volume must be detached from failed node first. So controller manager tries to detach volume and after 6 minutes logs

```log
I0124 12:52:02.752565       1 reconciler.go:279] "attacherDetacher.DetachVolume started: this volume is not safe to detach, but maxWaitForUnmountDuration expired, force detaching" logger="persistentvolume-attach-detach-controller" duration="6m0s" node="prod-tages-k8s-worker-2" volumeName="kubernetes.io/csi/linstor.csi.linbit.com^pvc-fb36d4b7-d16d-4e6b-a82f-70cdf5dbf7d0"
```

I know that `NodeOutOfServiceVolumeDetach` feature gate in GA since kubernetes 1.28.
With that logic I have to update node with `node.kubernetes.io/out-of-service=nodeshutdown:NoExecute` taint to get volume attached on new node and delete from failed node. 

As I see the maxWaitForUnmountDuration is hardcoded to 6 minutes in [code](https://github.com/kubernetes/kubernetes/blob/2d32348f86c1e557faef0e8d7aa3722ea921ae72/pkg/controller/volume/attachdetach/attach_detach_controller.go#L94)

### Why is this needed?

I think that's common case.
My goal is to make fast migration of pod in kubernetes, I can't run this pod in multiple replicas.
But for that I need to write special controller that will taint nodes on fail. And this controller will just mark node out of service after some time it gets Unreachable.
Repository: rust
Issue: Replace `rustc_layout_scalar_valid_range_start` attribute with pattern types
Labels: F-pattern_types

the `rustc_layout_scalar_valid_range_start` and `rustc_layout_scalar_valid_range_end` attributes require a lot of machinery to stay sanely usable. Pattern types don't require less machinery, but they are simpler as they don't break through layers of layouts and then require surprisingly subtle unsafe code to be used correctly.

So we're ripping out the attributes, and replace their usages in libcore and rustc:

* `std::ptr::NonNull`
* `std::num::NonZero`
* `rustc_index_macros::newtype::NewType`
* `std::num::Nanoseconds`

cc @Veykril @scottmcm
Repository: rust
Issue: invalid opcode regression in `x86_64-unknown-linux-musl` release builds while compiling code using `generic-array`
Labels: T-compiler,O-musl,C-bug,A-mir-opt,I-miscompile,A-mir-opt-GVN

[Repro](https://github.com/SohumB/rustc-musl-opcode-regression-202501).

searched nightlies: from nightly-2024-11-21 to nightly-2025-01-24
regressed nightly: nightly-2025-01-10
searched commit range: https://github.com/rust-lang/rust/compare/a580b5c379b4fca50dfe5afc0fc0ce00921e4e00...824759493246ee383beb9cd5ceffa0e15deb9fa4
regressed commit: https://github.com/rust-lang/rust/commit/b6b8361bce8561fb8786ad33ca1abfdf4bc487b6

<details>
<summary>bisected with <a href='https://github.com/rust-lang/cargo-bisect-rustc'>cargo-bisect-rustc</a> v0.6.9</summary>


Host triple: x86_64-unknown-linux-gnu
Reproduce with:
```bash
cargo bisect-rustc -vv --start=2024-11-21 --target=x86_64-unknown-linux-musl --script=run.sh
```
</details>

I definitely don't understand MIR, but I was curious enough to look at it, so in case it helps anyone else, here's what appears to be the relevant section (without the `StorageLive`/`StorageDead` calls)

<details>
<summary>succeeding</summary>

```rust
        _2 = copy (_1.0: Box<GenericArray<usize, U1>>);

        _3 = copy (((_2.0: Unique<GenericArray<usize, U1>>).0: NonNull<GenericArray<usize, U1>>).0: 
                    *const GenericArray<usize, U1>);

        _4 = *const [usize] from (copy _3, const 1_usize);
        _6 = NonNull::<[usize]> { pointer: copy _4 };
        _11 = copy _6 as *mut [usize] (Transmute);
        _10 = copy _11 as *const usize (PtrToPtr);

        _5 = NonNull::<usize> { pointer: move _10 };
        _9 = copy _5 as *mut usize (Transmute);
        _8 = Offset(copy _9, const 1_usize);
        _7 = move _8 as *const usize (PtrToPtr);
        drop(_1) -> [return: bb2, unwind continue];
```
</details>

<details>
<summary>failing</summary>

```rust
        _2 = copy (_1.0: Box<GenericArray<usize, U1>>);

        _3 = copy ((_2.0: Unique<GenericArray<usize, U1>>).0: NonNull<GenericArray<usize, U1>>) 
                    as *const GenericArray<usize, U1> (Transmute);

        _4 = *const [usize] from (copy _3, const 1_usize);
        _9 = copy _4 as *const usize (Transmute);

        _5 = NonNull::<usize> { pointer: move _9 };
        _8 = copy _4 as *mut usize (Transmute);
        _7 = Offset(copy _8, const 1_usize);
        _6 = move _7 as *const usize (PtrToPtr);
        drop(_1) -> [return: bb2, unwind continue];
```
</details>