sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: RecursionError for MaskedTensor.where
Labels: triaged,module: masked operators

### 🐛 Describe the bug

```pycon
>>> import torch
>>> from torch.masked import MaskedTensor
>>> a = MaskedTensor(torch.tensor([0, 1, 1]), torch.tensor([True, True, False]))
>>> b = MaskedTensor(torch.tensor([1, 1, 1]), torch.tensor([True, True, False]))
>>> torch.where(a != 0, a, b)
...
RecursionError: maximum recursion depth exceeded while calling a Python object
```

whereas:

```pycon
>>> torch.where((a != 0)._masked_data, a, b)
MaskedTensor(
  [0, 1,       --]
)
```

I understand that when a value is not specified in the mask, it is impossible to know from which tensor to take the value from. However, due to the existance of `torch.Tensor.where`, I understand the semantic as "for each cell where the mask is `False`, take the value from other, otherwise take from self".

- Hence, can we change the operator to use `cond = cond.to_tensor(True)` if the condition is a `MaskedTensor`?
- Otherwise, can we accept a `MaskedTensor` as `cond` if both masks from `self` and `other` match? In that case there is no ambiguity, and we can apply `cond = _get_data(cond)`

### Versions

main and latest
Repository: flutter
Issue: Xcode compilation is slow on macOS 14 bots
Labels: team-infra,P1

There seems to be a pretty high frequency of timeouts right now on mac ci bots.
Examples:
From https://github.com/flutter/flutter/pull/150585
https://github.com/flutter/flutter/pull/150585/checks?check_run_id=26535171974
https://github.com/flutter/flutter/pull/150585/checks?check_run_id=26535172379

From https://github.com/flutter/flutter/pull/150614
https://github.com/flutter/flutter/pull/150614/checks?check_run_id=26520636606
https://github.com/flutter/flutter/pull/150614/checks?check_run_id=26520632867

From https://github.com/flutter/flutter/pull/150517
https://github.com/flutter/flutter/pull/150517/checks?check_run_id=26528249189
https://github.com/flutter/flutter/pull/150517/checks?check_run_id=26528248334
Repository: vscode
Issue: Copy a link from integrated terminal via context menu
Labels: feature-request,terminal-links

I'd like to be able to right-click a hyperlink in the integrated terminal, and copy it to the clipboard. Currently, I can only:

- Ctrl+click, to open the link in a new tab of whichever browser is the system default.
  - This doesn't work when I need to paste the link in a specific place, or open it in a specific browser window (of multiple open windows).
- Manually select the link (drag cursor across it precisely), and copy selected text.
  - This is cumbersome.

For comparison, GNOME Terminal lets you right-click and copy a link:

![image](https://github.com/microsoft/vscode/assets/13605043/89952e4a-f5d7-44ae-b2bb-850e975c27de)

IntelliJ IDEA does too:

![image](https://github.com/microsoft/vscode/assets/13605043/9901d8de-c764-4637-bc8d-2977f706be89)

This similar but distinct from #202717 .
Repository: pytorch
Issue: [ONNX] Exporter improvement tasks
Labels: module: onnx,triaged

## Missing operators 🕵️

- [x] #129275
- [x] https://github.com/microsoft/onnxscript/pull/920

## API improvements 🌱

- [x] #129276

## Implementation migration 🚚

- [x] #135125
- [x] #129277
- [ ] #129279
- [x] https://github.com/justinchuby/torch-onnx/issues/58
- [x] https://github.com/microsoft/onnxscript/issues/1697
- [x] #129308
- [x] #136274
- [x] https://github.com/pytorch/pytorch/issues/135182
- [x] https://github.com/pytorch/pytorch/issues/135183

## Exporter feature ✨

- [x] https://github.com/microsoft/onnxscript/issues/1696
- [x] https://github.com/microsoft/onnxscript/issues/1701
- [x] https://github.com/microsoft/onnxscript/issues/1769
- [ ] https://github.com/microsoft/onnxscript/issues/1700
- [x] https://github.com/microsoft/onnxscript/issues/1698
- [x] https://github.com/pytorch/pytorch/issues/117655

## Benchmarking⏱️

- [x] #129280


cc @gramalingam @MaanavD
Repository: pytorch
Issue: [ONNX] Create unit tests for the new export path by adapting all existing tests
Labels: module: onnx,triaged
Repository: flutter
Issue: iOS embedder creates overlay layer based on platform view bounds but does not take clip bounds into account.
Labels: engine,P2,team-ios,triaged-ios

Running the ad benchmark app. In this case, there is nothing in the overlay layer, but we still present it.

![image](https://github.com/flutter/flutter/assets/8975114/8a8168e0-0c94-4011-90f9-e657835da14e)

We should have a mechanism to query EmbedderViewSlice or the DlCanvas to determine if there are any rendering ops in a layer (after culling) so that we can drop the layer entirely?

FYI @hellohuanlin / @flar
Repository: pytorch
Issue: Support for torch.Generator with JIT
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

I am trying to sample random values in a jitted module and want to sample from different random sources a.k.a generators with different seeds. However, I get an error when I try to JIT  `torch.Generator`. As I did not find any documentation on support of Generators with `torch.jit`, I think it is not implemented but I am not sure. (That's why a feature request).

Below is a simple test and error associated with it.

```python
>>> import torch
>>> g_cpu = torch.Generator()
>>> g_cpu = torch.jit.script(g_cpu)

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/torch/_sources.py", line 23, in get_source_lines_and_file
    sourcelines, file_lineno = inspect.getsourcelines(obj)
  File "/usr/lib/python3.10/inspect.py", line 1121, in getsourcelines
    lines, lnum = findsource(object)
  File "/usr/lib/python3.10/inspect.py", line 950, in findsource
    raise OSError('source code not available')
OSError: source code not available

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/torch/jit/_script.py", line 1405, in script
    return torch.jit._recursive.create_script_class(obj)
  File "/usr/local/lib/python3.10/dist-packages/torch/jit/_recursive.py", line 525, in create_script_class
    _compile_and_register_class(type(obj), rcb, qualified_class_name)
  File "/usr/local/lib/python3.10/dist-packages/torch/jit/_recursive.py", line 59, in _compile_and_register_class
    ast = get_jit_class_def(obj, obj.__name__)
  File "/usr/local/lib/python3.10/dist-packages/torch/jit/frontend.py", line 266, in get_jit_class_def
    sourcelines, file_lineno, filename = get_source_lines_and_file(
  File "/usr/local/lib/python3.10/dist-packages/torch/_sources.py", line 32, in get_source_lines_and_file
    raise OSError(msg) from e
OSError: Can't get source for <class 'torch._C.Generator'>. TorchScript requires source access in order to carry out compilation, make sure original .py files are available.
```

This seems to be a different problem from the following issue as it is about typing support:
[[JIT] allow Optional[torch.Generator] be tracable in Python](https://github.com/pytorch/pytorch/issues/69006)

### Alternatives

_No response_

### Additional context

_No response_

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: vscode
Issue: Add Selection To Next Find Match does not work with regex search
Labels: bug,editor-find

<!-- ⚠️⚠️ 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?: No (Haven't tried but very likely)

<!-- 🪓 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
- OS Version: Windows_NT x64 10.0.19045

Steps to Reproduce:

1.  Make a new temporary file with this as the contents:
```
001
002
003
```
2. Enter search with `Ctrl+F` and enable regex mode, then put `\d{3}` as the pattern and select the next match until `001` is selected
3. Press `Ctrl+D` or run `Add Selection To Next Find Match` from the commands menu manually

Current behaviour:
- Nothing happens

Expected result:
- There is now a multi-cursor selection - one selecting `001` and another selecting `002`

Note: This works as expected when the goal is to select *all* regex occurrences - `Ctrl+Shift+L` works fine in that case, but `Ctrl+D` seems to only work with non-regex selections.
Repository: vscode
Issue: No spell check in Report Issue UI
Labels: feature-request,issue-reporter

Type: <b>Bug</b>

Trehe is no sepll cehck in tihs UI
![image](https://github.com/microsoft/vscode/assets/3840081/ee218397-0506-4ffc-92ed-e9ceb0835c42)


VS Code version: Code - Insiders 1.91.0-insider (6afc1c279374106ca4c60382c0d92ed661f4c7e4, 2024-06-20T05:49:38.362Z)
OS version: Windows_NT x64 10.0.22631
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.60GB (7.98GB free)|
|Process Argv|--folder-uri file:///c%3A/GIT/s%20p/vscode-python --log info --crash-reporter-id 4fb1ebc1-cf4c-4880-a88a-47738ec3768d|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (21)</summary>

Extension|Author (truncated)|Version
---|---|---
tsl-problem-matcher|amo|0.6.2
ruff|cha|2024.28.0
vscode-eslint|dba|3.0.10
gitlens|eam|15.1.0
EditorConfig|Edi|0.16.4
prettier-vscode|esb|10.4.0
copilot|Git|1.206.0
copilot-chat|Git|0.17.2024062101
vscode-github-actions|git|0.26.3
vscode-pull-request-github|Git|0.91.2024062004
debugpy|ms-|2024.7.11591013
python|ms-|2024.7.11452234
vscode-pylance|ms-|2024.6.101
jupyter|ms-|2024.6.2024062001
jupyter-keymap|ms-|1.1.2
jupyter-renderers|ms-|1.0.18
vscode-jupyter-cell-tags|ms-|0.1.9
vscode-jupyter-slideshow|ms-|0.1.6
remote-wsl|ms-|0.88.2
rust-analyzer|rus|0.3.2002
code-spell-checker|str|3.0.1


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
vsc_aacf:30263846
vscod805cf:30301675
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
vscrpc:30624061
a9j8j154:30646983
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythonregdiag2:30926734
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
jchc7451:31067543
showvideot:31016890
chatpanelt:31014475
0ee40948:31013168
a69g1124:31018687
dvdeprecation:31040973
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31057980
nativerepl2:31071685

```

</details>

<!-- generated by issue reporter -->
Repository: flutter
Issue: [camera_android_camerax] `ResolutionPreset.max` gets different camera aspect ratio compare to `camera_android`
Labels: platform-android,p: camera,package,has reproducible steps,P2,team-android,triaged-android,found in release: 3.22

### Steps to reproduce

1. Setup the example of `package:camera`.
2. Update the `ResolutionPreset` for the `CameraController` to always use `max`.
3. Switch between `camera_android` and `camera_android_camerax` implementation.
4. The aspect ratio of all cameras is different.

#### Reproducible Devices
- OnePlus 11 (PHB110)

### Expected results

They might have the same specs.

### Actual results

All cameras have different aspect ratios between implementations.

### Code sample

https://github.com/flutter/packages/blob/04d2572672f0d6561207f11773fd23f9c88d84e3/packages/camera/camera/example/lib/main.dart

### Screenshots or Video

| camera_android | camera_android_camerax |
|------|------|
| ![image](https://github.com/flutter/flutter/assets/15884415/f5f3c4b9-ec0a-45f6-8200-88a3d2ce8d9a) | ![image](https://github.com/flutter/flutter/assets/15884415/bfc7f2da-2a73-4603-a806-6baef197ef18) |

### Logs

N/A

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64 (Rosetta), locale zh-Hans-CN)
    • Flutter version 3.22.2 on channel stable at /Users/alex/dev/flutter-322
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (2 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3
```

</details>
Repository: flutter
Issue: [camera_android_camerax] `setZoomLevel` is slow or throttled compare to `camera_android`
Labels: platform-android,p: camera,package,has reproducible steps,P2,team-android,triaged-android,found in release: 3.22

### Steps to reproduce

1. Setup the example of `package:camera`.
3. Switch between `camera_android` and `camera_android_camerax` implementation.
4. Pan to scale when switched to one of the cameras.

#### Reproducible Devices
- OnePlus 11 (PHB110)

### Expected results

Zooming behavior should be consistent with users' interactions.

### Actual results

The zooming is obviously slow or throttled compared to the Camera2 implementation.

### Code sample

https://github.com/flutter/packages/blob/04d2572672f0d6561207f11773fd23f9c88d84e3/packages/camera/camera/example/lib/main.dart


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

### camera_android

https://github.com/flutter/flutter/assets/15884415/8084003b-460f-4ec2-9d41-a996af219133

### camera_android_camerax

https://github.com/flutter/flutter/assets/15884415/be842455-6199-417f-8d91-9cd4e2ff599d

</details>


### Logs

N/A

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64 (Rosetta), locale zh-Hans-CN)
    • Flutter version 3.22.2 on channel stable at /Users/alex/dev/flutter-322
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (2 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3
```

</details>
Repository: next.js
Issue: expect is not defined when running next.js with Jest
Labels: examples

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 4018
  Available CPU cores: 4
Binaries:
  Node: 21.1.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // There is a newer version (14.2.4) available, upgrade recommended!
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
```


### Which example does this report relate to?

examples/with-jest

### What browser are you using? (if relevant)

  Chrome: 126.0.6478.114     Edge: Chromium (126.0.2592.61)     Internet Explorer: 11.0.19041.4355

### How are you deploying your application? (if relevant)

Vercel

### Describe the Bug

when I am running the test cases, it's showing that expect is not defined


![Screenshot (558)](https://github.com/vercel/next.js/assets/111265239/40ce7b53-9f60-46c6-a007-90aa6a4da9a3)


### Expected Behavior

to run my test cases smoothly

### To Reproduce

run the `npm run test` it should give the error

```typescript
// __tests__/index.test.jsx
import '@testing-library/jest-dom'
import { render, screen } from '@testing-library/react'
import ProfileForm from '@/components/Form'
import {expect, jest, test} from '@jest/globals';
import '@testing-library/jest-dom/extend-expect'; // for additional matchers

describe('Home', () => {
  it('renders a heading', () => {
    render(<ProfileForm />)
 
    const heading = screen.getByRole('heading', { level: 1 })
 
    expect(heading).toBeInTheDocument()
  })
})
// jest.config.ts
import type { Config } from 'jest'
import nextJest from 'next/jest.js'
const createJestConfig = nextJest({
  dir: './',
})
const config: Config = {
  coverageProvider: 'v8',
  testEnvironment: 'jsdom',
  setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
  setupFiles: ['<rootDir>/jest.setup.ts'],
}
export default createJestConfig(config)

//jest.setup.ts
import { config } from 'dotenv';
config();
import '@testing-library/jest-dom';

``` 


minimal reproduction = https://github.com/Boby900/yogurt
Repository: ui
Issue: [bug]: cannot use Dropdown menu with dialog
Labels: bug

### Describe the bug

When using a dropdown to open a dialog, the dialog can be opened (sometimes) but then when closing the dialog, the screen becomes unclickable

### Affected component/components

DropdownMenu, Dialog

### How to reproduce

1. Create a DropdownMenu with a trigger to open a dialog
2. Close the dialog

The screen becomes unclickable

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
MacOS, Chrome
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: pytorch
Issue: The unexpected behavior of `sort()`
Labels: module: docs,triaged,actionable,module: python frontend

### 🐛 Describe the bug

[sort()](https://pytorch.org/docs/stable/generated/torch.sort.html) works with 4 argument keywords as shown below:

```python
import torch

my_tensor = torch.tensor([7, 1, -5, 7, 9, -3, 0, -3])

torch.sort(input=my_tensor, dim=0, descending=False, stable=False) # Works
# torch.return_types.sort(
# values=tensor([-5, -3, -3,  0,  1,  7,  7,  9]),
# indices=tensor([2, 5, 7, 6, 1, 0, 3, 4]))
```

But `sort()` doesn't work without 4 argument keywords as shown below:

```python
import torch

my_tensor = torch.tensor([7, 1, -5, 7, 9, -3, 0, -3])

torch.sort(my_tensor, 0, False, False) # Error
```

```
TypeError: sort() received an invalid combination of arguments - got (Tensor, int, bool, bool), but expected one of:
 * (Tensor input, *, bool stable, int dim, bool descending, tuple of Tensors out)
 * (Tensor input, int dim, bool descending, *, tuple of Tensors out)
 * (Tensor input, *, bool stable, name dim, bool descending, tuple of Tensors out)
 * (Tensor input, name dim, bool descending, *, tuple of Tensors out)
```

In addition, `sort()` works without 2 or 3 argument keywords as shown below:

```python
import torch

my_tensor = torch.tensor([7, 1, -5, 7, 9, -3, 0, -3])

torch.sort(my_tensor, 0) # Works
torch.sort(my_tensor, 0, False) # Works
# torch.return_types.sort(
# values=tensor([-5, -3, -3,  0,  1,  7,  7,  9]),
# indices=tensor([2, 5, 7, 6, 1, 0, 3, 4]))
```

### Versions

```python
import torch

my_tensor = torch.tensor([7, 1, -5, 7, 9, -3, 0, -3])

torch.__version__ # 2.3.0+cu121
```

cc @svekars @brycebortree @albanD
Repository: electron
Issue: [Feature Request]: Error when running quick start off of network storage
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 bug report that matches the one I want to file, without success.

### Electron Version

31.0.2

### What operating system are you using?

macOS

### Operating System Version

macOS Sequoia 15.0 beta 1

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

_No response_

### Expected Behavior

I expected the quick start application to run when developing off of a network storage device.

### Actual Behavior

The application fails with an error, as shown:
```
kattschan@Kats-MacBook-Air ulu % npm run start

> ulu@1.0.0 start
> electron .

[0622/004351.492993:ERROR:icu_util.cc(176)] icudtl.dat not found in bundle
[0622/004351.495815:ERROR:icu_util.cc(223)] Invalid file descriptor to ICU data received.
/Volumes/storage/code/ulu/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron exited with signal SIGTRAP
kattschan@Kats-MacBook-Air ulu %
```

### Testcase Gist URL

https://fiddle.electronjs.org/launch?target=electron/v31.0.2/docs/fiddles/quick-start

### Additional Information

This code runs fine when run I simply copy the code to my Desktop. I have yet to test it on other OSes.
Repository: godot
Issue: Selecting AnimationTree Node didn't jump to the bottom panel of AnimationTree
Labels: bug,topic:editor,topic:animation

### Tested versions

reproducible in 4.3 beta2 (didn't test in previous 4.3 version)

### System information

MacOS14.5 Godot4.3beta2 vulkan forward+

### Issue description

Unless you have selected AnimationPlayer Node first, otherwise selecting AnimationTree Node will not jump to the bottom panel of AnimationTree


https://github.com/godotengine/godot/assets/64188282/313d899c-114a-4d18-a283-a5ea33d34672



### Steps to reproduce

open MRP
open test.tscn file
select AnimationPlayer
selecr AnimationTree
select other Type Node
select AnimationTree

### Minimal reproduction project (MRP)

[project43b2.zip](https://github.com/user-attachments/files/15935736/project43b2.zip)
Repository: pytorch
Issue: `python3 setup.py bdist_wheel` tries to write to /usr/local/... during build
Labels: needs reproduction,module: build,triaged,module: regression

### 🐛 Describe the bug

`python3 setup.py bdist_wheel` tries to write to /usr/local/... during build
The problem comes from the bottom of the caffe2/CMakeFiles.txt setting the Python lib rel path to the Python installation.

Seems related to #127683


### Versions

Main branch recently

cc @malfet @seemethere