sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: missed optimization: coalesce PathBuf reallocation
Labels: T-compiler,A-io,C-optimization

compare the following disassemblies:

```rust
#![allow(dead_code)]

use std::path::{Path, PathBuf};

#[no_mangle]
pub fn boxed_path() -> Box<Path> {
    Path::new("aaa").into()
}
```

```asm
boxed_path:
        lea     rdi, [rip + .L__unnamed_1]
        mov     esi, 3
        jmp     qword ptr [rip + std::path::<impl core::convert::From<&std::path::Path> for alloc::boxed::Box<std::path::Path>>::from::hfd2d6fbd02ea1491@GOTPCREL]

.L__unnamed_1:
        .zero   3,97
```

```rust
#![allow(dead_code)]

use std::path::{Path, PathBuf};

#[no_mangle]
pub fn boxed_path() -> Box<Path> {
    PathBuf::from("aaa").into()
}
```

```asm
boxed_path:
        push    rbx
        sub     rsp, 32
        lea     rsi, [rip + .L__unnamed_1]
        lea     rbx, [rsp + 8]
        mov     edx, 3
        mov     rdi, rbx
        call    qword ptr [rip + std::sys::os_str::bytes::Slice::to_owned::hda0e6bb365f52f1f@GOTPCREL]
        mov     rdi, rbx
        call    qword ptr [rip + std::ffi::os_str::OsString::into_boxed_os_str::haa190229882bb506@GOTPCREL]
        add     rsp, 32
        pop     rbx
        ret

.L__unnamed_1:
        .zero   3,97
```
Repository: pytorch
Issue: DISABLED test_tracker_non_root_forward_backward (__main__.TestTrackerFullyShard1DTrainingCore)
Labels: module: rocm,triaged,skipped

Platforms: rocm

This test was disabled because it is failing on main branch ([recent examples](https://torch-ci.com/failure?failureCaptures=%5B%22distributed%2F_tools%2Ftest_fsdp2_mem_tracker.py%3A%3ATestTrackerFullyShard1DTrainingCore%3A%3Atest_tracker_non_root_forward_backward%22%5D)).

cc @jeffdaily @sunway513 @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
Repository: flutter
Issue: Define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES to ensure we don't miss includes necessary on libstdc++
Labels: engine,P3,team-engine,triaged-engine

We can compile and statically link our own libc++ on most (but not all) platforms. On platforms that end up using libstdc++, we end up with issues like https://github.com/flutter/engine/commit/4dd4f5454f7e673ecb8efe7e979187aeb4308642 caused by libc++ including headers transitively that libstdc++ doesn't. But having a global define for _LIBCPP_REMOVE_TRANSITIVE_INCLUDES ought to fix this [per documented guidance](https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html).

What I am not sure of is whether this goes in __config_site of a global header include. If it is the former, we should check whether the __config_site in our //flutter/third_party/libcxx is accurate. But, I suspect there may be some some platform specific TUs that won't be covered because they are never compiled with our libcxx.
Repository: kubernetes
Issue: unexpected grpc error (use of closed network connection) during apiserver lifecycle
Labels: kind/bug,needs-triage,sig/etcd

### What happened?

We have recently noticed an increase in gRPC errors (specifically, `use of closed network connection`) in apiserver logs.

log sample
`
I0619 00:22:[31.927056 11](tel:3192705611) http2_client.go:959] "[transport] [client-transport 0xc004144900] Closing: connection error: desc = \"error reading from server: read tcp 10.0.33.210:43716→10.0.32.16:2379: use of closed network connection\"\n"
`

These errors occurs intermittently every few hours during the lifecycle of apiserver.

Although there have been no reported performance regression yet, the recurring error message is concerning.



### What did you expect to happen?

Assume the error may occur when the apiserver is restarted, rather than during its lifecycle.

### How can we reproduce it (as minimally and precisely as possible)?

launch apiserver against k8s version `v1.28.9`







### Anything else we need to know?

_No response_

### Kubernetes version

<details>

Kubernetes v1.28.9


</details>


### Cloud provider

<details>

AWS EKS
</details>


### OS version

<details>

N/A

</details>


### Install tools

<details>

N/A

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: transformers
Issue: Do we need a config to change `padding_side='left` before the evaluation?
Labels: Feature request

### Feature request

I am trying to train a Llama model (a decoder-only model). I want to evaluate my model with not only the loss but also some generation-based metric. For example, my eval dataset could be a str as `1+2=`, and I use the Seq2seqTrainer which provides the modified prediction step so I can get the prediction of the model in the `EvalPrediction`. Then I write my eval code in the function `compute_metrics` and provide it for the Seq2seqTrainer.

The problem is about the padding_side of the tokenizer. Because I need to train the model, the tokenizer should be right padding in training dataset. (Because it is the default setting of Llama.) However, when I try to evaluate the model, the tokenizer should be changed into left padding because I need my model to generate. I do not find a easy way to do this, unless I change the source code of the trainer (for example, the `get_eval_dataloader` method of the Trainer).

My questions are:
1. Is it correct way to evaluate a decoder-only model in a generation-based way? Should I use the Seq2seqTrainer or is there some other methods I have not found? (Is there an example doc?)
2. Can I just train a model with right padding but evaluate it with left padding? If not, how should I evaluate models like Llama?
3. If my evaluate process is correct, how can I change the padding_side as right at the begining of the evaluation and change it back to left after the evaluation? (I think if we have the seperated training_data_coallotor and test_data_coallotor, the problem could be solved. Is it possbile for the current transformers Trainer? Or any other way to implement it?)

### Motivation

Motivation: generation-based evaluation when we train a decoder-only autoregressive model like llama.

### Your contribution

I do not know what I can help.
Repository: tensorflow
Issue: Data Service Dynamic sharding policy seems extremely slow
Labels: stat:awaiting tensorflower,comp:data,type:performance,TF 2.15

### Issue type

Performance

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

v2.15.0-11-g63f5a65c7cd 2.15.1

### Custom code

No

### OS platform and distribution

Linux Debian

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

distributing a simple dataset with sharding policy dynamic should have similar data read performance to sharding policy OFF

### Standalone code to reproduce the issue

```shell
Hi,

I have a very simple example but setting sharding policy to dynamic vs off makes a huge difference in data speed.


dataset = tf.data.Dataset.range(100)
dataset_id = tf.data.experimental.service.register_dataset(dataset=dataset, service=dispatcher_addr)
dataset = tf.data.experimental.service.from_dataset_id(processing_mode=tf.data.experimental.service.ShardingPolicy.OFF, service=dispatcher_addr, dataset_id=dataset_id)

for x in dataset:
    print(x)
```
is almost instantaneous. But If I change the sharding policy to `DYNAMIC` (to ensure at most once visitation) it is horrendously slow even on this simple dataset.

Any idea what Im doing wrong?
```


### Relevant log output

_No response_
Repository: godot
Issue: Converting large float to string doesn't work
Labels: bug,discussion,topic:core

### Tested versions

3.5.3.stable

### System information

Windows 10

### Issue description

If you try to convert a very large float to a String, you get an empty String instead.

`str(1e248)` will return an empty String. It seems like the issue starts occurring around e248, because doing `str(1e247)` actually works and properly returns the converted String.

### Steps to reproduce

Create a new project, make a new script that runs `str(1e248)` and notice that the returned String is empty

### Minimal reproduction project (MRP)

N/A
Repository: opencv
Issue: RGB->XYZ color space conversion improvement
Labels: feature,category: imgproc

### Describe the feature and motivation

Previous issues relating to color space transformations have been mentioned in #18813. 

In this instance, the [documentation ](https://docs.opencv.org/4.x/de/d25/imgproc_color_conversions.html) states RGB->XYZ conversion is performed via a matrix operation, but it fails to note that OpenCV's XYZ conversion is just one of five possible ways of computing the XYZ, all with different results.

More specifically, OpenCV's RGB->XYZ uses a gamma of 1.0 (which is to say, there is no exponent applied). While this makes the transformation easier to implement, it can cause downstream issues when cvtColor is being used as a step for color correction. My task takes RGB values, transforms them to XYZ, and then uses the methodology described in [this paper](https://arxiv.org/pdf/2105.10228) to achieve a better color balance for color constancy. With OpenCV's implementation of RGB->XYZ, I get incredibly bright/washed out colors. Using [Bruce Lindbloom's](http://www.brucelindbloom.com/index.html) CIE color calculator, I was able to find that OpenCV uses gamma=1.

I propose that the cvtColor function be overhauled, with additional optional parameters for CIE color space transformation, including the ability to change reference white (currently uses D65 only), and the ability to adjust gamma values.

### Additional context

Using my own conversion implementation with Eigen, I verified that I get the same XYZ values as in this image:
![image](https://github.com/opencv/opencv/assets/22501974/167951b2-119c-4fcd-9e87-e0558098f81f)

Following this, I compared the results from OpenCV's implementation and found that its results match the XYZ in this image:
![image](https://github.com/opencv/opencv/assets/22501974/f095ac95-9d4b-4eb1-b060-a10d9aad35e6)
Repository: flutter
Issue: Support iOS 18 Writing Tools text input feature in web view
Labels: platform-ios,p: webview,package,c: proposal,P2,team-ios,triaged-ios

Add support for Apple Intelligence text editing context menu "Writing Tools" in web views.  
1. Confirm the default "limited" behavior works out-of-the-box on the iOS 18 beta (`UIWritingToolsBehavior`)
1. Add something to the interface to set `writingToolsBehavior` from the dart side.
1. Add something to the interface to set `writingToolsAllowedInputOptions` from the dart side.

https://developer.apple.com/videos/play/wwdc2024/10168/?time=476

```swift
// For `WKWebView`, the `default` behavior is equivalent to `.limited`

extension WKWebViewConfiguration {
    @available(iOS 18.0, *)
    open var writingToolsBehavior: UIWritingToolsBehavior { get set }
}

extension WKWebView {
    /// @discussion If the Writing Tools behavior on the configuration is `.limited`, this will always be `false`.
    @available(iOS 18.0, macOS 15.0, *)
    open var isWritingToolsActive: Bool { get }
}
```
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/4459101-writingtoolsbehavior

iOS issue at https://github.com/flutter/flutter/issues/150452
macOS issue at https://github.com/flutter/flutter/issues/150453

cc @bparrishMines
Repository: TypeScript
Issue: Investigate Wildcard Matching Performance
Labels: Suggestion,Domain: Performance

Recently I investigated optimizing path matching in https://github.com/microsoft/TypeScript/pull/59048 since an internal project had over 5500 path mapping entries.

@dmichon-msft brought up a similar issue they had with a project where using wildcard entries in `include` caused a 14 second slowdown in their builds. Some of the same optimizations might be usable in `include`/`exclude` globbing, or we could adapt a different solution with a radix tree or a similar data structure (e.g. https://github.com/microsoft/rushstack/blob/1bf90f890d59de5babaf07ccc2551b77df704b18/libraries/rush-lib/src/logic/LookupByPath.ts as pointed out at https://github.com/microsoft/TypeScript/pull/59048#discussion_r1657649883).
Repository: kubernetes
Issue: CEL: CallCost the function args mix receiver with argument in way that is prone to misuse
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

Reported here: https://github.com/kubernetes/kubernetes/pull/125571/files/b0bcc0b20d5d97efdd30215ea410c3bc56d8916b..e2cee4d48f596d6ac4032e22bb08cc98252cb3f5#r1657864062

### What did you expect to happen?

CallCost is improved to provide receiver argument separate from positional arguments (nil if absent).

### How can we reproduce it (as minimally and precisely as possible)?

See report

### Anything else we need to know?

_No response_

### Kubernetes version

N/A

### Cloud provider

N/A

### OS version

_No response_

### Install tools

_No response_

### Container runtime (CRI) and version (if applicable)

_No response_

### Related plugins (CNI, CSI, ...) and versions (if applicable)

_No response_
Repository: godot
Issue: Geometry gets strongly visually modified (simplified) when Camera3D's x frustum_offset is decreased below a certain negative number
Labels: discussion,needs testing,topic:3d

### Tested versions

- Reproducible in: 4.2.2-stable, 4.2.1-stable

### System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Quadro M1000M () - Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 Threads)

### Issue description

When decreasing the x value of the Camera3D's frustum_offset (in "Projection Frustum" mode), from a certain value onwards (depending on the near plane and the size, with near plane = 1 and size = 1, a frustum_offset <= -0.89 creates the issue), the geometry of many 3D models gets over-simplified with a big visual impact.

### Steps to reproduce

Add custom geometry to scene (.glb file). Set the Camera3D to Projection Frustum mode and decrease its frustum_offset.x value. If required, adjust camera's position to keep geometry in visible range. Effect seems to not appear on all geometries.

### Minimal reproduction project (MRP)

[Camera_Bug.zip](https://github.com/user-attachments/files/16022261/Camera_Bug.zip)
Repository: vscode
Issue: Customize chat confirmation API buttons
Labels: feature-request,api,chat

The ChatResponseStream `confirm` API should support a custom set of buttons
Repository: PowerToys
Issue: Mouse Without Borders does not move seamlessly between monitors
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

No

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce


https://github.com/microsoft/PowerToys/assets/174070641/7c9f03e4-2f51-49a2-9806-770aada41ca0

As you can see in the screen recording, the MWB feature has a bug where it resets the Mouse back to the Center Top of the desktop screen when moving from one monitor to the other on which ever PC is hosting. This makes it very jarring and hard to use when switching between monitors. I don't recall this being an issue prior to the last most recent update as I use this feature on the daily.

### ✔️ Expected Behavior

I expect the Mouse to move seamlessly when switching between monitors.  

### ❌ Actual Behavior

As you can see in the screen recording, the MWB feature has a bug where it resets the Mouse back to the Center Top of the desktop screen when moving from one monitor to the other on which ever PC is hosting. This makes it very jarring and hard to use when switching between monitors. I don't recall this being an issue prior to the last most recent update as I use this feature on the daily.

https://github.com/microsoft/PowerToys/assets/174070641/c96cf367-a6da-4067-8ba3-b4519d9cb710



### Other Software

_No response_
Repository: ollama
Issue: Ollama stderr returns info logs
Labels: bug

### What is the issue?

Ollama is outputting regular logs that should be in `stdout` but they are outputting in `stderr` when running it through a subprocess, these logs should be outputting via stdout and only errors through stderr

This is for all supported OS.

### OS

Linux, macOS, Windows, Docker, WSL2

### GPU

Nvidia, AMD, Intel, Apple

### CPU

Intel, AMD, Apple

### Ollama version

0.1.47
Repository: godot
Issue: AStarGrid2D allow_partial_path does not always find the shortest path
Labels: discussion,topic:core,documentation,needs testing

### Tested versions

- Reproducible in: [Godot 4.3 beta2](https://godotengine.org/download/archive/4.3-beta2)

### System information

Godot v4.3.beta2 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 (NVIDIA; 31.0.15.4633) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

### Issue description

When using the `get_point_path` method of the `AStarGrid2D` class with `allow_partial_path` flagged as true, the returned path is often not the shortest. Specifically when there are multiple points which are equally far from the target point, the one with the shortest path from the start point isn't guaranteed to be chosen.
![allow_partial_path_bug](https://github.com/godotengine/godot/assets/107012155/dcf35704-fd74-4ad2-885e-b3e09d3de50a)
The docs do not mention this anywhere:
> If there is no valid path to the target, and allow_partial_path is true, returns a path to the point closest to the target that can be reached.

### Steps to reproduce

- Choose a target point of the path which is unreachable from the start.
- Choose a target point such that there are multiple final positions which are equally far from the start point. 

In the MRP is have 6 examples which can be cycled with the button in the top left of the demo.

cc @theashtronaut 

### Minimal reproduction project (MRP)

[MRP](https://github.com/user-attachments/files/16022968/astargrid2d-.allow_partial_path.-mrp.zip)
- Start the scene to see the visualization of the issue.
- Look at different scenarios by clicking the button in the top left.
Repository: next.js
Issue: Webpack Errors from Middleware Imports
Labels: bug,Middleware,Webpack

### Link to the code that reproduces this issue

https://github.com/creativeindustriesgroup/nextjs-webpack-middleware-issue

### To Reproduce

When importing certain packages into middleware, accessing any page which triggers the middleware will throw the error:
`./node_modules/farmhash-modern/bin/bundler/farmhash_modern_bg.wasm
Module parse failed: Unexpected character '' (1:0)
The module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.
BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.
You need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated).
For files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: "webassembly/async"').
(Source code omitted for this binary file)`

### Current vs. Expected behavior

Packages such as firebase-admin, with-electron-typescript and mssql cannot be imported into middleware. I would expect these packages to be importable in order to perform operations such as token validation (in the case of firebase) in middleware.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64
  Available memory (MB): 32768
  Available CPU cores: 16
Binaries:
  Node: 20.13.1
  npm: 10.5.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Middleware, Webpack

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

### Additional context

Issue seems similar in:

- https://github.com/vercel/next.js/issues/49581
- https://github.com/vercel/next.js/discussions/59736
- https://github.com/vercel/next.js/discussions/63028
Repository: PowerToys
Issue: Key Remapper no longer allows binding a key to only a modifier
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

Create a new key remapping from any key to any modifier only.
<img width="508" alt="image" src="https://github.com/microsoft/PowerToys/assets/90163196/59511505-c569-469d-9f8b-cbba26446a13">
When saving, this error now appears.
<img width="418" alt="image" src="https://github.com/microsoft/PowerToys/assets/90163196/861c25e7-4f5d-48e1-9e81-091e8dfa11d7">

Previously this binding worked fine (around 0.71.x I believe), however once I updated and opened this menu, the remapping stopped working.

### ✔️ Expected Behavior

The chosen key to become a modifier key.

### ❌ Actual Behavior

The key does not remap and a warning is displayed upon saving.

### Other Software

_No response_
Repository: ollama
Issue: ollama should detect native windows proxy configuration
Labels: feature request,windows,networking

### What is the issue?

Ollama seems to fail to update itself in recent versions and app logs are as follow:
```
time=2024-06-28T11:23:56.487+08:00 level=INFO source=logging.go:50 msg="ollama app started"
time=2024-06-28T11:23:56.540+08:00 level=INFO source=server.go:176 msg="unable to connect to server"
time=2024-06-28T11:23:56.540+08:00 level=INFO source=server.go:135 msg="starting server..."
time=2024-06-28T11:23:56.547+08:00 level=INFO source=server.go:121 msg="started ollama server with pid 31184"
time=2024-06-28T11:23:56.547+08:00 level=INFO source=server.go:123 msg="ollama server logs C:\\Users\\<username>\\AppData\\Local\\Ollama\\server.log"
time=2024-06-28T11:24:00.238+08:00 level=INFO source=updater.go:102 msg="New update available at https://github.com/ollama/ollama/releases/download/v0.1.47/OllamaSetup.exe"
time=2024-06-28T11:24:00.257+08:00 level=ERROR source=updater.go:212 msg="failed to download new release: error checking update: Head \"https://github.com/ollama/ollama/releases/download/v0.1.47/OllamaSetup.exe\": dial tcp 127.0.0.1:443: connectex: No connection could be made because the target machine actively refused it."
```
I'm behind a proxy and its obviously not on the 443 port, and ollama server is not listening on it. running `nslookup` also shows the correct IP rather than localhost. So I have a suspicion that something in proxy detection has gone wrong...


### OS

Windows

### GPU

Nvidia

### CPU

Intel

### Ollama version

0.1.46
Repository: go
Issue: x/tools/gopls: combine -debug HTTP server and product (doc, asm, free symbols) web server
Labels: gopls,Tools

It is unnecessary that gopls creates two HTTP servers, one for debugging and one for the "product" (as used by the doc, assembly, and free-symbols code actions).  We should combine them, and also start the combined server early, during startup (reducing the need for later error handling).

@findleyr suggests that if the user provides a -debug flag, we should use that for the combined server instead of the ephemeral random port + secret endpoint that we currently use.