sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: The document does not emphasize hidden range in nn.Embedding
Labels: needs reproduction,module: docs,triaged

### 🐛 Describe the bug


`Hidden range of padding parameter in nn.Embedding`

### Code

```py
import torch
import torch.nn as nn


class BiLSTM(nn.Module):
    def __init__(self, batch_size, hidden_dim, vocab_size, sequence_len):
        super().__init__()

        self.batch_size = batch_size
        self.hidden_dim = hidden_dim
        self.input_size = vocab_size
        self.num_classes = vocab_size
        self.sequence_len = sequence_len

        # Dropout
        self.dropout = nn.Dropout(0.25)

        # Embedding layer
        self.embedding_0 = nn.Embedding(num_embeddings=2, embedding_dim=2, padding_idx=3)

    def forward(self, x):

        # Bi-LSTM
        # hs = [batch_size x hidden_size]
        # cs = [batch_size x hidden_size]
        hs_forward = torch.zeros(x.size(0), self.hidden_dim)
        cs_forward = torch.zeros(x.size(0), self.hidden_dim)
        hs_backward = torch.zeros(x.size(0), self.hidden_dim)
        cs_backward = torch.zeros(x.size(0), self.hidden_dim)

        # LSTM
        # hs = [batch_size x (hidden_size * 2)]
        # cs = [batch_size x (hidden_size * 2)]
        hs_lstm = torch.zeros(x.size(0), self.hidden_dim * 2)
        cs_lstm = torch.zeros(x.size(0), self.hidden_dim * 2)

        # Weights initialization
        torch.nn.init.kaiming_normal_(hs_forward)
        torch.nn.init.kaiming_normal_(cs_forward)
        torch.nn.init.kaiming_normal_(hs_backward)
        torch.nn.init.kaiming_normal_(cs_backward)
        torch.nn.init.kaiming_normal_(hs_lstm)
        torch.nn.init.kaiming_normal_(cs_lstm)

        # From idx to embedding
        x = self.embedding_0(x.long())
        return x


if __name__ == '__main__':
    net = BiLSTM(5, 2, 100, 100)
```


### Version

```
PyTorch version: 2.0.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.6 (arm64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.102)
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.10 (main, Mar 21 2023, 13:41:05) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-12.6-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
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

CPU:
Apple M1 Pro

Versions of relevant libraries:
[pip3] numpy==1.23.5
[pip3] torch==2.0.0
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.15.1
[conda] numpy                     1.23.5          py310hb93e574_0  
[conda] numpy-base                1.23.5          py310haf87e8b_0  
[conda] torch                     2.0.0                    pypi_0    pypi
[conda] torchsummary              1.5.1                    pypi_0    pypi
[conda] torchvision               0.15.1                   pypi_0    pypi
```


cc @svekars @carljparker
Repository: pytorch
Issue: The document does not emphasize Illegal value in nn.Bilinear
Labels: module: nn,triaged,actionable,module: edge cases

### 🐛 Describe the bug

`Illegal value of in1_feature parameter in nn.Bilinear`

`ZeroDivisionError: float division by zero`
### Code

```py
import torch
from torch import nn


class lenet(nn.Module):
    def __init__(self):
        super(lenet, self).__init__()
        self.conv = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=5, stride=1)
        self.linear = nn.Bilinear(in1_features=0, in2_features=0, out_features=0)

    def forward(self, x):
        # 1st block
        x = self.conv(x)
        x = self.linear(x)

        return x


if __name__ == '__main__':
    net = lenet()
```

### Versions

### Version

```
PyTorch version: 2.0.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.6 (arm64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.102)
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.10 (main, Mar 21 2023, 13:41:05) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-12.6-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
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

CPU:
Apple M1 Pro

Versions of relevant libraries:
[pip3] numpy==1.23.5
[pip3] torch==2.0.0
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.15.1
[conda] numpy                     1.23.5          py310hb93e574_0  
[conda] numpy-base                1.23.5          py310haf87e8b_0  
[conda] torch                     2.0.0                    pypi_0    pypi
[conda] torchsummary              1.5.1                    pypi_0    pypi
[conda] torchvision               0.15.1                   pypi_0    pypi
```


cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: next.js
Issue: Copying headers in middleware disables gzip compression
Labels: bug,Runtime

### Verify canary release

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

### Provide environment information

```bash
This happens on any environment
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/karl-run/nextjs-middleware-gzip-repro

### To Reproduce

Install deps:

```bash
yarn
```

Run the server:

```bash
yarn dev
```

Visit `/`:

Observe the header `Accept-Encoding: gzip, deflate, br` on the request. The response has the header `content-encoding: gzip`, compression works.

Visit `/other`:

Observe the header `Accept-Encoding: gzip, deflate, br` on the request. The response does NOT have `content-encoding: gzip`, compression does not work.


### Describe the Bug

When coping and adding new headers using a middleware as described in the documentation here:

https://nextjs.org/docs/pages/building-your-application/routing/middleware#setting-headers

Compression is disabled for any route this middleware hits.

### Expected Behavior

Compression to still work when using middlewares that modify headers.

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

_No response_

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

_No response_
Repository: ant-design
Issue: Improve Image preview appear animation
Labels: help wanted,Inactive,improvement

- [ ] 应该从图片轮廓位置展开，而不是像 Modal 一样从点击点展开。隐藏时同理，效果类似：https://photoswipe.com/
- [ ] https://ant.design/components/image-cn#components-image-demo-preview-group 展开动画丢失。
- [ ] https://ant.design/components/image-cn#components-image-demo-preview-group-visible 现在从屏幕中间展开了，是个 bug。
Repository: vscode
Issue: Diff Algorithm: JSON confusing insertion point
Labels: feature-request,diff-editor

[example](https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0-dev.20230612#XQAAAAJTAwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw4GI5RgmSatbNyrNa50VLHWwDOn0YI7IfU0xJ0CGYU1vRtgnKPmZzQcQ1IYSLB-5f-1dobOlrSyV9lhyCGfRYVianClsf46I07myHUe8HiI221gCuxSWNB3qWoHZnS_DdvCUUO7DHl124hOeXW3is4NTQoHv0nkeIzrtDimPDPrJCsCwJh8v8HmDawoM2ONGFrwwJm6Y1G2tfDuQ9c8yO5wuYl4scbHSvnrjYD_FnBtNr7zwTme6wvfHzQIg2ATgWHjoNwev60nipUAqkXQXu1XrHtOlWtU_kRlVAf5jmDAUfWmXUAt8fVWOZVfLn2J-l-j0xkpENS1HlM08ZjpSemBFjmDtu6diQydOwecIF6p418XQx2V5MSM-epRG0HxIXznc5YQzUCWsros_2fnrLemGhhV0zvB9ev7EZYF3_H_eRAA)
Repository: storybook
Issue: [Feature]: Coverage for single story file
Labels: feature request,test-runner

### Is your feature request related to a problem? Please describe

Currently there is no way to run code coverage for a single story file/React component using Storybook TestRunner. I have checked the docs and a bit of online research but could not find a way to run coverage for a specific story file.

Does Storybook has such feature or is it something that is not added yet. Please suggest workarounds.

### Describe the solution you'd like

Something like `test-storybook -- --fileName=MyComponent.stories.js` would be fantastic.

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

no

### Additional context

_No response_
Repository: electron
Issue: [Bug]: Window background material isn't working after minimizing
Labels: platform/windows,bug :beetle:,component/BrowserWindow,25-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

25.1.0

### What operating system are you using?

Windows

### Operating System Version

windows 11 22H2 - 22621

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

When using `BrowserWindow` with the following settings:
```
backgroundColor: '#00000000',
backgroundMaterial: "mica",
autoHideMenuBar: true,
frame: false,
resizable: false,
transparent: false,
```
After minimizing the window (using alt+tab or whatever) and showing it again,  I want it to show like this, with the mica background material.
![image](https://github.com/electron/electron/assets/31805301/3528a43a-80ed-4d8b-848e-48f157e8deb2)

### Actual Behavior

If after minimizing the window is completely hidden from the screen, than when I show it again (by clicking it in the taskbar or using alt+tab) than the background material isn't showing properly:

![image](https://github.com/electron/electron/assets/31805301/73c72ed1-7200-43d3-be83-b057d8f01922)

### Testcase Gist URL

https://gist.github.com/ttnn5876/78eacb07ec9b819e784d722e77e18eca

### Additional Information

_No response_
Repository: opencv
Issue: cpselect alternative for python
Labels: feature,category: highgui-gui

### Describe the feature and motivation

I am comming from matlab and I used their [cpselect](https://de.mathworks.com/help/images/ref/cpselect.html) tool to generate control points for transformations. There is a lack of an alternative software in the python community and I think opencv would be the right place for such a tool.
Many images have different illumination angles and are hard problems for automated coregistration of images, so a GUI for selecting control points would help out.


### Additional context

One project tackling this problem is [hofmann-tobias/cpselect](https://github.com/hofmann-tobias/cpselect), written using PyQt5. This can be used and mantained or an alternative GUI engine like [Kivy](https://kivy.org/) can be used. Aditional features like control point prediction would be also nice (if one image has more points than the other, they will be predicted).
Repository: storybook
Issue: [Bug]: Story clearing information on DOM change, ie toggle grid button
Labels: bug,needs triage

### Describe the bug

Story of component shows fine when first rendering, when toggling different DOM elements (Grid, measure etc) all data appears to be wiped from the component and causing it to be blank.

Refreshing the page/pressing the refresh button in storybook re-applies the correct data and renders the component again.

This also happens when making changes to the controls and requires the story to be refreshed to see results

Has happened since moving to storybook 7 and appears to be linked with the setup() function no longer updating between renders, see updated example below

```
const Template: StoryObj<typeof AccordionItemComponent> = {
  render: (args) => ({
    components: { AccordionItemComponent },
    template:
      '<div class="accordion"><accordion-item-component :content="args.content"/></div>',
    setup() {
      console.log('test')
      if (!args.content) {
        args.content = new AccordionItem(args)
      }
      return { args }
    },
  }),
}
```

### To Reproduce

_No response_

### System

```shell
System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 16.7.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 7.20.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 114.0.5735.110
    Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.43)
  npmPackages:
    @storybook/addon-a11y: ^7.0.20 => 7.0.20
    @storybook/addon-essentials: ^7.0.20 => 7.0.20
    @storybook/addon-interactions: ^7.0.20 => 7.0.20
    @storybook/addon-links: ^7.0.20 => 7.0.20
    @storybook/blocks: ^7.0.20 => 7.0.20
    @storybook/builder-vite: ^7.0.20 => 7.0.20
    @storybook/preset-scss: ^1.0.3 => 1.0.3
    @storybook/testing-library: ^0.0.14-next.2 => 0.0.14-next.2
    @storybook/vue3: ^7.0.20 => 7.0.20
    @storybook/vue3-vite: ^7.0.20 => 7.0.20
```


### Additional context

_No response_
Repository: vscode
Issue: Workspace trust and terminals should show the error inline
Labels: feature-request,polish,workspace-trust,terminal-process

I found this to be a rough flow:

![Recording 2023-06-12 at 15 20 14](https://github.com/microsoft/vscode/assets/900690/159aeaf5-9d3d-4692-91bf-48089703cd57)
Repository: youtube-dl
Issue: [TF1] - This video is DRM protected.
Labels: broken-IE,DRM

## Checklist

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

```
> youtube-dl -f bestvideo+bestaudio https://www.tf1.fr/tmc/quotidien-avec-yann-barthes/videos/quotidien-du-8-juin-2023-14878832.html -o test.mp4 -v

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'bestvideo+bestaudio', 'https://www.tf1.fr/tmc/quotidien-avec-yann-barthes/videos/quotidien-du-8-juin-2023-14878832.html', '-o', 'test.mp4', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.11.2 (CPython) - macOS-13.3.1-arm64-arm-64bit
[debug] exe versions: ffmpeg 5.1.2, ffprobe 5.1.2
[debug] Proxy map: {}
[TF1] quotidien-du-8-juin-2023-14878832: Downloading JSON metadata
[wat.tv] 13991716: Downloading JSON metadata
[wat.tv] 13991716: Downloading MPD manifest
ERROR: This video is DRM protected.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 816, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 837, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 535, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/wat.py", line 90, in _real_extract
    raise ExtractorError('This video is DRM protected.', expected=True)
youtube_dl.utils.ExtractorError: This video is DRM protected.
```

## Description

It looks like TF1 updated its played to either add real DRM protection or update something that makes downloads unavailable. The link pasted above worked when I used it on Friday June 9th, but is not working any more this week.

I tried with a bunch of video links from the TF1 website, and they're all resulting in the same error.
Repository: stable-diffusion-webui
Issue: [Bug]: All generated images are being saved in local/temp/gradio
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Everytime I generate an image, its saved into /local/temp/gradio.

I have turned off save images in the settings but it still saves images there. How can I prevent this or auto delete images once I close Stable DIffusion?


### Steps to reproduce the problem

1. Run SD
2. Generate images
3. Check C:\Users\<username>\AppData\Local\Temp\gradio


### What should have happened?

No images should be saved if I turn off the save images option.

### Commit where the problem happens

baf6946e06249c5af9851c60171692c44ef633e0

### What Python version are you running on ?

Python 3.10.x

### What platforms do you use to access the UI ?

Windows

### What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

### What browsers do you use to access the UI ?

Microsoft Edge

### Command Line Arguments

```Shell
set COMMANDLINE_ARGS=--xformers
```


### List of extensions

open pose editor
sd-webui-controlnet
ultimate-upscale-for-automatic1111
LDSR
Lora
ScuNET
SwinIR
prompt-bracket-checker

### Console logs

```Shell
venv "D:\stabledif\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.3.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing requirements

Launching Web UI with arguments: --xformers
2023-06-12 11:03:53,205 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: D:\stabledif\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads2023-06-12 11:03:53,280 - ControlNet - INFO - ControlNet v1.1.224
Loading weights [fc2511737a] from D:\stabledif\stable-diffusion-webui\models\Stable-diffusion\chilloutmix_NiPrunedFp32Fix.safetensors
Creating model from config: D:\stabledif\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 7.0s (import torch: 1.7s, import gradio: 0.9s, import ldm: 0.5s, other imports: 0.8s, list SD models: 0.2s, load scripts: 1.4s, create ui: 0.3s, gradio launch: 1.0s).
Loading VAE weights specified in settings: D:\stabledif\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying optimization: xformers... done.
Textual inversion embeddings loaded(2): advntr, HyperStylizeV6
Textual inversion embeddings skipped(3): nartfixer, nfixer, nrealfixer
Model loaded in 4.9s (load weights from disk: 0.7s, create model: 0.7s, apply weights to model: 1.0s, apply half(): 0.7s, load VAE: 0.1s, move model to device: 0.8s, load textual inversion embeddings: 0.9s).
```


### Additional information

_No response_
Repository: rust
Issue: Manually running CI jobs `dist-various-{1,2}` complains about missing `metrics.json`
Labels: T-infra,A-contributor-roadblock

I ran the CI jobs `dist-various-{1,2}` manually by editing `src/ci/github-actions/ci.yml` but the jobs [failed](https://github.com/rust-lang/rust/pull/111626#issuecomment-1575622889) with the following error:
```
cp: cannot stat 'obj/build/metrics.json': No such file or directory
```
However I didn't touch anything on metrics. If I understand correctly, the cause of this error is:
- Build metrics were not enabled, because `GITHUB_REF=refs/pull/111626/merge` was defined in the environment, according to [this logic](https://github.com/rust-lang/rust/blob/master/src/ci/run.sh#L50-L54).
- Build artifacts were asked to be uploaded, because `DEPLOY=1` was defined in the environment, according to [this logic](https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml#L151).

I only ran `dist-various-{1,2}` but I _guess_ that if other `dist-*` jobs are run manually, the same error would happen, because these jobs would have `DEPLOY=1` or `DEPLOY_ALT=1` but metrics would not be enabled as `GITHUB_REF` would be `refs/pull/<PULL_REQUEST_ID>/merge`.

I think this is somewhat confusing to people who want to use CI to test their PRs, because without this error their PRs could have passed the CI. I'm not sure what would be a good fix for this, maybe we could define an environment variable when build metrics are enabled, and check this variable [before we fetch `metrics.json`](https://github.com/rust-lang/rust/blob/master/src/ci/scripts/upload-artifacts.sh#L29). Or at least the problem could be mentioned in the [document](https://rustc-dev-guide.rust-lang.org/tests/ci.html).
Repository: react
Issue: [DevTools Bug]: Timeline UI isn't being rendered (black screen)
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://fxbh5x.csb.app/

### Repro steps

I cannot get the timeline view to render properly on my machine in Chrome. Super weird.

1. Open codesandbox
2. Reload and profile
3. Click button

## Chrome

Renders black area and only highlights Ui elements when I hover over (but nothing ever shows below).

![image](https://github.com/facebook/react/assets/563819/85f5e2df-9a04-420f-b9a3-6a1ef1d2b4d4)

## Edge

Doesn't show timeline tab, must not be supported?

## Firefox

Can't profile at all?

![image](https://github.com/facebook/react/assets/563819/0c7a49c2-d691-44fe-8d3b-3aa0a20704d3)


Using latest dev tools for all 3 browsers

![image](https://github.com/facebook/react/assets/563819/33f2d4b0-74b1-4daf-b01c-8bfa94ea71db)

Version: 4.27.8-2468a8735
Chrome: Version 114.0.5735.110 (Official Build) (64-bit)
Windows: Version	10.0.19045 Build 19045

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_