sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Using a 4D attention mask in MultiheadAttention forward
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

The `torch.nn.MultiheadAttention` forward method requires an attention mask of shape `(N * num_heads, L, S)` when the goal is to have a different mask for each item in the batch. I might be missing something but for this shape, it is not possible to use `expand` with the number of heads and then `view`, which would not use any extra memory. Currently, I am using `repeat` which is prohibitively wasteful in some scenarios.

For `torch.nn.functional.scaled_dot_product_attention`, it is possible to use a 4D attention mask based on `expand`, if I remember correctly. Is there a way to use `MultiheadAttention` and an attention mask without allocating any additional memory? If not, could this be considered?

I think @drisspg would be helpful here. I noticed some issues/commits on this topic but I am not up-to-date with the latest developments and subtleties. Thanks!

### Alternatives

The `scaled_dot_product_attention` function and the equivalent `xformers` function seem to support 4D masks. It would be great to have this level of control and memory saving for `MultiheadAttention`.

### Additional context

I am referring exclusively to the memory efficient implementation.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: PowerToys
Issue: Please include an ISO burner
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

Please add a PT that will burn DVD and CD ISO's. Thanks!

### Scenario when this would be used?

To backup DVD's and CD's; so I don't have to carry an external optical drive around.

### Supporting information

_No response_
Repository: ollama
Issue: `pulling manifest  Error: EOF` when pulling after disk is full
Labels: bug

To reproduce, pull with little disk space lefT:

```
$ ollama run deepseek-coder:33b
pulling manifest 
Error: write /usr/share/ollama/.ollama/models/blobs/sha256:065b9a7416ba28634cd4efc2cd3024d4755731c1275dc0286b81b01793185fbb-partial-0: no space left on device
```

Even with more space, future `ollama pull` commands fail until Ollama restarted:

```
$ ollama run deepseek-coder:33b
pulling manifest 
Error: EOF
```
Repository: PowerToys
Issue: use the shortcut key for Paste as plain Text, Decimal places are lost when used in excel
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.76.2

### Installation method

GitHub

### Running as admin

None

### Area(s) with issue?

Paste as Plain Text

### Steps to reproduce

use the shortcut key for Paste as plain Text, Decimal places are lost when used in excel

### ✔️ Expected Behavior

paste as text

### ❌ Actual Behavior

Decimal places are lost when used in excel

### Other Software

Microsoft365Mso(2311Build16.017029.20028),
Repository: tauri
Issue: [bug] Windows 7 err: Unable to find an entry point named 'GetDpiForSystem' in DLL 'user32.dll'
Labels: type: bug,platform: Windows,status: needs triage

### Describe the bug

my app works well in development computer which is windows 11, but run on windows 7 offline environment, an error occurred
`Unable to find an entry point named 'GetDpiForSystem' in DLL 'user32.dll'`

tauri.conf.json
```json
"webviewInstallMode": {
  "type": "fixedRuntime",
  "path": "./Webview2.109.0.1518.78/
}
```

any insight would be helpful!

### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
`yarn tauri info` on develope computer

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 120.0.2210.91
    ✔ MSVC: Visual Studio ���ɹ��� 2022
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ Cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.10.0
    - yarn: 1.22.19
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.5.4
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.5
    - tauri-cli [RUST]: not installed!
    - @tauri-apps/api [NPM]: 1.5.1
    - @tauri-apps/cli [NPM]: 1.5.0

[-] App
Done in 26.80s.
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: pytorch
Issue: Address huge memory usage on large dataset
Labels: module: dataloader,triaged

### 🚀 The feature, motivation and pitch

When the dataset is very large, and almost infinite, the current dataloader will take huge amount of memory due to calling and using `__len__` method in a dataset. For instance, if we use a heuristic len, say 1e9 or 1e10 (1e8 consume more than 10G ram), it will consume over 32G of ram easily. And I believe if the len is set to 1e12, it will consume any amount of ram. So instead of calculating batches based on the length of dataset, and iterate relies on it, there should be a dummy way that always request next item until some error (like no more data error) is throwed by the dataset itself. In such way we can completely stay away from the mem issue, and very likely will significantly reduce the memory usage of pytorch, when dealing with large dataset.

### Alternatives

Maybe an automated detection that enable the function when find the `__len__ `is super large and set to the proposed method automatically?

### Additional context

Currently the issue is hacked around with a custom dataset class that treat each epoch as a continuous process, but it's still quite confusing to write something like `epoch=10000 # single epoch (no actual refresh happens here)`

cc @SsnL @VitalyFedyunin @ejguan @dzhulgakov
Repository: vscode
Issue: vscode open recent <ctrl+r> command dont support fuzzy search path
Labels: bug,quick-pick

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
assume  we have a dir/hello file
now vscode open recent only search `dir` or `hello` file can match
but when you type `dir/hello` cant match
it is not match `ssh local(code server)` protocol
Repository: deno
Issue: Panic when package.json in package contains some keys starting with `.` and some without
Labels: bug,good first issue,node compat

```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 1.38.0
Args: ["deno", "run", "mod.ts"]

thread 'main' panicked at ext/node/package_json.rs:242:7:
"exports" cannot contains some keys starting with '.' and some not.
        The exports object must either be an object of package subpath keys
        or an object of main entry condition name keys only.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Example package.json:

```json
{
  "name": "@reggi/core",
  "version": "1.0.0",
  "description": "A collection of commonly used TypeScript functions for Deno / Node",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/reggi/ideas.git"
  },
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/reggi/ideas/issues"
  },
  "main": "./script/src/mod.js",
  "module": "./esm/src/mod.js",
  "exports": {
    ".": {
      "import": "./esm/src/mod.js",
      "require": "./script/src/mod.js"
    },
    "mod": {
      "import": "./esm/src/mod.js",
      "require": "./script/src/mod.js"
    },
    "conditional": {
      "import": "./esm/src/conditional.js",
      "require": "./script/src/conditional.js"
    },
    "safe_url": {
      "import": "./esm/src/safe_url.js",
      "require": "./script/src/safe_url.js"
    },
    "guards": {
      "import": "./esm/src/guards.js",
      "require": "./script/src/guards.js"
    },
    "argument_guard": {
      "import": "./esm/src/argument_guard.js",
      "require": "./script/src/argument_guard.js"
    }
  },
  "scripts": {
    "test": "node test_runner.js"
  },
  "devDependencies": {
    "@types/node": "^20.9.0",
    "picocolors": "^1.0.0",
    "@deno/shim-deno": "~0.17.0"
  },
  "_generatedBy": "dnt@0.39.0"
}
```

Problem code:

https://github.com/denoland/deno/blob/c08319262afeca47d1b9f3dbfa3254e692a48a2d/ext/node/package_json.rs#L247-L249

This should instead probably return a `Result` or maybe ignore the error (basically investigate then copy whatever behaviour Node does).

Related: https://github.com/denoland/dnt/issues/356

Version: Deno 1.39.1
Repository: next.js
Issue: Static export issue: app router performs full page change on new builds
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/new-browser-44spww

### To Reproduce

1. Create a page that links to another page
2. build a nextjs app with static export and serve it
3. navigate to the page
4. re-build the app and serve it again (while remaining on page)
5. click button that performs a client side route change to different page (e.g. router.push)
6. observe that nextjs performed a full page change instead of a client side route change. Also observe the console `Failed to fetch RSC payload for ${url}. Falling back to browser navigation.`

### Current vs. Expected behavior

I expect that when using the app router and static export in nextjs, the app can function like a true SPA with no unexpected page unloads. Instead the app performs a full page change with no way to control it, and client side state is lost when this happens.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.6.0: Wed Oct  4 21:25:26 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_X86_64
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 13.5.4
  eslint-config-next: 13.4.7
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: export
```


### Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link), Static HTML Export (output: "export")

### Additional context

I'm using s3 and cloudfront to serve this static app.

Link to problematic code: https://github.com/vercel/next.js/blob/v14.0.3/packages/next/src/client/components/router-reducer/fetch-server-response.ts#L144

```typescript
if (currentBuildId !== buildId) {
   return doMpaNavigation(res.url)
}
```

This was not an issue with the pages router because the route metadata was stored in a json file with a build id in the file path. In the app router the .txt files are not versioned in any way.
Repository: next.js
Issue: Can not remove /out directory when building a docker image for the project.
Labels: bug

### Link to the code that reproduces this issue

https://github.com/samialitop3/next.js

### To Reproduce

Create a new next.js project using npx create-next-app@latest
Add output: "export" to next.config.js.
Make sure to have docker installed.
Run the following command docker run --rm --mount type=bind,source='/Users/administrator/my-test-app/src',destination='/src',readonly --mount type=bind,source='/Users/administrator/my-test-app/public',destination='/public',readonly --mount type=bind,source='/Users/administrator/my-test-app/package.json',destination='/package.json',readonly --mount type=bind,source='/Users/administrator/my-test-app/package-lock.json',destination='/package-lock.json' --mount type=bind,source='/Users/administrator/my-test-app/next.config.js',destination='/next.config.js',readonly --mount type=bind,source='/Users/administrator/my-test-app/tsconfig.json',destination='/tsconfig.json',readonly --mount type=bind,source='/Users/administrator/my-test-app/.next',destination='/.next' --mount type=bind,source='/Users/administrator/my-test-app/out',destination='/out' node:20-alpine3.18 /bin/sh -c 'npm install && npm run build'

### Current vs. Expected behavior

Following the steps from the previous section:
Expected behavior:
Successful static export as the images below.
![image](https://github.com/vercel/next.js/assets/129103515/09030564-e385-4b5e-a597-49409f037c82)
![image](https://github.com/vercel/next.js/assets/129103515/86c942a6-488e-4e8d-b6dd-181b57a56d76)

Current Behavior:
Getting an error for not being able to remove /out directory.
[Error: EBUSY: resource busy or locked, rmdir '/out'] {
  errno: -16,
  code: 'EBUSY',
  syscall: 'rmdir',
  path: '/out'
}```

<img width="434" alt="image" src="https://github.com/vercel/next.js/assets/129103515/d67ab8fb-5f10-406e-9744-f8bb0ba37f4a">


### Verify canary release

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

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.21
  pnpm: 8.13.1
Relevant Packages:
  next: 14.0.5-canary.29
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: export
```


### Which area(s) are affected? (Select all that apply)

Static HTML Export (output: "export")

### Additional context

While trying to build a docker image for my next.js v14 project, I am using docker mounts to be able to generate the static files of the project using output: 'export' inside docker container, the only issue is that when binding the mount /out in docker and running yarn build in the docker run command, it is not possible to have next build command removing /out folder and its contents because it is mounted into docker.
Repository: flutter
Issue: [flutter_tool]Get Flutter version failed in git hook of git submodule
Labels: tool,t: flutter doctor,has reproducible steps,P3,team-tool,triaged-tool,found in release: 3.16,found in release: 3.18

### Steps to reproduce

1. Add a git hook(like pre-commit) to a git submodule with content flutter --version

1. Make a commit under the submodule, this will execute the hook added above

1. See its output

### Expected results

Expect to get the right Flutter version

### Actual results

Cannot get Flutter version, resolves to unknown.

### Code sample

The output of flutter --version that is executed by git hook pre-commit:
```
Flutter • channel unknown • unknown source
Framework • revision 956e13eca8 (9 minutes ago) • 2023-04-12 22:44:50 +0800
Engine • revision ec975089ac
Tools • Dart 2.19.6 • DevTools 2.20.1
The version of Flutter SDK failed.
```
Expected output is:
```
Flutter 3.7.10 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4b12645012 (9 days ago) • 2023-04-03 17:46:48 -0700
Engine • revision ec975089ac
Tools • Dart 2.19.6 • DevTools 2.20.1
```

I face same issue like https://github.com/flutter/flutter/issues/124681
I want to add flutter analyzie in pre-commit/pre-push in submodule, but it cannot get flutter.

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>
Repository: terminal
Issue: Restarting a process loses pwd
Labels: Issue-Bug,Area-TerminalControl,Product-Terminal

### Windows Terminal version

1.18.3181.0

### Windows build number

10.0.22631.2861

### Other Software

_No response_

### Steps to reproduce

1. Set exit behaviour in Terminal to never close automatically by default 

> ```json
>     "profiles": 
>     {
>         "defaults": 
>         {
>             "closeOnExit": "never", 
>     ...
> ```

2. Launch a terminal app (a shell/cli editor) from the address bar in File Explorer
3. close it
4. press enter to restart

### Expected Behavior

The respawned process should have the same environment as the original process.

### Actual Behavior

The respawned process launches with the default launch directory of WT, `C:\WINDOWS\system32>`


https://github.com/microsoft/terminal/assets/70827815/3923ba36-08f6-4b8d-ba21-bd8ce1a5b227
Repository: pytorch
Issue: Legitimize/harden differentiable optimizers in torch.optim
Labels: module: autograd,module: optimizer,triaged,needs research

### 🚀 The feature, motivation and pitch

Today, almost all of our optimizers support a `differentiable` flag, which provides implementations for differentiating through the optimizer step by turning off the usual no grad mode. 

However, there are no tutorials or code examples about how to use these optimizer configs, nor are differentiable optimizers first class citizens of our current test suite relative to flags like foreach, fused, and capturable.

This issue tracks the following:
1. Decide if we want to offer and publicize our differentiable optimizers more. Look at alternatives such as torchopt and see where we can provide added value. Consider if we can make our optimizers differentiable by default and if we want to deprecate the flag.
2. If we do not want to offer differentiable optimizers more evidently, then we could do nothing or start deprecating the flags. Otherwise, continue with the next steps.
3. We should add user facing documentation about how we expect them to be used, adding features if necessary.
4. We should add tests covering correctness of the use cases.
5. If we want, we could also add a tutorial about how we expect users to interact with our differentiable optimizers.

### Alternatives

Do nothing.

### Additional context

I'm in the middle of migrating tests and noticed that our differentiable optimizers aren't (and probably shouldn't be) tested the way our other optimizer configs are tested. At the very least we should add tests that they compute the same values as their non-differentiable optimizer equivalents. Maybe this is the actual first step.

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @vincentqb @jbschlosser @crcrpar
Repository: stable-diffusion-webui
Issue: [Bug]: Memory leak in batch img2img
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Doing a batch img2img on a large (512) number of files, python grows to over 200GB of memory used. 

### Steps to reproduce the problem

On a Mac, loaded SDXL 1.0 base, set up batch for 18 steps upscaling 512 to 1024, refiner model at 90%.  Settings are set to cache up to 2 models.  Over time, memory use grows. 

### What should have happened?

Memory use should not grow as models are re-used.  Memory use should have hovered around 50GB. 

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

Apple Safari

### Sysinfo

[sysinfo-2023-12-28-07-38.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/13784288/sysinfo-2023-12-28-07-38.json)


### Console logs

```Shell
unavailable after MacOS force-quits python
```


### Additional information

_No response_
Repository: opencv
Issue: cv2.VideoWriter fails to write *.mp4 video files
Labels: question (invalid tracker)

### System Information

OpenCV python version: 4.9.0
Operating System / Platform: FreeBSD 14.0
Python version: 3.9

### Detailed description

The attached Python fails to write the *.mp4 file, but succeeds to write the *.avi file when the corresponding line is un-commented.

The first of these lines causes the file ```filename.avi``` to be written, but the second line doesn't cause ```filename.mp4``` to be written:
```
#result = cv2.VideoWriter('filename.avi', cv2.VideoWriter_fourcc(*'MJPG'), 25.0, size) 
result = cv2.VideoWriter('filename.mp4', cv2.VideoWriter_fourcc(*'MP4V'), 25.0, size)
```

The second line also produces this additional warning:
```
[ WARN:0@0.074] global cap_gstreamer.cpp:2617 open OpenCV | GStreamer warning: cannot link elements
```
which may or may not be related.


### Steps to reproduce

Run this script to capture using the webcam, press S to stop:
```
import cv2 
  
   
# Create an object to read  from camera 
video = cv2.VideoCapture(0) 
   
# We need to check if camera 
# is opened previously or not 
if (video.isOpened() == False):  
    print("Error reading video file") 
  
# We need to set resolutions.  so, convert them from float to integer. 
frame_width = int(video.get(3)) 
frame_height = int(video.get(4)) 
   
size = (frame_width, frame_height) 
   
#result = cv2.VideoWriter('filename.avi', cv2.VideoWriter_fourcc(*'MJPG'), 25.0, size) 
result = cv2.VideoWriter(f'filename.mp4', cv2.VideoWriter_fourcc(*'MP4V'), 25.0, size)

while(True): 
    ret, frame = video.read() 
  
    if ret == True:  
        # Write the frame into the file
        result.write(frame) 
  
        # Display the frame saved in the file 
        cv2.imshow('Frame', frame) 
  
        # Press S on keyboard to stop the process 
        if cv2.waitKey(1) & 0xFF == ord('s'): 
            print('exiting ...')
            break

    # Break the loop 
    else: 
        break
  
# When everything done, release the video capture and video write objects 
video.release() 
result.release() 
    
# Closes all the frames 
cv2.destroyAllWindows() 
   
print("The video was successfully saved") 
```


### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: flutter
Issue: Compiling flutter engine for embedded linux always requires Vulkan.
Labels: engine,e: embedder,P3,team-engine,triaged-engine

### Steps to reproduce

I am compiling the flutter engine for an embedded linux product. The compilation fails when it attempts to compile the flutter vulkan memory allocator "flutter_vma" as it cannot find xcb.h. My back end is OpenGL/EGL and will provide my own embedder to take care of this. I want to compile without Vulkan as I can't drag in X11/XCB.

It looks like vulkan is being included when "impeller_engine_vulkan" is being set due to the condition "IsLinux && !fuschia". When I force this to off the GN fails with missing dependencies on some test components.

Is there any way to cleanly build for a dumb old OpenGL/EGL backend?

### Actual results

A failure to compile due to missing vulkan dependencies.

### Logs

<details open>
<summary>Logs</summary>

```console

<!-- Paste your logs here -->

```

</details>


### Flutter Doctor output

<details open>
<summary>Doctor output</summary>

```console

<!-- Paste your output here -->

```

</details>
Repository: pytorch
Issue: torch 1.8 cannot torch.jit.load for script model
Labels: oncall: jit

### 🐛 Describe the bug

When I load the script file with torch.jit.load in torch1.8, I can load the file obtained by jit.trace but not the file obtained by jit.script. how can I solve this problem.

### Versions

torch 1.8

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel