sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: ignore all target  for CrossEntropyLoss 2d，return nan but 1d return 0
Labels: module: loss,triaged

### 🐛 Describe the bug

in file pytorch/aten/src/ATen/native/cuda/Loss.cu：nll_loss_forward_reduce_cuda_kernel_1d  added scenes that all target is ignored and return 0 for reduction is mean，but nll_loss_forward_reduce_cuda_kernel_2d  return  *output = static_cast<scalar_t>(output_acc / total_weight_acc), while total_weight_acc may be zero(all target is ignored), return nan, this may also calculate to 0.

### Versions

pytorch main，file：pytorch/aten/src/ATen/native/cuda/Loss.cu
Repository: electron
Issue: [Feature Request]: Support XDG Camera portal (selective webcam access under Linux / Flatpak)
Labels: enhancement :sparkles:

### 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 feature request that matches the one I want to file, without success.

### Problem Description

When packaging an Electron app under Linux with Flatpak, the application is sandboxed and - by default - doesn't have access to camera devices.

To allow access to camera devices, an application must be started with `--device=all` which grants access to _all_ user devices (except for shm). This isn't ideal for security reasons.

### Proposed Solution

Implement the XDG camera portal: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Camera.html This allows requesting camera access which is granted selectively.

### Alternatives Considered

Right now the alternative is adding `--device=all` to the `finish-args` in the manifest (which is non-ideal due to security reasons).

### Additional Information

_No response_
Repository: react-native
Issue: VoiceOver: Focus Returns to First Element Instead of Trigger Button After Closing Modal on iOS
Labels: Platform: iOS,Issue: Author Provided Repro,Component: Button,Component: Modal,Type: Unsupported Version

### Description

When VoiceOver is enabled on an iOS device, closing a modal by clicking the cancel button causes the focus to shift back to the first element of the screen instead of the button that triggered the modal. This issue negatively impacts the user experience for visually impaired users who rely on VoiceOver for navigation.

### Steps to reproduce

1. Ensure VoiceOver is enabled on the iOS device.
2. Open the React Native application.
3. Navigate to the screen that includes a header, body, and a button at the bottom of the screen.
4. Click the button at the bottom of the screen to open the modal.
5. Within the modal, click the cancel button to close the modal.
6. Observe the focus behavior once the modal is closed.

### React Native Version

0.74

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
System:
    OS: macOS 13.6.5
    CPU: (8) arm64 Apple M1
    Memory: 121.14 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.1 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - ~/Desktop/project/sqh.projectorange.reactnative/node_modules/.bin/yarn
    npm: 10.5.0 - /opt/homebrew/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.10121639
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.15 => 0.71.8 
    react-native-macos: Not Found
```


### Stacktrace or Logs

```text
Since this issue is related to accessibility focus behavior, It will not generate any traditional error logs or stack traces.
```


### Reproducer

https://github.com/akashsquare/accessibility_poc
https://snack.expo.dev/@akshay-sqh/accessibility-poc

### Screenshots and Videos


https://github.com/facebook/react-native/assets/58284589/4002cdda-27f8-4a37-9bd6-686c27ac47ce
Repository: excalidraw
Issue: URL whitelist request
Labels: Embeddable

Hello! I was trying to embed [this article](https://blog.anytype.io/from-cloud-to-local-first/) from [Anytype](https://anytype.io)’s [blog](https://blog.anytype.io), but it’s blocked. Would it be possible to white-list it?

Thanks a lot!
Repository: pytorch
Issue: Why need to transpose when collate a sequence data in dataloader?
Labels: module: dataloader,triaged,module: data

### 🐛 Describe the bug

When we use default collate function in https://github.com/pytorch/pytorch/blob/217aac96d779841666527402fc113493b6bd6323/torch/utils/data/_utils/collate.py#L171
If we have two data samples as (1,2,3), (2,3,4), and batch_size = 2
after collate to batch:
[(1,2), (2,3), (3,4)]
and the len(batch) is three..., but we only have two samples, we always use the first dim as batch dim, we design like this, it's so strange..  I think maybe we needn't to transpose this, and return the raw data when it's sequence type

### Versions

2.0.0

cc @andrewkho @gokulavasan @SsnL @VitalyFedyunin @dzhulgakov
Repository: PowerToys
Issue: I think PowerToys Run is making my graphics driver crash
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

Playing Helldivers 2. All of a sudden the game freezes, my screens flash a few times and it switches to onboard graphics (reduced picture quality, reduced performance, only the first monitor is active, GPU doesn't show up in the Task Manager), and throws up error reports for PowerToys Run.

### ✔️ Expected Behavior

I mean... my graphics driver working as intended I guess?

### ❌ Actual Behavior

As described above.

### Other Software

Mainly the latest version of Helldivers 2 via Steam and a very recent version at least of the AMD Adrenalin Graphics Drivers (31.0.24033.1003 for a RX 6600 XT)
Repository: terminal
Issue: wt new-tab --no-focus, to keep the focus in the current tab rather than the new tab
Labels: Issue-Feature,Product-Terminal,Area-Commandline

# Description of the new feature/enhancement

Add to `wt new-tab` an option that makes it keep the focus in the current tab, instead of switching to the new tab.
I think `--no-focus` would be a good name for the new option, and consistent with the `focus-tab` command.

I'd use this in a Bash alias that starts a console application that takes some time to initialize.  So I'd be able to continue working in the shell while the application is initializing, and switch to the application's tab a bit later.

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: godot
Issue: _UnhandledInput @event.IsActionPressed() is not capturing continuous input
Labels: documentation,topic:input

### Tested versions

-Only tested on version 4.2.2.stable.mono
-Tested on two seperate computers

### System information

Windows 10 Version10.0.19045 Build 19045, Processor	AMD Ryzen 9 5950X 16-Core Processor, 3401 Mhz, 16 Core(s), 32 Logical Processor(s), RTX 3060 TI, Forward+

### Issue description

Im trying to create a mechanic where a stat is charged by holding down a button for a set period of time.

I can get the feature implemented using the Input singleton, however for some reason I just cannot get it to work with _UnhandledInput(). This problem persists across my dektop and laptop, and two seperate Godot projects.

Currently if I use the `@event` passed through _UnhandledInput() and i use the IsActionPressed() function, the continuous input of holding down a button is not registered. Although if I use the Input singleton and do Input.IsActionPressed(), then I achieve the desired result despite the functions seeming like they should do the same thing. (from what i've been able to gather from the documentation and forums)

Intended output from the Input.IsActionPressed() implementation:

![issue correct output cropped](https://github.com/godotengine/godot/assets/15632747/3358e55d-cd5a-4b9a-af7b-eed09697f1be)


Incorrect output produced from using `@event` from _UnhandledInput()

![issue incorrect output cropped](https://github.com/godotengine/godot/assets/15632747/fa9a6c93-2bc7-4d83-bd0b-1727b7f1a0bb)

### Steps to reproduce

-Start project and run the scene
-Click anywhere on the window
-Done! You should see the output printed to console

### Minimal reproduction project (MRP)

[2D MRP Godot 2024-06-21.zip](https://github.com/user-attachments/files/15926610/2D.MRP.Godot.2024-06-21.zip)
Repository: pytorch
Issue: CVE-2024-5480 reported by security analyzers
Labels: triaged,security

### 🐛 Describe the bug

Security analyzers report a critical CVE: https://www.cve.org/CVERecord?id=CVE-2024-5480


### Versions

2.2.2, 2.3.1
Repository: pytorch
Issue: Release corresponding CUDA deps of `pytorch-nightly::pytorch-cuda` along with `pytorch-nightly::pytorch`
Labels: module: binaries,triaged,enhancement,needs design

### 🚀 The feature, motivation and pitch

When compiling PyTorch with BuildExtension, it is common to encounter issues related to mismatched CUDA versions between different dependencies. This feature aims to address and resolve such issues efficiently.

Consider the following example command to setup an environment:

`conda create -n dev python=3.12 pytorch torchvision torchaudio transformers scipy numpy rich ninja pytorch-cuda cuda -c pytorch-nightly -c nvidia -y`

In this case, the latest available version of CUDA is 12.5, and the pytorch-nightly::pytorch package also aligns with this version at 12.5. However, the pytorch-nightly::pytorch-cuda package remains at version 12.4. This misalignment can cause compatibility issues during the build process, leading to potential failures or suboptimal performance.




### Alternatives

_No response_

### Additional context

_No response_

cc @seemethere @malfet @osalpekar @atalman
Repository: PowerToys
Issue: Key Activation shall be deactivatable
Labels: Needs-Triage

### Description of the new feature / enhancement

Many of the tools have the ability, to start features (or activate the tool) by pressing some keys.

The used keys to press is user selectable, but I miss a way to set [No Key].

For example, the "Fancy Zones" tool offers a key-press to start the editor - but this feature can be triggered also from the tray > QuickAccess > FancyZones. So I don't want to "waste" a key combination for it.

A simple way to achieve that, would be in the common "Activation shortcut" editor, by extending the buttons Save/Reset/Cancel by an "Delete" button.

### Scenario when this would be used?

Unifying "a shortcut key is defined" with "no shortcut key" gives a simplification to all tools. The tool itself must not offer an implicit option activate/deactivate shortcut, but the deactivation happens by deleting the definition for a key support.

### Supporting information

_No response_
Repository: electron
Issue: [Bug]: protocol.handle is very slow
Labels: performance :checkered_flag:,component/protocol,bug :beetle:,platform/all,status/confirmed,has-repro-gist,31-x-y,32-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

31.0.2

### What operating system are you using?

Windows

### Operating System Version

Windows 10 LTSC

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

protocol.handle should be close to the speed of reading files natively.

### Actual Behavior

protocol.handle is very slow to return some large responses.

### Testcase Gist URL

https://gist.github.com/0ad30ffad2209e9021215608d05d9f35

### Additional Information

I'm using a custom protocol to serve pages as well as resources, but when I loaded the font files for my application yesterday, I noticed a very serious performance issue. For a 4M font file, Devtools shows that the loading time is 200ms, but I added a timer in protocol.handle and the time does not exceed 10 ms, so I think this is a problem between the main process and the renderer process?
Repository: vscode
Issue: Dev Tools Error: Already in transaction
Labels: tree-views,papercut :drop_of_blood:

I see this error frequently in the dev tools:

https://github.com/microsoft/vscode/blob/e87da4b1388ee441663fdfa6441d445551aaa625/src/vs/base/browser/ui/list/rowCache.ts#L66

![Code_-_Insiders_lp0O7fZZPM](https://github.com/user-attachments/assets/207423a6-331a-4406-913e-f59660ad1ae3)

Maybe because of smooth scrolling?

I guess this error is in error telemetry to get the non-minified stack trace.
Repository: langchain
Issue: google-genai [feature]: Context Caching
Labels: 🤖:enhancement,🔌: google

### Privileged issue

- [X] I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

### Issue Content

Gemini now allows a developer to create a context cache with the system instructions, contents, tools, and model information already set, and then reference this context as part of a standard query. It must be explicitly cached (ie - it is not automatic as part of a request or reply) and a cache expiration can be set (and later changed).

It does not appear to be supported in Vertex AI at this time.

Open issues:
* Best paradigm to add to cache or integrate with LangChain history system
* Best paradigm to reference

References:
* AI Studio / genai: https://ai.google.dev/gemini-api/docs/caching?lang=python
* LangChain.js: https://github.com/langchain-ai/langchainjs/issues/5841
Repository: react-native
Issue: The TextInput's showSoftInputOnFocus prop is causing unnecessary events to be triggered.
Labels: Issue: Author Provided Repro,Component: TextInput,Newer Patch Available

### Description

I'm encountering an issue with the TextInput component in React Native when using the `showSoftInputOnFocus` prop. When the `TextInput` gains focus, the keyboard does not open, the `keyboardWillShow` and `keyboardDidShow` events are not triggered. However, upon losing focus, the `keyboardWillHide` and `keyboardDidHide` events are fired.

This behavior causes problems with Keyboard Aware components that listen for these events.

### Steps to reproduce

1. Create a new React Native project.
2. Add a `TextInput` component with the `showSoftInputOnFocus` prop set to false.
3. Add event listeners for `keyboardWillShow`, `keyboardDidShow`, `keyboardWillHide`, and `keyboardDidHide` events.
4. Focus on the `TextInput` and observe that `keyboardWillShow` and `keyboardDidShow` events are not triggered.
5. Blur the TextInput and observe that `keyboardWillHide` and `keyboardDidHide` events are triggered.

### React Native Version

0.72.9

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 140.09 MB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 18.18.2
    path: ~/miniconda3/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 9.8.1
    path: ~/miniconda3/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.13.0
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK:
    API Levels:
      - "32"
      - "33"
      - "33"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.2
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google APIs Intel x86_64 Atom
      - android-33 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.1 AI-221.6008.13.2211.9619390
  Xcode:
    version: 15.0/15A240d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 18.0.2.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.9
    wanted: 0.72.9
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
```


### Stacktrace or Logs

```text
There is no crash.
```


### Reproducer

https://snack.expo.dev/@kubatyi.dev/692c3c

### Screenshots and Videos

_No response_
Repository: deno
Issue: map "deno run X" to "deno task X" if X is not a script
Labels: feat,suggestion

will require changes across the stack to properly detect if module is not found. When I tried that before it didn't work well relying on just error message
deno_graph and probably deno_npm need to return concrete error types and not be casted to a generic AnyError
Repository: godot
Issue: Type casting may cause property access error with custom resource
Labels: bug,topic:gdscript,needs testing

### Tested versions

godot 4.3.beta1

### System information

win11

### Issue description

Direct instantiation using a preloaded scene reference works as expected. Property access is ok. 
But, casting the instantiated scene to Charactor using a function (StaticClass.get_pack().instantiate() as Charactor) results in an "invalid access property" error.

### Steps to reproduce

```
extends Node2D
func _ready() -> void:
	#var ti: Charactor # works
	#ti = StaticClass.get_pack().instantiate()

	#var ti:= StaticClass.CHARACTOR_SCENE.instantiate() as Charactor # this works

	var ti:= StaticClass.get_pack().instantiate() as Charactor # unexpected type cast behavior

	print(ti.bm.add_num) # error invalid access property

#class_name StaticClass
#
#const CHARACTOR_SCENE = preload("res://CharactorScene.tscn")
#static func get_pack() -> PackedScene:
	#return CHARACTOR_SCENE

```
![image](https://github.com/godotengine/godot/assets/91177204/3bdee5fd-a4e6-4d33-8c5e-3420894969b0)
original CHARACTOR_SCENE  properties
![image](https://github.com/godotengine/godot/assets/91177204/35e69148-5b7c-4e83-8db8-e185b5d5d3c6)

### Minimal reproduction project (MRP)


[4.3test.zip](https://github.com/user-attachments/files/15929045/4.3test.zip)
Repository: vscode
Issue: Git - Recommend running `git gc` when git operations take too long
Labels: feature-request,git

I've been reporting issues to @alexr00 for a long time about copying permalink taking too long. It turns out it was just my ancient local repo hasn't been cleaned up in years. I even saw an error in Starship prompt saying git took too long:

![image](https://github.com/user-attachments/assets/ad8563c7-8404-466e-99d6-50bea90dfa0a)

Before, `git log` would take over 5 seconds, after I ran `git gc` it went down to 1.5s. With the particular `git log` call for creating a permalink going down to ~100ms, finally making it feel instantaneous once again.

It would be nice if the git extension could detect slow repos like this and suggest running `git gc`.
Repository: go
Issue: gopls/internal/analysis: noresultvalues diagnostic triggers "end > end of file + 1" bug (via telemetry)
Labels: NeedsInvestigation,gopls,Tools,gopls/telemetry-wins

```
#!stacks
"bug.Reportf" && "cache.(*action).exec.func2:+78"
```
```go
		if end > fileEnd+1 {
			if !fixed {
				bug.Reportf("end > end of file + 1")
			}
			end = fileEnd
		}
```

This stack `lMZltw` was [reported by telemetry](https://storage.googleapis.com/prod-telemetry-merged/2024-06-20.json):

noresultvalues reports a diagnostic with an End position well beyond EOF:
```go
			pass.Report(analysis.Diagnostic{
				Pos:     err.Pos,
				End:     analysisinternal.TypeErrorEndPos(pass.Fset, buf.Bytes(), err.Pos),
				Message: err.Msg,
				SuggestedFixes: []analysis.SuggestedFix{{
					Message: "Delete return values",
					TextEdits: []analysis.TextEdit{{
						Pos:     retStmt.Pos(),
						End:     retStmt.End(),
						NewText: []byte("return"),
					}},
				}},
			})
```
The file was not "fixed", i.e. it is unmodified parser output.

```
gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*action).exec.func2:+78
golang.org/x/tools/gopls/internal/cache.toGobDiagnostic:+32
golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+1
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run.func1:+25
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder:+11
golang.org/x/tools/gopls/internal/analysis/noresultvalues.run:+7
golang.org/x/tools/gopls/internal/cache.(*action).exec.func7:+31
golang.org/x/tools/gopls/internal/cache.(*action).exec:+277
golang.org/x/tools/gopls/internal/cache.execActions.func1.1:+2
sync.(*Once).doSlow:+5
sync.(*Once).Do:=65
golang.org/x/tools/gopls/internal/cache.execActions.func1:+2
runtime.goexit:+0
```
```
golang.org/x/tools/gopls@v0.16.0-pre.1 go1.22.4 darwin/arm64 vscode (1)
```

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: PFz3wQ uU3LXw s5dvOQ v7eTGw
Repository: ollama
Issue: Feature Request: Support for Meta Chameleon
Labels: feature request

[Once llama.cpp gets Chameleon support](https://github.com/ggerganov/llama.cpp/issues/7995) it'd be great if ollama could incorporate it as well.
Repository: vscode
Issue: Hide breadcrumbs in zen mode only
Labels: feature-request,breadcrumbs,workbench-zen

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.90.2
- OS Version: Windows 11 Pro

Steps to Reproduce:

1. Open any file in the editor
2. Toggle Zen-mode on