sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: deno
Issue: Idle program detection doesn't work if a web worker is involved
Labels: bug,web

If you have a program like:
```ts
// temp2.ts
await new Promise(() => {});
```
You get from `deno run temp2.ts`:
```
error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises.
```
But when run in a worker:
```ts
// temp.ts
new Worker(new URL("temp2.ts", import.meta.url).href, { type: "module" });
```
`deno run temp.ts` hangs forever.

Of course we want web workers to persist for their event loops since they can get messages from their parents, but if _all_ active runtimes are idle we should be able to exit with a similar message.
Repository: pytorch
Issue: backcompat tests in test_nn.py are slow
Labels: module: nn,module: tests,triaged

### 🐛 Describe the bug

My test runner gets visibly stuck on them when they execute. They take more than a minute to execute.

### Versions

master

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: ant-design
Issue: Draggable Tabs, if tabs can slide at the same time, tabs will auto navigate to the selected tab after finish drag
Labels: Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/ke-tuo-zhuai-biao-qian-antd-4-19-5-forked-wihed0?file=/index.js)

### Steps to reproduce

1、default selected tab0  
2、slide to right, see the tab20  
3、drag tab20 to the location of tab19  
4、after drag, **tabs auto navigate to tab0**  

### What is expected?

4、after drag, **the sliding position remains unchanged**

### What is actually happening?

4、after drag, tabs auto navigate to tab0

| Environment | Info |
| --- | --- |
| antd | 4.19.5 |
| React | ^16.14.0 |
| System | MacOS 12.3 |
| Browser | Chrome 100.0.4896.75 (正式版本) (x86_64) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: test_jit.py TestWarn.test_warn and friends doesn't work under pytest
Labels: oncall: jit

### 🐛 Describe the bug

```
pytest test/test_jit.py -k test_warn
```

gives

```
__________________________ TestWarn.test_warn_once_per_func ___________________________
Traceback (most recent call last):                                                       File "/data/users/ezyang/pytorch-tmp/test/jit/test_warn.py", line 93, in test_warn_on
ce_per_func                                
    FileCheck() \
RuntimeError: Expected to find "UserWarning: I am warning you" but did not find it
Searched string:                                                                       From CHECK-COUNT-2: UserWarning: I am warning you
                                           
______________________ TestWarn.test_warn_once_per_func_in_loop _______________________
Traceback (most recent call last):                                                     
  File "/data/users/ezyang/pytorch-tmp/test/jit/test_warn.py", line 117, in test_warn_once_per_func_in_loop
    FileCheck() \                          
RuntimeError: Expected to find "UserWarning: I am warning you" but did not find it
Searched string:                                                                       
From CHECK-COUNT-2: UserWarning: I am warning you                                                           
____________________________ TestWarn.test_warn_only_once _____________________________
Traceback (most recent call last):
  File "/data/users/ezyang/pytorch-tmp/test/jit/test_warn.py", line 50, in test_warn_on
ly_once                                                                                    FileCheck() \
RuntimeError: Expected to find "UserWarning: I am warning you" but did not find it
Searched string:
From CHECK-COUNT-1: UserWarning: I am warning you
```

The warnings then show up in warnings summary so probably there's something going on with pytest's installed warning handler


### Versions

master
Repository: flutter
Issue: Render to native surface / native window handle
Labels: platform-android,framework,a: existing-apps,c: proposal,P3,team-android,triaged-android

## Use case

I have a rust module that can render to android `SurfaceView` from ndk. I need to use this module in a flutter app. I looked into the documentation of `Texture` and related classes and found that `SurfaceTexture` is actually a stream of frames. This implies that rendering using this method will force the device to do a copy on each render.

## Proposal

Some api similar to android `ANativeWindow` that can be used to directly render to a part of the screen. And I would appreciate if you could elaborate on the performance implications of using `SurfaceTexture`.
Repository: godot
Issue: random unresponsive minimize / maximize / close buttons for running game (F5)
Labels: bug,platform:windows,topic:porting,needs testing

### Godot version

3.4.4

### System information

windows 10

### Issue description

When play testing using F5 or F6 - no errors showing up in console : minimize / maximize / close buttons are unresponsive (seems completely random).

### Steps to reproduce

seems random, so, no steps to reproduce

### Minimal reproduction project

_No response_
Repository: flutter
Issue: Add documentation on how to use plugins with custom-devices
Labels: tool,d: wiki,P3,a: plugins,team-tool,triaged-tool

After https://github.com/flutter/flutter/pull/90958 is merged, we should update https://github.com/flutter/flutter/wiki/Using-custom-embedders-with-the-Flutter-CLI to document how to use plugins with custom devices.

(The flutter CLI tool - at least when the PR is merged - refers to that page for documentation too)
Repository: pytorch
Issue: Numerical instability: matrix multiplication got different results on cpu and gpu 
Labels: triaged,module: tf32

### 🐛 Describe the bug

matrix multiplication got different results on cpu and gpu, `5.5665e-06` difference.

Here is a minimal example

```python
import torch

srf = [[0.00784314, 0.00492611, 0.02788845],
       [0.00392157, 0.00492611, 0.03984064],
       [0.00392157, 0.00492611, 0.05976096],
       [0.00392157, 0.00492611, 0.07569721],
       [0.00392157, 0.00492611, 0.09960159],
       [0.00392157, 0.00492611, 0.11553785],
       [0.        , 0.00985222, 0.11952191],
       [0.        , 0.01970443, 0.11553785],
       [0.        , 0.02955665, 0.10756972],
       [0.        , 0.03940887, 0.0876494],
       [0.        , 0.05418719, 0.06374502],
       [0.        , 0.07881773, 0.03585657],
       [0.        , 0.09359606, 0.00796813],
       [0.        , 0.10344828, 0.],
       [0.        , 0.09852217, 0.],
       [0.        , 0.08866995, 0.],
       [0.00784314, 0.07881773, 0.],
       [0.02352941, 0.06896552, 0.],
       [0.04313725, 0.05418719, 0.],
       [0.06666667, 0.03448276, 0.],
       [0.08235294, 0.02463054, 0.00398406],
       [0.08627451, 0.01477833, 0.00398406],
       [0.08235294, 0.00985222, 0.00398406],
       [0.07843137, 0.00985222, 0.00398406],
       [0.07843137, 0.00492611, 0.00398406],
       [0.0745098 , 0.00492611, 0.00398406],
       [0.0745098 , 0.00985222, 0.00398406],
       [0.07058824, 0.00985222, 0.00398406],
       [0.07058824, 0.00985222, 0.00398406],
       [0.06666667, 0.00985222, 0.00398406],
       [0.06666667, 0.00985222, 0.00398406],]

srf_cpu = torch.tensor(srf)
srf_cuda = torch.tensor(srf).cuda()

a = srf_cpu @ srf_cpu.T
b = srf_cuda @ srf_cuda.T

b = b.cpu()

print(torch.allclose(a,b)) # False
print((a-b).abs().max()) # tensor(5.5665e-06)
```


### Versions

pytorch 1.10.1
cudatoolkit 11.3.1 

cc @zasdfgbnm @ptrblck
Repository: pytorch
Issue: Jit torchscript for prediction is missing 'forward' when using forward hooks
Labels: oncall: jit

### 🐛 Describe the bug

I'm using forward hooks to extract layer values from a pre-trained CNN and use them as features for my model. I also want to use torchscript for inference. The problem is that when I try to export any other method than 'forward' I get an error that 'forward' is missing for the registered forward hooks. I have a minimal example:

```python
from typing import Iterable, Callable, Tuple
from torch import Tensor, nn, ones, jit, empty
from torchvision.models import resnet50

class FeatureExtractor(nn.Module):
    def __init__(self, model: nn.Module, layers: Iterable[str]):
        super().__init__()
        self.model = model
        self.layers = layers

        for layer_id in layers:
            layer = dict([*self.model.named_modules()])[layer_id]
            layer.register_forward_hook(self.save_outputs_hook(layer_id))

    def save_outputs_hook(self, layer_id: str) -> Callable:
        def fn(_, input: Tuple[Tensor], output):
            print('Hi')
        return fn

    def forward(self, x: Tensor):
        return self.model(x)

    @jit.export
    def predict(self, x: Tensor):
        return self.model(x)

if __name__ == '__main__':
    dummy_input = ones(10, 3, 224, 224)
    resnet_features = FeatureExtractor(resnet50(), layers=["layer4", "avgpool"])
    features = resnet_features(dummy_input)
    script = jit.trace(resnet_features, dummy_input)
```

This fails with:

```
RuntimeError: Couldn't find method: 'forward' on class: '__torch__.torch.nn.modules.container.___torch_mangle_141.Sequential (of Python compilation unit at: 0x7fdc5a676da8)'
```

If I deregister the hooks or export forward instead of predict this of course runs without problem.

### Versions

PyTorch version: 1.11.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.6 (x86_64)
GCC version: Could not collect
Clang version: 13.0.0 (clang-1300.0.29.30)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.8 (main, Nov 10 2021, 09:21:22)  [Clang 13.0.0 (clang-1300.0.29.3)] (64-bit runtime)
Python platform: macOS-11.6-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] pytorch-lightning==1.6.0
[pip3] torch==1.11.0
[pip3] torchmetrics==0.7.3
[pip3] torchvision==0.12.0
[conda] Could not collect
Repository: vscode
Issue: Unfocused title bar buttons hard to see with dark MacOS system theme and light editor theme
Labels: bug,upstream,macos,electron,titlebar,confirmed

<!-- ⚠️⚠️ 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.66.2 (Universal)
- OS Version: macOS Monterey 12.3.1

Steps to Reproduce:

1. Enable dark system appearance
2. Switch to a light theme in VS Code (e.g. using Default Light+ in the screenshots)
3. Unfocus VS Code so the title bar buttons go grey

The close, minimise, zoom buttons are almost indistinguishable against the title bar when using a dark system theme and light editor theme. They have a slight border when the system theme is light but not when dark. Some other apps (Firefox in this example) always show the border even when the system theme is dark.

Light system theme, light editor theme - buttons have slight border:

![Screenshot 2022-04-19 at 10 36 37 am](https://user-images.githubusercontent.com/6674785/163977077-14b2f237-a57d-465a-8625-caa4c4241556.png)

Dark system theme, light editor theme - buttons are basically indistinguishable (note how Firefox is handling this, it keeps the outlines):

![Screenshot 2022-04-19 at 10 36 46 am](https://user-images.githubusercontent.com/6674785/163977158-f460ad91-385f-45e4-9fa4-ba594fe805aa.png)

Dark system theme, dark editor theme - buttons show up now against the dark title bar:

![Screenshot 2022-04-19 at 10 50 47 am](https://user-images.githubusercontent.com/6674785/163977918-2687c673-8d0e-479f-84f8-365dc8ee92cc.png)
Repository: pytorch
Issue: A bug in instructions for building PyTorch with ASAN
Labels: module: docs,module: ci,triaged,topic: bug fixes

Following instructions in https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md#building-pytorch-with-asan , the build fails at the CMake step:
```
<snip>
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- compiled but failed to run
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Error at third_party/benchmark/CMakeLists.txt:283 (message):
  Failed to determine the source files for the regular expression backend
```

The problem is in
https://github.com/pytorch/pytorch/blob/bd7e99cbb9e7980b89c26ae3fa5596f6e4aaebc4/CONTRIBUTING.md?plain=1#L1150
where `CXX_FLAGS` is spelled wrong and `-shared-libasan` is missing.

A fix is to replace the above line with:
```
    CXXFLAGS="-shared-libasan -pthread" \
```

On the other hand, this seems to work on CI
https://github.com/pytorch/pytorch/blob/bd7e99cbb9e7980b89c26ae3fa5596f6e4aaebc4/.jenkins/pytorch/build-asan.sh#L39
but [speculations follow] that could be related to the misspelling of `CXX_FLAGS` and the build scripts picks up `CXXFLAGS` from the environment..

cc @brianjo @mruberry @seemethere @malfet @pytorch/pytorch-dev-infra
Repository: pytorch
Issue: Mobile assets upload could break third party mirrors due to binary data size
Labels: oncall: mobile

### 🐛 Describe the bug

https://github.com/pytorch/pytorch/pull/74947 added mobile assets which seem to be used in mobile unit testing via https://github.com/pytorch/pytorch/pull/74793.
The total size increase using these binary files is ~88MB, which sounds undesirable in a source code repository, given these files are used for testing (please correct me if I'm wrong about their usage).

`GitLab` has a default max. size for binary files of 10MB and will break if you try to rebase your fork with the current PyTorch master. 
A workaround could be to rewrite the git history via a similar command to:
```
git filter-branch --force --index-filter \
  'git rm --cached --ignore-unmatch path/to/ceo.jpg' \
  --prune-empty --tag-name-filter cat -- --all
```
which is also problematic as a simple rebase is not possible anymore and you might end up re-writing the history in each rebase.

Another workaround is to increase the size limit of your mirror to be able to fit the largest binary file of ~45MB.

Could we please host model checkpoints in 3rd party mirrors as is done in e.g. `torchvision` in `https://download.pytorch.org/models/` or any other location outside of this repository?

Reverting this commit or removing the files without re-writing the git history would not solve the original issue, as these files would still be in the history and `git push` would still fail. 

CC @malfet @atalman @linbinyu 

### Versions

All versions after https://github.com/pytorch/pytorch/pull/74947
Repository: go
Issue: crypto/internal/nistec: remove ppc64le assembly
Labels: NeedsFix

In https://github.com/golang/go/issues/52182#issuecomment-1099583629, @laboger reports that the fiat-crypto (https://github.com/golang/go/issues/40171) code with @pmur's compiler improvements (https://go.dev/cl/393656) is within range of the assembly performance!

This is extremely impressive considering the fiat-crypto code also uses safer but slower complete formulas and a somewhat naive 4-bit scalar multiplication window.

```
ScalarBaseMult/P256                    237µs ± 0%      52µs ± 0%   -78.22%  (p=1.000 n=1+1)
ScalarMult/P256                        239µs ± 0%     213µs ± 0%   -10.95%  (p=1.000 n=1+1)
```

The ScalarBaseMult benchmark is still significantly slower, because the assembly uses a large precomputed table, while the fiat-crypto code just runs ScalarMult. This is very much fixable.

I will land the ScalarBaseMult optimization in the fiat-crypto code, and then we can remove the ppc64le assembly entirely!
Repository: pytorch
Issue: Dirichlet with small concentration
Labels: module: distributions,triaged

### 🐛 Describe the bug

When sampling from Dirichlet distribution with a low (<<1) concentration, it returns in about 1/K of the times (K=number of categories) the vector 1/K*(1,1,1,...) i.e (1/3,1/3,1/3) for 3 categories. This shouldn't be the case as the samples are supposed to
be concentrated on the vertices of the simplex. 


Example code:

```python
import torch
from torch import distributions

a = torch.ones(3)*1e-2
b = torch.ones(3)*1e-3
f=distributions.Dirichlet(a)
g=distributions.Dirichlet(b)
f.sample((10,)).max(-1)
g.sample((10,)).max(-1) # here is the bug
```

### Versions

--2022-04-19 12:19:37--  https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
Resolving raw.githubusercontent.com... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17051 (17K) [text/plain]
Saving to: ‘collect_env.py’

collect_env.py                                        100%[======================================================================================================================>]  16.65K  --.-KB/s    in 0s

2022-04-19 12:19:37 (54.9 MB/s) - ‘collect_env.py’ saved [17051/17051]

cc @fritzo @neerajprad @alicanb @nikitaved
Repository: vscode
Issue: Adopt `LSItemContentTypes` over `CFBundleTypeOSTypes`
Labels: help wanted,debt,macos,good first issue,engineering,workbench-os-integration

Refs https://github.com/microsoft/vscode/issues/146977#issuecomment-1102328031
Repository: pytorch
Issue: Computer using CPU instead of GPU nvidia with CUDA
Labels: module: cuda,triaged

### 🐛 Describe the bug

Using the YoloV5, it seems that it is using entirely the CPU and not the GPU, and I can't seem to understand why...
I have already opened an issue in the YoloV5 repository (https://github.com/ultralytics/yolov5/issues/7277), but it seems to be a PyTorch problem... Can someone help me?
Here is the problem and some videos.
I have been working with yolov5 for quite some time now, and I always used google colab. But since they are implementing limitations, I have decided to buy an eGPU and an Nvidia 3080ti to train my networks. I successfully installed the drivers and can use de GPU for other software. I can also use the GPU for running a trained network, using yolo detection.py and even using my code based on the PyTorch library.
For some reason, I can't figure out why I can't seem to use my GPU for training. When I use the train.py from yolov5 it doesn't use my Cuda Nvidia GPU. I have tried multiple versions of python, multiple versions of Cuda, and multiple versions of PyTorch (LTS, stable, nightly) and I still can't figure it out.
When I run the train.py file it detects that I have a 3080ti, but when it starts the epochs, my GPU usage is 0% and my CPU usage jumps to 90%, so it is using my CPU.

And here I leave a couple of videos demonstrating the problem. Even thought I'm using YoloV5 the problem seems to be in pytroch, can someone please help me?



### Versions

Collecting environment information...
PyTorch version: 1.11.0+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19044-SP0
Is CUDA available: False
CUDA runtime version: 11.3.58
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0+cu113
[pip3] torchvision==0.12.0
[conda] Could not collect


cc @ngimel
Repository: material-ui
Issue: [Button] Disabled buttons should have `cursor: not-allowed` by default
Labels: new feature,component: button

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Disabled buttons should have cursor not allowed by default

### Examples 🌈

_No response_

### Motivation 🔦

Helps user better notice the state of the buttons
Repository: terminal
Issue: Add support for "close to tray"
Labels: Issue-Feature,Product-Terminal,Area-Windowing

### Windows Terminal version

1.12.10732.0

### Windows build number

19044.1645

### Other Software

_No response_

### Steps to reproduce

Enable "always display icon in system tray" and then close the window of Terminal

### Expected Behavior

Window is closed, but Terminal is still running with icon in system tray (the same behavior for any program in system tray, that's why programs usually have option in Settings to be set to system tray!)
To close Terminal completely you should go to system tray and do it manually with right-click on icon and "close" (or smth)

### Actual Behavior

Despite I have Terminal in system tray, after I close the window... the Terminal is simply completely closed...
Repository: rust
Issue: [NLL] Duplicated errors
Labels: A-diagnostics,T-compiler,A-NLL,NLL-diagnostics

A couple different related issues here.

In tests like [src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs](src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs), the errors for mismatched types are actually duplicates (exactly the same error on the same line for the same span and the same notes.

Other similar tests:
- [src/test/ui/hr-subtype/hr-subtype.rs](src/test/ui/hr-subtype/hr-subtype.rs)
- [src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-71955.rs](src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-71955.rs)

In [src/test/ui/rfc1623.rs](src/test/ui/rfc1623.rs), the errors are very similar, but not exactly duplicates.

@rustbot label +A-NLL +NLL-diagnostics