sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: PowerToys
Issue: Color of title bar of thumbnail of cropped window is white instead of system theme color and thumbnail marked area is off.
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.85.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

Crop and Lock

### Steps to reproduce

1. Keep desired window which needs to be thumbnailed active.
2. Hold win + ctrl + shift + T to launch Crop and Lock
3. Mark out the area of the window you want a thumbnail of.
4. Thumbnail window is created with a white title bar

### ✔️ Expected Behavior

Title bar of thumbnail window should be in system theme color. So if theme color is dark and all windows have dark title bar, the thumbnail window should also have the dark theme (not referring to the accent color of windows).

Noticed the same thing happening with the Reparent function as well. It would be helpful to have the system colors show up on the tile bar of it too. 

Marked out area of the thumbnail should be accurate as to the area marked out by the red border.

### ❌ Actual Behavior

Title bar color is white.

Saved area is off a bit, leaving a vertical space to the left and crops off a bit of the right side of the marked out area.



### Other Software

Windows 11 explorer window was being used, in dark mode, to make a thumbnail of.
Attaching a screenshot for your reference.

![Image](https://github.com/user-attachments/assets/0e812b43-fbb4-402f-8e7e-89234eb83f28)


Thank you so much for making these handy tools !! They are so helpful :)
Drake.
Repository: pytorch
Issue: compile + allgather with group will fail for stack-style allgather
Labels: oncall: distributed,triaged,oncall: pt2,vllm-compile,pt2d-triage-nov2024

### 🐛 Describe the bug

this simple code:

```python
import torch
import torch.distributed as dist

dist.init_process_group(backend="nccl")
group = None

def all_gather(input_: torch.Tensor, dim: int = -1, use_group=True) -> torch.Tensor:
    if use_group:
        world_size = dist.get_world_size(group)
    else:
        world_size = dist.get_world_size()
    # Bypass the function if we are using only 1 GPU.
    if world_size == 1:
        return input_
    assert -input_.dim() <= dim < input_.dim(), (
        f"Invalid dim ({dim}) for input tensor with shape {input_.size()}")

    if dim < 0:
        # Convert negative dim to positive.
        dim += input_.dim()
    input_size = input_.size()
    # Allocate output tensor.
    output_tensor = torch.empty((world_size, ) + input_size,
                                dtype=input_.dtype,
                                device=input_.device)
    # All-gather.
    if use_group:
        torch.distributed.all_gather_into_tensor(output_tensor,
                                                    input_, group=group)
    else:
        torch.distributed.all_gather_into_tensor(output_tensor,
                                                    input_)
    # Reshape
    output_tensor = output_tensor.movedim(0, dim)
    output_tensor = output_tensor.reshape(input_size[:dim] +
                                            (world_size *
                                            input_size[dim], ) +
                                            input_size[dim + 1:])
    return output_tensor

def f(x):
    x = x + 1
    return all_gather(x)

torch.cuda.set_device(dist.get_rank())

x = torch.randn(10, 20, dtype=torch.bfloat16).cuda()

y = f(x)

opt_f = torch.compile(f)

torch._dynamo.mark_dynamic(x, 0)
opt_y = opt_f(x)
```

run it with `torchrun --nproc-per-node=2 test.py` , will fail with:

```text
torch._dynamo.exc.TorchRuntimeError: Failed running call_method copy_(*(FakeTensor(..., device='cuda:0', size=(2, s0, 20), dtype=torch.bfloat16), FakeTensor(..., device='cuda:0', size=(2*s0, 20), dtype=torch.bfloat16)), **{}):
[rank0]: expand: attempting to expand a dimension of length 2*s0!
```

if I change to `use_group=False` , it works without any problem.

I think the problem is 

https://github.com/pytorch/pytorch/blob/96b30dcb25c80513769dae2a8688aec080b00117/torch/distributed/_functional_collectives.py#L1005-L1020

it will only use the concat version of allgather: input size `[a]`, output size `[a * world_size]` 

what I want to use is stack version of allgather: input size `[a]`, output size `[world_size, a]` 

### Versions

I have tested it in pytorch 2.4, 2.5 and `2.6.0.dev20241022+cu124` . they all have this problem.

I can have a workaround, by changing to the concat version of allgather. but this is definitely a bug we should fix.

cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @ezyang @chauhang @penguinwu @zou3519
Repository: react-native
Issue: TextInput onContentSizeChange triggers twice inside a Modal
Labels: Issue: Author Provided Repro,Component: TextInput,Component: Modal,Newer Patch Available,Type: New Architecture,0.76

### Description

When using a TextInput inside a Modal, the onContentSizeChange callback is triggered twice instead of once. Outside the Modal the event triggers correctly (only once).

### Steps to reproduce

1. Install and launch the application
2. Observe that onContentSizeChange triggers once (as expected)
3. Click on the "Show modal" button
4. Notice that onContentSizeChange for the TextInput inside the Modal triggers twice (unexpected behavior)

### React Native Version

0.76.0

### Affected Platforms

Runtime - Android, Runtime - iOS

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

```text
System:
  OS: Windows 10 10.0.19045
  CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  Memory: 9.86 GB / 31.84 GB
Binaries:
  Node:
    version: 20.12.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 9.8.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    Android NDK: 22.1.7171670
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-231.9392.1.2311.11330709
  Visual Studio: Not Found
Languages:
  Java: 17.0.8
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.0-alpha.2
    wanted: 15.0.0-alpha.2
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.0
    wanted: 0.76.0
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
```


### Stacktrace or Logs

```text
(NOBRIDGE) LOG  39.607845306396484
(NOBRIDGE) LOG  20.39215660095215
(NOBRIDGE) LOG  39.607845306396484
```


### Reproducer

https://github.com/ilaloov/textinput-issue

### Screenshots and Videos

_No response_
Repository: PowerToys
Issue: Maximize window button on title bar for Reparent function of Crop and Lock
Labels: Needs-Triage

### Description of the new feature / enhancement

To be able to maximize the cropped window to make edits, and resize the window again to it's cropped size as before.
Currently only the minimize and close options are available.

### Scenario when this would be used?

Many times, the cropped window needs to be edited in, for a short period of time and then returned to it's cropped state.
Currently as there is no maximize window option, the only solution is to close the window and re-crop it again which will be unproductive and break the flow state and momentum of deep work.

### Supporting information

Using Win 11 24H2 version and Power Toys v 0.85.1 in administrator mode.
Repository: transformers
Issue: safetensor/mmap memory leak when per-layer weights are converted do other dtypes
Labels: Core: Modeling,Quantization,bug,contributions-welcome

### System Info

While working on [GTPQModel](https://github.com/modelcloud/gptqmodel) which does gptq quantization of hf models and load each layer on to gpu, quantize, and then move layer back to cpu for vram reduction, we noticed a huge cpu memory leak == to layer weight of dtype when moving the layer from from dtypes. The layer stays in cpu memory, leaks, and we are unable to free it. The memory stays until the program ends. The leak happens happens when we do the dtype conversion on cpu or to gpu. 

Is this is a internal memory leak or are we doing something wrong or have the wrong expectation to how transformers/torch handles cpu tensor memory? 

Reproducing code on cpu only (to gpu has same bug). No gpu is nesssary, just load the model as `bfloat16` and do dtype transitions and observe memory leak.


### Who can help?

@ArthurZucker @SunMarc @MekkCyber

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

Env: 
```
AMD Zen3
Ubuntu: 22.04

Name: torch
Version: 2.5.0

Name: accelerate
Version: 1.0.1

Name: transformers
Version: 4.45.2 
```

```python
import gc

import torch
from memory_profiler import memory_usage
from transformers import AutoModelForCausalLM

def mem(msg: str):
    gc.collect()
    m = memory_usage()[0]
    mm = f"{msg}. memory_usage: {m} MiB"
    print(mm)

MODEL_ID = "meta-llama/Llama-3.1-8B-Instruct"

mem("load model before")
model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    torch_dtype=torch.bfloat16, 
    device_map="cpu",
)
mem("load model after")
print("model", model)

for i in range(0, 32):
    mem("to float32 before") # ref point: each layer is ~400MB in bfloat16
    model.model.layers[i].to(torch.float32)
    mem("to float32 after").  # <--- +1200MB ram == leak 400MB (1200MB - 800MB (float32)). 


```

Run the above code and watch the cpu memory usage grow linearly after each loop by 1200MB instead of expected 800MB (400MB leak per layer equal to the size of the layer in `bfloat16` before conversion). Gc() does not help. 

### Expected behavior

Constant memory equal to model weights/dtype combo. 

UPDATE: Looks the leak is isolated to model/layers loaded as `torch.bfloat16`. No memory leak observed if model/layer is first loaded as `torch.float16` or `torch.float32` and conversion to other dtypes.
Repository: tensorflow
Issue: How to map GatherElements with TFLite operator
Labels: stat:awaiting tensorflower,comp:lite,type:others,2.17

**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 24.04
- TensorFlow installed from (source or binary): binary
- TensorFlow version (or github SHA if from source): the latest version

**Standalone code to reproduce the issue** 
[WebNN GatherElements](https://source.chromium.org/chromium/chromium/src/+/main:services/webnn/public/mojom/webnn_graph.mojom;l=606?q=webnn_graph.&ss=chromium%2Fchromium%2Fsrc)  operation gather elements from the axis dimension of the input tensor indexed by the indices tensor following the equation below:

```
 output[dIndex0, ..., dIndexN] =  input[dIndex0, ..., indices[dIndex0, ..., dIndexN], ..., dIndexN]
                                                        ^ This is dAxis, indicated by `axis` parameter.
```

For example:
```
an input =  [[ 0,  1,  2],
             [10, 11, 12],
             [20, 21, 22]] with shape (3, 3),
an indices = [[1, 0],
             [2, 1],
             [0, 2]] with shape (3, 2),
and axis = 1,
the output should be [[ 1,  0],
                       [12, 11],
                       [20, 22]] with shape (3, 2).
```

WebNN has supported gather and gatherND like below table:

| WebNN operation | TFLite operator| Status|
| ------------ | ---------------| ---------------|
| gather | [tfl.gather](https://www.tensorflow.org/mlir/tfl_ops#tflgather_tflgatherop) | Done |
| gatherND| [tfl.gather_nd](https://www.tensorflow.org/mlir/tfl_ops#tflgather_nd_tflgatherndop) | Done |
| gatherElements| | |

but there is no TFLite operator to map with gatherElements, can the [BuiltinOperator_STABLEHLO_GATHER](https://source.chromium.org/chromium/chromium/src/+/main:third_party/tflite/src/tensorflow/compiler/mlir/lite/schema/schema_generated.h;l=1221?q=BuiltinOperator_STABLEHLO_GATHER&ss=chromium%2Fchromium%2Fsrc)  implement the `gatherElements` operation?

**Any other info / logs**

WebNN gatherElements is similar with [ONNX GatherElements](https://onnx.ai/onnx/operators/onnx__GatherElements.html).
Repository: tensorflow
Issue: How to map ScatterElements with TFLite operator
Labels: stat:awaiting tensorflower,type:feature,comp:lite

**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 24.04
- TensorFlow installed from (source or binary): binary
- TensorFlow version (or github SHA if from source): the latest version

**Standalone code to reproduce the issue** 
[WebNN scatterElements](https://source.chromium.org/chromium/chromium/src/+/main:services/webnn/public/mojom/webnn_graph.mojom;l=1028?q=webnn_graph.&ss=chromium%2Fchromium%2Fsrc)  operation first copies the values of `input` tensor to `output` tensor, and then overwrites the values of `output` tensor to values specified by `updates` tensor at specific index positions specified by `indices` tensor along `axis` dimension.

For example: Scatter elements along axis 0
```
 input = [[0.0, 0.0, 0.0],
          [0.0, 0.0, 0.0],
          [0.0, 0.0, 0.0]]
 indices = [[1, 0, 2],
            [0, 2, 1]]
 updates = [[1.0, 1.1, 1.2],
            [2.0, 2.1, 2.2]]
 output = [[2.0, 1.1, 0.0]
           [1.0, 0.0, 2.2]
           [0.0, 2.1, 1.2]]
```

there is no TFLite operator to map with scatterElements, can the [BuiltinOperator_STABLEHLO_SCATTER](https://source.chromium.org/chromium/chromium/src/+/main:third_party/tflite/src/tensorflow/compiler/mlir/lite/schema/schema_generated.h;l=1210;bpv=0;bpt=1)  implement the `scatterElements` operation?

**Any other info / logs**

WebNN scatterElements is similar with [ONNX ScatterElements](https://onnx.ai/onnx/operators/onnx__ScatterElements.html).
Repository: go
Issue: govulncheck-action: suggestion allow specifying cache-dependency-path
Labels: NeedsInvestigation,vulncheck or vulndb

Hi! 

The `govulncheck-action` GitHub Action  uses `setup-go` as one of its steps, but it's not possible to set the location of cache using `cache-dependency-path` so monorepo setups can't use the cache. 

Is it possible to add this as an input variable for `govulncheck-action`?
Repository: godot
Issue: `Tree` does not update its view after `SetSelected` call
Labels: bug,topic:gui

### Tested versions

- Reproducible in Godot v4.3.stable.mono.official

### System information

Windows 10 - Godot v4.3.stable.mono.official [77dcf97d8]

### Issue description

When calling `SetSelected` on a `Tree`, its view does not update.

### Steps to reproduce

Run the scene and press space to set Item1 or Item2 selected.

Here is the scene hierarchy and the script that is added to the Node2D:

- Scene
  - Node2D

```
using Godot;

public partial class TreeTest : Node2D
{
	private Tree tree;

	private TreeItem item1;
	private TreeItem item2;

	public override void _Ready()
	{
		tree = new Tree();
		tree.Size = new Vector2(200, 140);

		var root = tree.CreateItem();
		root.SetText(0, "Root");

		item1 = tree.CreateItem(root);
		item2 = tree.CreateItem(root);

		item1.SetText(0, "Item1");
		item2.SetText(0, "Item2");

		AddChild(tree);
	}

	private bool first = false;
	public override void _Input(InputEvent evt)
	{
		if (evt is InputEventKey keyEvent && keyEvent.Pressed)
		{
			if (keyEvent.Keycode == Key.Space)
			{
				tree.SetSelected(first ? item1 : item2, 0);
				first = !first;
			}
		}
	}
}

```

By pressing space we would expect the Item1 and Item2 to be highlighted one after another.
However the Items do not highlight until scrolling the mouse wheel over the tree.
A quick hack to fix this is to disable and enable the tree visibility after setting the selected item.

```
...
		if (keyEvent.Keycode == Key.Space)
		{
			tree.SetSelected(first ? item1 : item2, 0);
			first = !first;

			//hack to fix issue
			tree.Visible = false;
			tree.Visible = true;
		}
...
```


### Minimal reproduction project (MRP)

[treebug.zip](https://github.com/user-attachments/files/17503762/treebug.zip)
Repository: react
Issue: [Compiler Bug]: `useLayoutEffect` without dependency array should be allowed by either `react-hooks/exhaustive-deps` or `react-compiler/react-compiler`
Labels: Type: Bug,Status: Unconfirmed,Component: Optimizing Compiler

### What kind of issue is this?

- [ ] React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- [ ] babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- [X] eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
- [ ] react-compiler-healthcheck (build issue installing or using the healthcheck script)

### Link to repro

N/A

### Repro steps

Use `useLayoutEffect` without dependency array, for example:

```tsx
export default function Breadcrumb({ children, to }) {
  const itemRef = useRef<HTMLLIElement>(null);
  const [isLast, setIsLast] = useState<boolean>();

  useLayoutEffect(() => {
    setIsLast(itemRef.current?.matches(':last-child') ?? false);
  });

  return (
    <li ref={itemRef}>
      <a to={to} aria-current={isLast ? 'page' : undefined}>
        {children}
      </a>
    </li>
  );
}
```

This will generate a `react-hooks/exhaustive-deps` warning for using `useLayoutEffect` without dependencies, but the dependency array is optional when you want the effect to run on every render, which I do in this case. Up till now I had just ignored this warning using `// eslint-disable-next-line react-hooks/exhaustive-deps`, but now this will then generate a `react-compiler/react-compiler` warning:

> React Compiler has skipped optimizing this component because one or more React ESLint rules were disabled. React Compiler only works when your components follow all the rules of React, disabling them may result in unexpected or incorrect behavior 

So... either you should fix the `react-hooks/exhaustive-deps` rule to allow effects without dependencies (`useEffect` seem to allow this, but not `useLayoutEffect` for some reason), or the compiler should be smarter about what disabled ESLint rules to take into account...

### How often does this bug happen?

Every time

### What version of React are you using?

react@18.3.1

### What version of React Compiler are you using?

eslint-plugin-react-compiler@19.0.0-beta-8a03594-20241020
Repository: kubernetes
Issue: Why remove client tag in apiserver metrics?
Labels: sig/api-machinery,kind/feature,triage/accepted

### What would you like to be added?

`apiserver_request_count{client="Go-http-client/2.0",code="200",contentType="application/json",resource="nodes",scope="cluster",subresource="",verb="LIST"} 3486`

### Why is this needed?

we need this tag to analysis different component request detail.
Repository: ui
Issue: [bug]: Sidebar Group Label is overflowing on Sidebar Trigger when menu is closed with collapsible="icon"
Labels: bug

### Describe the bug

![Capture d'écran 2024-10-24 090932](https://github.com/user-attachments/assets/ded0138c-b964-4fbf-8b06-31479135f5c5)

As it can be seen on the screen capture, when you hover over the SidebarTrigger, the SidebarGroupLabel is focused by the cursor when menu is closed instead of focusing the trigger with `collapsible` set to `icon`.

 

### Affected component/components

Sidebar

### How to reproduce

_app/sidebar.tsx_

```tsx
<Sidebar collapsible="icon">
			<SidebarHeader></SidebarHeader>
			<SidebarGroup>
				<SidebarGroupLabel>Application</SidebarGroupLabel>
				<SidebarGroupContent>
					<SidebarMenu>
						{items.map((item) => (
							<SidebarMenuItem key={item.title}>
								<SidebarMenuButton asChild>
									<Link href={'/dashboard' + item.url}>
										<item.icon />
										<span>{item.title}</span>
									</Link>
								</SidebarMenuButton>
							</SidebarMenuItem>
						))}
					</SidebarMenu>
				</SidebarGroupContent>
			</SidebarGroup>
			<SidebarFooter />
		</Sidebar>
```

### Codesandbox/StackBlitz link

https://codesandbox.io/p/devbox/nzcszc

### Logs

_No response_

### System Info

```bash
No more relevant infos as it can be fixed by adding overflow hidden to the group component
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: PowerToys
Issue: Multi-Monitor Brightness Control
Labels: Needs-Triage

### Description of the new feature / enhancement

Powertoys already offers some great things, but one thing that seems like it's lacking, is some sort of a plugin or flyout in tray to control brightness of multi-monitors.

### Scenario when this would be used?

If someone uses multiple monitors as a lot of people do, this will become really handy

### Supporting information

Maybe something like this awesome project: https://github.com/xanderfrangos/twinkle-tray
@xanderfrangos
Repository: godot
Issue: Export Android: Godot fails to build an APK file but then it builds successfully.
Labels: platform:android,topic:buildsystem,needs testing

### Tested versions

Godot 4.3 official release.

### System information

Windows 11, Godot 4.3.

### Issue description

Here is my projeect:
[capybara_math_test.zip](https://github.com/user-attachments/files/17504599/capybara_math_test.zip)

I've recorded a video about the bug (export to android):
[BugVideo.zip](https://github.com/user-attachments/files/17504470/BugVideo.zip)

Problem Description:
I've found that if I build an APK file with UseGradle=off the APK file will be corrupted/damaged and failed to build. Then if I set UseGradle=on and build again the APK file still will be corrupted. Then if I set back UseGradle=off and build again the APK file will be built successfully! A very strange bug.

My setup:
Java SDK 23.0.1
Android Studio 2024




### Steps to reproduce

1 Download Java SDK 23 https://download.oracle.com/java/23/latest/jdk-23_windows-x64_bin.zip
2 Install Android Studio 2024 https://developer.android.com/studio
3 Install Android Packages. Tools ->SDKManager.
![image](https://github.com/user-attachments/assets/c585e8ec-7234-451e-a1ad-c6ceb94cb1cb)

4 Open my Godot project
[capybara_math_test.zip](https://github.com/user-attachments/files/17504599/capybara_math_test.zip)

5 Fix paths of AndroidSDK and JavaSDK
![image](https://github.com/user-attachments/assets/fae3355b-eaa1-4928-9223-bcbcbe26fd10)

6 Build a project with Gradle=off
![image](https://github.com/user-attachments/assets/5f7f9326-8bb3-4102-bb3f-44f8fea8bb0d)

You will see this notification. The build fails and The APK file will be corrupted/broken.
![image](https://github.com/user-attachments/assets/b4ffa3c3-8002-4a77-8bb2-89210f246280)

7 Install Build Temlate:
![image](https://github.com/user-attachments/assets/d3e30699-2356-40cc-b36b-7dd1b8357b98)

8 Try to build again with Gradle=on
![image](https://github.com/user-attachments/assets/195b16da-ea03-4a08-9c52-7f68298aeaae)

The build fails. You will see this notification.
![image](https://github.com/user-attachments/assets/e8dda702-92b3-44c9-80e5-8b11259464c4)

9 Try to build again with Gradle=off.
![image](https://github.com/user-attachments/assets/5f7f9326-8bb3-4102-bb3f-44f8fea8bb0d)

The build will succeed and there will be no any warnings!!!
The build will succeed and there will be no any warnings!!!
The build will succeed and there will be no any warnings!!!

### Minimal reproduction project (MRP)

Here is my projeect:
[capybara_math_test.zip](https://github.com/user-attachments/files/17504599/capybara_math_test.zip)