sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: First-time navigation breaks in dev if destination page has a lazy import with decorators
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/vibrant-http-r4kcq9

### To Reproduce

1. Restart dev server
2. Load homepage
3. Click link, new page will momentarily load, then bounce you back to the homepage
4. Click link again and new page will load as expected

### Current vs. Expected behavior

I expect the link to work on the first attempt

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.4
Relevant Packages:
  next: 14.2.1 // There is a newer version (14.2.4) available, upgrade recommended! 
  eslint-config-next: 14.2.1
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
```


### Which area(s) are affected? (Select all that apply)

Developer Experience

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

I've investigated this quite a bit as it affects us everyday. The two compounding causes are:
1. Using decorators on a subset of pages, this means the swc/helper for decorators isn't initially added to the bundle
2. Using a lazy import (next/dynamic) seems to cause the dependency order in the `pages/_document` bundle to change, resulting in the bundle hash changing and a page reload being forced. With a static import, the dependency order is stable, so the issue isn't triggered.

I've managed to work around this locally by patching Next to not externalise the swc helpers, but obviously would prefer not to have to maintain a patch and/or give up the optimisation.
Repository: PowerToys
Issue: Keyboard Manager: Change "." on Numblock failed
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

v0.82.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

Firsts things first, Im from Germany so my keyboard layout looks a bit different from the US layout. 
On the numpad, where it should be a "." on German keyboards this is a ",".
I want to change the , to a . but this only works with luck. 

![PowerToys KeyboardManagerEditor_jkXmQNhMOJ](https://github.com/microsoft/PowerToys/assets/161356484/4131b116-fa91-4e8b-b0df-39863b68f31e)

Sometimes it doesnt work at all and sometimes it works but after some time, it stops working and i have to try it again until it works again. 

![PowerToys KeyboardManagerEditor_yibWEEfvz3](https://github.com/microsoft/PowerToys/assets/161356484/36ad847a-c72f-466a-bb33-d555d5b56380)

I dont know why it stops working or why it sometimes works and other times not.




### ✔️ Expected Behavior

When i press . (NumPad) it should return a . 

### ❌ Actual Behavior

When i try to let PowerToys recognize my input on the keyboard it returns a : when i press .
If I try to send a text with a . it sometimes works although the message in my 2. screenshot appears


### Other Software

_No response_
Repository: ollama
Issue: internlm/internlm-xcomposer2d5-7b model request (multimodal)
Labels: model request

[internlm/internlm-xcomposer2d5-7b](https://huggingface.co/internlm/internlm-xcomposer2d5-7b)

> InternLM-XComposer2.5 excels in various text-image comprehension and composition applications, achieving GPT-4V level capabilities with merely 7B LLM backend. IXC2.5 is trained with 24K interleaved image-text contexts, it can seamlessly extend to 96K long contexts via RoPE extrapolation. This long-context capability allows IXC-2.5 to excel in tasks requiring extensive input and output contexts.

https://github.com/InternLM/InternLM-XComposer
Repository: opencv
Issue: Charuco detection breaks for multiple boards and/or with ID offset
Labels: bug,category: objdetect

### System Information

OpenCV python version: 4.10.0.84
Operating System / Platform: Windows 11 (23H2)
Python version: 3.11.5

### Detailed description

I have already reported this problem [here ](https://github.com/opencv/opencv/issues/24297#issuecomment-2209115871) and [here](https://github.com/opencv/opencv/issues/23905#issuecomment-2209134773), but I thought it would get more attention it was a new issue. 

It detects the charuco corners only the one that starts the count from 0. Even if there is a single charuco board with IDs 1 and above, it fails to detect any charuco corners, but it does detect marker_corners correctly. I have tried both opencv-python and opencv-contrib-python. 

### Steps to reproduce

``` Python

import os
import cv2
import numpy as np

ARUCO_DICT = cv2.aruco.DICT_5X5_100
SQUARES_VERTICALLY = 7
SQUARES_HORIZONTALLY = 5
SQUARE_LENGTH = 0.035 # this is in meters
MARKER_LENGTH = 0.025 # this is in meters

def create_board(id_offset_start = None, id_offset_end = None):
    dictionary = cv2.aruco.getPredefinedDictionary(ARUCO_DICT)
    if id_offset_start is not None and id_offset_end is not None:
        # offset the IDs https://github.com/opencv/opencv/issues/24297#issue-1903317246
        ids = np.arange(id_offset_start, id_offset_end + 1, 1)
        board = cv2.aruco.CharucoBoard((SQUARES_VERTICALLY, SQUARES_HORIZONTALLY), SQUARE_LENGTH, MARKER_LENGTH, dictionary, ids=ids)
    else:
        board = cv2.aruco.CharucoBoard((SQUARES_VERTICALLY, SQUARES_HORIZONTALLY), SQUARE_LENGTH, MARKER_LENGTH, dictionary)

    # Generate ChArUco board image
    img = cv2.aruco.CharucoBoard.generateImage(board, (image_height, image_width), marginSize=MARGIN_PX)

    return img, board.getIds()[-1]

img, _ = create_board() # this works
# img, _ = create_board(id_offset_start = 18, id_offset_end = 34) # this will create a board, but detection won't work

dictionary = cv2.aruco.getPredefinedDictionary(ARUCO_DICT)
board = cv2.aruco.CharucoBoard((SQUARES_VERTICALLY, SQUARES_HORIZONTALLY), SQUARE_LENGTH, MARKER_LENGTH, dictionary)

params = cv2.aruco.DetectorParameters()
detector = cv2.aruco.ArucoDetector(dictionary, params)

marker_corners, marker_ids, rejectedCandidates = detector.detectMarkers(img)

# visualise it
img_marked = cv2.aruco.drawDetectedMarkers(np.copy(img), marker_corners, marker_ids, 0)

ret, charucoCorners, charucoIds = cv2.aruco.interpolateCornersCharuco(marker_corners, marker_ids, image, board)

# visualise it
img_charuco_marked = cv2.aruco.drawDetectedCornersCharuco(np.copy(img), charucoCorners, charucoIds, 1)

```

### Issue submission checklist

- [x] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: angular
Issue: Content migration from https://v17.angular.io/guide/typescript-configuration to https://angular.dev/reference/configs/typescript-configuration
Labels: P3,area: docs

### Describe the problem that you experienced

The https://angular.dev/reference/configs/typescript-configuration page shows a message 'Page Not Found 🙃'

### Enter the URL of the topic with the problem

https://angular.dev/reference/configs/typescript-configuration

### Describe what you were looking for in the documentation

Content of the https://v17.angular.io/guide/typescript-configuration page or similar

### Describe the actions that led you to experience the problem

_No response_

### Describe what you want to experience that would fix the problem

_No response_

### Add a screenshot if that helps illustrate the problem

_No response_

### If this problem caused an exception or error, please paste it here

_No response_

### If the problem is browser-specific, please specify the device, OS, browser, and version

_No response_

### Provide any additional information here in as much as detail as you can

_No response_
Repository: pytorch
Issue: user-defined triton kernels + inductor stride re-ordering can lead to silent incorrectness
Labels: high priority,triaged,oncall: pt2,module: inductor,module: user triton,module: reinplacing

Inductor is allowed to reorder the strides of intermediate tensors. user-defined triton kernels have different semantics depending on the striding of their input tensors. Nothing is stopping inductor from reordering the strides of inputs to triton kernels, so this can lead to silent incorrectness:

```
import torch
import triton
import triton.language as tl

@triton.jit
def add_kernel(
    in_ptr0,
    in_ptr1,
    out_ptr,
    n_elements,
    BLOCK_SIZE: "tl.constexpr",
):
    pid = tl.program_id(axis=0)
    block_start = pid * BLOCK_SIZE
    offsets = block_start + tl.arange(0, BLOCK_SIZE)
    mask = offsets < n_elements
    x = tl.load(in_ptr0 + offsets, mask=mask)
    y = tl.load(in_ptr1 + offsets, mask=mask)
    output = x + y
    tl.store(out_ptr + offsets, output, mask=mask)

x = torch.randn(2, 2, device="cuda")
other = torch.randn(2, 2, device="cuda")

def f(x, other):
    y = x.t().contiguous().t()
    z = y.sin().t()
    grid = (z.numel(),)
    out = torch.empty_like(other)
    add_kernel[grid](z, other, out, z.numel(), BLOCK_SIZE=16)
    return out

f_compile = torch.compile(f)

out = f(x, other)
out_compile = f_compile(x, other)
print(out)
print(out_compile)
assert torch.allclose(out_compile, out)
```

NB: we have a similar problem with custom operators that we're working on fixing (https://github.com/pytorch/pytorch/issues/124647). Maybe we can share some of the infra there.

cc @ezyang @gchanan @kadeng @msaroufim @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @muchulee8 @ColinPeppler @amjames @desertfire @oulgen @aakhundov @davidberard98 @anijain2305 @peterbell10
Repository: PowerToys
Issue: Advance Paste - Be aware of Clipboard history pinning
Labels: Idea-Enhancement,Product-Advanced Paste

### Description of the new feature / enhancement

When using the `Advance Paste` and I have a pinned item I would expect them to be on top of the list

![image](https://github.com/microsoft/PowerToys/assets/11843655/b0391dc4-182d-448c-8928-f43184e69448)


### Scenario when this would be used?

`Advance Paste` - When i use the pin feature

### Supporting information

_No response_
Repository: go
Issue: database/sql: ColumnConverter is bypassed when NumInput returns -1
Labels: NeedsInvestigation

### Go version

go version go1.22.0 linux/amd64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/jonhall/.cache/go-build'
GOENV='/home/jonhall/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/jonhall/go/pkg/mod'
GONOPROXY='gitlab.com/FlashbackSRS/priv,gitlab.com/flimzy/hacker-portfolio'
GONOSUMDB='gitlab.com/FlashbackSRS/priv,gitlab.com/flimzy/hacker-portfolio'
GOOS='linux'
GOPATH='/home/jonhall/go'
GOPRIVATE='gitlab.com/FlashbackSRS/priv,gitlab.com/flimzy/hacker-portfolio'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='/usr/bin/gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/jonhall/src/bugrepro/go.mod'
GOWORK=''
CGO_CFLAGS='-w'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1095939242=/tmp/go-build -gno-record-gcc-switches'
```

### What did you do?

I wrote a `database/sql` driver that implements the optional `ColumnConverter` interface for prepared statements, and for which `NumInputs()` returns -1.

Technically, I wrote a `databse/sql` _proxy_ driver, for the purpose of adding hooks to DB operations, to aide in debugging.  See https://gitlab.com/flimzy/errsql

But using this library with `modernc.org/sqlite` is what triggered the buggy behavior.  `modernc.org/sqlite` itself does not implement the `ColumnConverter` interface, but it _does_ return -1 for `NumInputs`.  Because the proxy driver does implement `ColumnConverter` (because it must implement it for all drivers it proxies, or none), it triggers the observed behavior.

### What did you see happen?

The `ColumnConverter` method is never called, leading to the following error from sqlite:

```
invalid driver.Value type int
```

### What did you expect to see?

I expected that `ColumnConverter` would be called.

# Analysis & Possible Fix

[This line](https://github.com/golang/go/blob/master/src/database/sql/convert.go#L58) appears to be the culprit:

```golang
	if c.want <= index {
```

`c.want` is set to the return value from `stmt.NumInputs()`, so is `-1` in this case.  The method containing this code is only executed when `ColumnConverter` is implemented, as we can see [here](https://github.com/golang/go/blob/master/src/database/sql/convert.go#L133-L136).

I believe the solution is to change the above mentioned line to:

```golang
	if c.want > 0 && c.want <= index {
```
Repository: next.js
Issue: [@next/third-parties] GSC Verification Failed - GTM/GA Scripts in <body>, not <head>
Labels: bug

### Link to the code that reproduces this issue

https://github.com/nategarrow/nextjs-third-parties-issue

### To Reproduce

1. Fork Repo and Deploy to Vercel
2. Enter a valid GTM ID in app/layout.tsx
3. Attempt to verify on GSC. Personal attempts have failed (See screenshot)
![image](https://github.com/vercel/next.js/assets/35861254/372e864b-bdb8-4bf9-a08b-77fb0b7b0833)



### Current vs. Expected behavior

### Current Behavior: Google Search Console verification failed.

Note: I noticed that the `gtm.js` file gets loaded at the end of the <body> via next/script with the "afterInteractive" strategy. However, in the GTM/GA script install process, it says to install the code in the <head>, which implies the "beforeInteractive" should be used(?), however, loading with "beforeInteractive" introduces hydration error issues (which should be its own issue).

### Expected Behavior: Google Search Console verification successful

Installing GTM and/or GA is a valid method of verification. 

Additionally, appropriate scripts should be added to the <head> instead of the <body> and should not introduce hydration errors.

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 48344
  Available CPU cores: 32
Binaries:
  Node: 20.12.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

Vercel (Deployed), Other (Deployed)

### Additional context

We know that GTM was successfully being loaded on the production site as that is how GA is installed, along with a cookie banner and other scripts, all of which were working as expected. GSC just wasn't recognizing it, presumably because it was at the end of the <body>.

Production version of this code is hosted on Vercel (https://www.arcesium.com). Had to revert to loading GTM via unoptomized scripts, but would like to switch back to either next/script or next/third-parties in the future
Repository: pytorch
Issue: [funcol] numerical error when funcol.reduce-scatter a non-contiguous tensor
Labels: triage review,oncall: distributed,module: c10d

### 🐛 Describe the bug

A minimal repro script is as follows:
``` python
import torch.distributed._functional_collectives as funcol
# init a distributed env of 4 ranks.
x = torch.arange(24).reshape(4, 3, 2).cuda()
x = x.transpose(1, 2)
y = funcol.reduce_scatter_tensor(x, reduceOp="sum", scatter_dim=0, group=[0, 1, 2, 3])
rank0print("### funcol ###")
rank0print(y)
rank0print("### golden ###")
z = x.contiguous() * 4
rank0print(z[:1, :, :])
```
It will output
```
[RANK 0] ### funcol ###
[RANK 0] AsyncCollectiveTensor(tensor([[[ 0,  4,  8],
         [12, 16, 20]]], device='cuda:0'))
[RANK 0] ### golden ###
[RANK 0] tensor([[[ 0,  8, 16],
         [ 4, 12, 20]]], device='cuda:0')
```
The bug seems come from that we always create a contiguous empty tensor for the result of `reduce-scatter`. The relevant code is 
```
# in pytorch 2.2
out_size = list(input.size())
out_size[0] //= group_size
out_tensor = input.new_empty(out_size)
work = dist.reduce_scatter_tensor(
    out_tensor, input, op=op, group=group, async_op=True
)

# or in pytroch 2.3
at::Tensor allocate_reduce_scatter_output(
    const at::Tensor& input,
    const int64_t group_size) {
  auto output_size = input.sizes().vec();
  if (output_size[0] % group_size != 0) {
    LOG(WARNING) << "The first dimension of the reduce_scatter input ("
                 << output_size[0] << ") is not divisible by the group size ("
                 << group_size << ").";
  }
  output_size[0] /= group_size;
  return at::empty(
      output_size,
      at::TensorOptions().dtype(input.dtype()).device(input.device()));
}
```
Solving this bug is easy. But I'm not sure which one is better:
1. fix in the outside (.contiguous before calling reduce-scatter), which will introduce an additional memory allocation.
2. generate a non-contiguous output in the reduce-scatter impl.

### Versions

torch release 2.2 or 2.3

cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @chauhang
Repository: godot
Issue: Autocomplete searches across newlines to close strings
Labels: bug,topic:editor,confirmed

### Tested versions

v4.3.beta2.official [b75f0485b]
Every 4.x version I've used to memory

### System information

Godot v4.3.beta2 - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.5161) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)

### Issue description

Triggering auto complete on strings (most commonly res paths) destroys everything between the string you opened and the next string in the file. Happens with double quotes / quotations and single quotes / quotations.

Code completion should probably just check up to the end of the same line instead of the entire file to close the string, though i don't particularly care if it closes the string at all; I just don't want it to change irrelevant lines.

This has probably been reported with how easy it is to trigger but I couldn't find a duplicate issue through search which is why I'm being particularly verbose. Sorry!

If it hasn't been reported then it's probably because most people use auto brace completion which adds both the opening and closing marks which prevents this issue.

### Steps to reproduce

Open any project with any resource and trigger auto complete this code with the caret placed after the `"r`:

```gdscript
extends Node
var l := preload("r
var foo := "bar"
```

https://github.com/godotengine/godot/assets/3820082/e8359b3f-fa54-4631-aa56-c5ab7314e8af


### Minimal reproduction project (MRP)

N/A
Repository: pytorch
Issue:  RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasGemmEx( handle, opa, opb, m, n, k, &falpha, a, CUDA_R_16F, lda, b, CUDA_R_16F, ldb, &fbeta, c, CUDA_R_16F, ldc, CUDA_R_32F, CUBLAS_GEMM_DEFAULT_TENSOR_OP)`
Labels: needs reproduction,module: cuda,triaged,module: cublas

 RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasGemmEx( handle, opa, opb, m, n, k, &falpha, a, CUDA_R_16F, lda, b, CUDA_R_16F, ldb, &fbeta, c, CUDA_R_16F, ldc, CUDA_R_32F, CUBLAS_GEMM_DEFAULT_TENSOR_OP)`


Am training Florence2 on A100 got all errors.



cc @ptrblck @msaroufim @csarofeen @xwang233
Repository: pytorch
Issue: Many types for `start`, `end` and `base` argument of `logspace()` work againt what the doc says
Labels: module: docs,triaged

### 📚 The doc issue

[The doc](https://pytorch.org/docs/stable/generated/torch.logspace.html) of `logspace()` says about the types for `start`, `end` and `base` as shown below:

> - start ([float](https://docs.python.org/3/library/functions.html#float) or [Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – the starting value for the set of points. If Tensor, it must be 0-dimensional
> - end ([float](https://docs.python.org/3/library/functions.html#float) or [Tensor](https://pytorch.org/docs/stable/tensors.html#torch.Tensor)) – the ending value for the set of points. If Tensor, it must be 0-dimensional
> - steps ([int](https://docs.python.org/3/library/functions.html#int)) – size of the constructed tensor
> - base ([float](https://docs.python.org/3/library/functions.html#float), optional) – base of the logarithm function. Default: 10.0.

But `int`, `complex` and `bool` for `start` and `end` and `int` and `bool` and the 0D tensor of `int`, `float`, `complex` and `bool` for `base` also work against what the doc says about the types for `start`, `end` and `base` as shown below: 

```python
import torch

torch.logspace(start=10, end=20, steps=3, base=10)
torch.logspace(start=10, end=20, steps=3, base=torch.tensor(10))
torch.logspace(start=10, end=20, steps=3, base=torch.tensor(10.))
# tensor([1.0000e+10, 1.0000e+15, 1.0000e+20])

torch.logspace(start=10.+0.j, end=20.+0.j, steps=3, base=torch.tensor(10.+0.j))
# tensor([1.0000e+10+0.j, 1.0000e+15+0.j, 1.0000e+20+0.j])

torch.logspace(start=False, end=True, steps=3, base=False)
torch.logspace(start=False, end=True, steps=3, base=torch.tensor(False))
# tensor([1., 0., 0.])
```

In addition, `complex` for `base` doesn't work as shown below:

```python
import torch

torch.logspace(start=10.+0.j, end=20.+0.j, steps=3, base=10.+0.j) # Error
```

### Suggest a potential alternative/fix

```python
import torch

torch.__version__
# torch.__version__ # 2.3.0+cu121
```

cc @svekars @brycebortree
Repository: PowerToys
Issue: Remapped Copilot Key to Ctrl - First Press Has No Effect
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.82.0

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

Keyboard Manager -> Remap a Shortcut.

Shortcut Mapping:
- Select: Win (Left) + Shift (Left) + F23
- To: Send Key/Shortcut, Ctrl (Right)

Open Microsoft Edge, do not touch the keyboard for roughly 5 seconds, and then attempt to use the remapped key with a common keyboard shortcut such as:
- Copilot + L to shift focus to the browser's Address Bar
- Copilot + '-' to reduce zoom level

### ✔️ Expected Behavior

The keyboard shortcut will work as expected.

### ❌ Actual Behavior

The keyboard shortcut does not work on the first press.  If you used the shortcut [Copilot + L], then it will simply send the letter 'l'.

You need to press-and-release the Copilot button, wait a moment, and *then* use the shortcut before it will properly register.

### Other Software

_No response_