sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [compiled autograd][cppnode] eliminate recompiles on ctx->saved_data
Labels: triaged,oncall: pt2,module: dynamic shapes,module: compiled autograd

### 🚀 The feature, motivation and pitch

User-defined autograd functions may use ctx->saved_data to pass non-Tensor activations e.g. int, float, bool, etc. These are passed as [IValues](https://github.com/pytorch/pytorch/blob/18e75c098b219f2d5103e93c60f1de91fd06fa3e/aten/src/ATen/core/ivalue.h#L221), and currently we specialize on them, resulting in recompiles any time there's any value change.

Workaround that exist today:
- move all ctx->saved_data scalar conversions into a custom op to hide it from the compiler
- rewrite the c++ autograd function to only use tensors
- (if you're just trying to get perf numbers while this is unsupported) build from source and comment out https://github.com/pytorch/pytorch/blob/18e75c098b219f2d5103e93c60f1de91fd06fa3e/torch/csrc/autograd/custom_function.h#L205

Supporting dynamism for non-Tensors requires a bit of work because:
- The user-defined backward will generally call conversion methods e.g. [FBGEMM PermutePooledEmbsFunction](https://github.com/pytorch/FBGEMM/blob/eb73980029c39ed7dbd4bf963fc28bb7f5012590/fbgemm_gpu/src/permute_pooled_embedding_ops/permute_pooled_embedding_function.cpp#L70-L71) `ctx->saved_data["allow_duplicates"].toBool();`, which will return a new object https://github.com/pytorch/pytorch/blob/3d56673b24073235eb3beff3f8cf1a88a91ba459/aten/src/ATen/core/ivalue.h#L1341-L1354 This is annoying for tracing a dynamic graph, since we want all scalars to use their symbolic equivalents but the API returns a new object that cannot be swapped by compiled autograd
- Dynamo has a few different codepaths to specialize on scalar values, but these lifted scalars from saved activations frequently change and specialization here will cause us to recompile

Proposed fixes:
1. Derived class that makes IValue underlying scalars swappable and override conversion methods to return symbolic variables tracked by compiled autograd
2. Dynamo + dynamic support for keeping SymFloat/SymBool/(Sym?)String as lifted inputs

### Alternatives

A possible, but annoying alternative, is to ask users to rewrite their autograd function to only use Tensors, and move their Tensor to scalar conversion in custom ops

### Additional context

_No response_

cc @ezyang @anijain2305 @chauhang @penguinwu
Repository: rust
Issue: Support target json file extension in various cases (json, JSON)
Labels: T-compiler,A-target-specs,C-bug

Currently user's target json file can have only `json` form, but for file that ends with `.JSON' rustc returns error:
```
error: Error loading target specification: Could not find specification for target "my-target.JSON". Run `rustc --print target-list` for a list of built-in targets
```

Where it useful?

Old OS and old file-systems such as FAT (that stored the files names and extensions as all caps).

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.81.0-nightly (ba1d7f4a0 2024-06-29)
binary: rustc
commit-hash: ba1d7f4a083e6402679105115ded645512a7aea8
commit-date: 2024-06-29
host: aarch64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7
```
Repository: excalidraw
Issue: `gpt-4-vision-preview` has been deprecated
Labels: bug,ai

Excalidraw's Wireframe to code is not working (I think it should use gpt4o in backend) , when a frame is drawn, it gives output as follows.

The model `gpt-4-vision-preview` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations

![image](https://github.com/excalidraw/excalidraw/assets/99552771/995227ae-fcc5-439b-9171-20d77d635900)
![image](https://github.com/excalidraw/excalidraw/assets/99552771/c306c66c-02fd-406f-9743-3ae7d7b0d246)
Repository: pytorch
Issue: HF YituTechConvBert accuracy test is flaky for training under max-autotune mode
Labels: triaged,oncall: pt2,module: pt2 accuracy

### 🐛 Describe the bug

The pass status for YituTechConvBert is flaky for training in max-autotune mode.

<img width="1158" alt="Screenshot 2024-07-05 at 1 21 43 PM" src="https://github.com/pytorch/pytorch/assets/52589240/40d5903b-6eaa-4693-8979-f0d288a2086e">

I've seen this again in a recent run with max-autotune [link](https://hud.pytorch.org/benchmark/compilers?dashboard=torchinductor&startTime=Fri%2C%2028%20Jun%202024%2006%3A53%3A45%20GMT&stopTime=Fri%2C%2005%20Jul%202024%2006%3A53%3A45%20GMT&granularity=hour&suite=torchbench&mode=training&dtype=amp&lBranch=gh/shunting314/162/head&lCommit=cb236e8c198b54901e4fb19698f91be786f72e25&rBranch=main&rCommit=4ee1cb9b955fcc5d75a421b19393998122136f2c)

Tried command
```
TORCHINDUCTOR_MAX_AUTOTUNE=1 time python benchmarks/dynamo/huggingface.py --accuracy --no-translation-validation --training --amp --backend inductor --device cuda --only YituTechConvBert
```
but can not repro locally.


### Error logs

_No response_

### Minified repro

_No response_

### Versions

.

cc @ezyang @anijain2305 @chauhang @penguinwu
Repository: pytorch
Issue: autograd.Function HOP backward input names could be better
Labels: triaged,oncall: pt2,module: higher order operators

I don't know what i'm looking at:

![image](https://github.com/pytorch/pytorch/assets/5652049/ffb82e2f-484e-4da7-9451-ac2e93a90c38)


cc @ezyang @anijain2305 @chauhang @penguinwu @ydwu4
Repository: node
Issue: Adding --trace-sigint for tests that are timing out in tools/test.py?
Labels: test,tools

It seems recently many flakes are tests that are timing out. In this case, in the CI we usually see nothing but a hint that it is failing because of a timeout. It seems useful to either always run the tests with `--trace-sigint`, or support re-running the test immediately with `--trace-sigint` once it times out. (another option would be to use a stress test job separately, but not all configs are supported in stress tests)

Some caveats:

1. This may work well enough at least for tests that are not timing out because a child process is timing out. For the child process case, maybe it's useful to implement a dedicated environment variable for this (I think simply using `NODE_OPTIONS` might not be enough since the tests might not be concatenating what's from the environment).
2. `--trace-sigint` is implemented in JS and is only printing the main thread's JS stack trace. In this use case I think we are very likely to need the native stack traces too, and for all threads.
3. Maybe an option built into Node.js isn't the most robust approach and we should implement something external for this?

cc @nodejs/build @nodejs/testing @legendecas (who implemented `--trace-int`)
Repository: next.js
Issue: Webpack in Next.js v15 (canary) causes an error when referring to `Language.C` in `@codeium/react-code-editor`
Labels: bug,Webpack

### Link to the code that reproduces this issue

https://github.com/exKAZUu/nextjs-v15-codeium-editor

### To Reproduce

1. `git clone https://github.com/exKAZUu/nextjs-v15-codeium-editor`
2. `cd nextjs-v15-codeium-editor`
3. `yarn && yarn dev`
4. Open http://localhost:3000/

or 

1. `git clone https://github.com/exKAZUu/nextjs-v15-codeium-editor`
2. `cd nextjs-v15-codeium-editor`
3. `yarn && yarn build`

### Current vs. Expected behavior

The reproduction steps cause the following error:
```
Error: Cannot access Language.C on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
```

However, Next.js 14.2.4 causes no error.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:14:59 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.3.0
  npm: 10.8.1
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.56 // Latest available version is detected (15.0.0-canary.56).
  eslint-config-next: N/A
  react: 19.0.0-rc-f38c22b244-20240704
  react-dom: 19.0.0-rc-f38c22b244-20240704
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


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

Webpack

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

next dev (local), next build (local)

### Additional context

`yarn dev --turbo` causes no error, so I suspect Webpack has an issue.
Repository: next.js
Issue: Build error when using mapped drive (Windows)
Labels: bug,Output (export/standalone)

### Link to the code that reproduces this issue

https://github.com/DiskCrasher/next-js-issue2

### To Reproduce

1. Save the project on a Linux server that's configured with Samba.
2. Share the parent project directory using Samba.
3. From Windows, map a network drive to the share.
4.  `cd` to the drive and project folder (e.g. "z:", "cd \temp\reproduction-app").
5. Run `yarn install` followed by `yarn build`.
6. Observe build errors where `C:` is erroneously being appended to the path:
```powershell
PS Z:\temp\reproduction-app> yarn build
  ▲ Next.js 15.0.0-canary.56

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types    
 ✓ Collecting page data    
 ✓ Generating static pages (5/5)
 ✓ Collecting build traces
 ⚠ Failed to copy traced files for Z:\temp\reproduction-app\.next\server\pages\_app.js [Error: ENOENT: no such file or directory, mkdir 'Z:\temp\C:'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: 'Z:\\temp\\C:'
}
 ⚠ Failed to copy traced files for Z:\temp\reproduction-app\.next\server\pages\_document.js [Error: ENOENT: no such file or directory, mkdir 'Z:\temp\C:'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: 'Z:\\temp\\C:'
}

> Build error occurred
[Error: ENOENT: no such file or directory, mkdir 'Z:\temp\C:'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: 'Z:\\temp\\C:'
}
   Finalizing page optimization  .
PS Z:\temp\reproduction-app>
```

### Current vs. Expected behavior

Current behavior results in a build error.
Expected behavior is that the project builds correctly on the mapped Windows drive.

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 16188
  Available CPU cores: 8
Binaries:
  Node: 20.15.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.56 // Latest available version is detected (15.0.0-canary.56).
  eslint-config-next: N/A
  react: 19.0.0-rc-fb9a90fa48-20240614
  react-dom: 19.0.0-rc-fb9a90fa48-20240614
  typescript: 5.5.3
Next.js Config:
  output: standalone
```


### Which area(s) are affected? (Select all that apply)

Output (export/standalone)

### Which stage(s) are affected? (Select all that apply)

next build (local)

### Additional context

_No response_
Repository: rust
Issue: Error adding `size_of` and `size_of_val` and `align_of` and `align_of_val` to the common prelude
Labels: C-discussion

Since https://github.com/rust-lang/rust/pull/123168 , All prelude of nightly channel will export `size_of` and `size_of_val` and `align_of` and `align_of_val` . This clearly leads to issues with the repeat build of code developed on nightly.

Possible impacts:
https://github.com/microsoft/windows-rs/issues/3076
Repository: ant-design
Issue: feat: reverse the steps in dot style
Labels: Inactive,unconfirmed

### What problem does this feature solve?

sometimes we need the dot-style steps start from the bottom to the top

### What does the proposed API look like?

add a reverse prop into the dot-style steps

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Typed array initialized with same values in 2 different instances sharing the same reference
Labels: topic:gdscript

### Tested versions

- Reproducible in: v4.2.stable, v4.2.2.stable

### System information

Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.3699) - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)

### Issue description

As the title described, typed arrays initialized with same value in 2 different node of different instanced scenes seems to have same reference of the array. When modifying elements in one array, the other also gets modified. If the arrays are initialized with different values in the inspector, then it works properly.

This behaviour is very annoying since i cannot modify components that have the same initialized values. One possible workaround would be using non-typed array, which also works fine in my case.

### Steps to reproduce

Run MRP and inspect console output

### Minimal reproduction project (MRP)

[Test.zip](https://github.com/user-attachments/files/16114744/Test.zip)
Repository: godot
Issue: C# class validation fails with filenames that include a period
Labels: discussion,topic:editor

### Tested versions

Reproducible in v4.3.beta2.mono.official [b75f0485b]

### System information

Windows 11 - v4.3.beta2.mono.official [b75f0485b]

### Issue description

I like to use web filenesting in Visual Studio's editor to keep what is likely an abomination of a file structure managed by the IDE like so:

Project.cs
Project.BaseClass1.cs
Project.BaseClass1.SubClass1.cs
Project.BaseClass1.SubClass2.cs

Godot's file manger on creation of a C# file doesn't like making a file this way, with any additional period in the filename causing it to report a bad extension.

I suspect the part of Godot's file manager that reads the extension is reading the extension left-to-right from the first period in the filename, instead of reading from the end of the string up to the first period right-to-left.

### Steps to reproduce

Attempt to create a new C# script with the name TestName.Test.cs

### Minimal reproduction project (MRP)

N/A.
Note for C# users understood, N/A.
Repository: rust
Issue: Delegation: It's impossible to `reuse` foreign fns
Labels: T-compiler,C-bug,requires-incomplete-features,F-fn_delegation

Example:

```rs
#![feature(fn_delegation)]

extern "C" {
    fn f();
}

reuse f as g;
//~^ ERROR call to unsafe function `f` is unsafe and requires unsafe function or block
```

The synthesized fn `g` ought to be marked `unsafe` as `f` is implicitly unsafe[^1] but that doesn't happen.

[^1]: Unless marked `safe` under feature `unsafe_extern_blocks`, these *are* possible to `reuse` for obvious reasons.
Repository: rust
Issue: Delegation makes it possible to define C-variadic associated functions
Labels: T-compiler,C-bug,F-c_variadic,requires-incomplete-features,F-fn_delegation

While the following code gets rejected:

```rs
#![feature(c_variadic)]

struct S;

impl S {
    unsafe extern "C" fn f(...) {}
    //~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
}
```

The code below doesn't:

```rs
#![feature(c_variadic, fn_delegation)]

struct S;

unsafe extern "C" fn f(...) {}

impl S {
    reuse f;
}
```

And yes, `S::f` does "appear to behave variadic". I'm not a C-FFI or ABI expert, so I guess it's for a very good reason that variadic *associated* functions generally get rejected.
Repository: ant-design
Issue: scale缩放导致tour错位
Labels: 🐛 Bug,Inactive

### Reproduction link

https://stackblitz.com/edit/react-rgqfh4?file=index.html

scale缩放情况下，整体错位了
![image](https://github.com/ant-design/ant-design/assets/29728228/cade6e68-6a9b-4dc5-ab5d-28c205ecde04)
官方的demo，直接body上scale缩放
![image](https://github.com/ant-design/ant-design/assets/29728228/ab264c27-d5b3-4eaa-a833-ebc2be06343a)


### What is expected?

希望不要错位

### What is actually happening?

错位

| Environment | Info |
| --- | --- |
| antd | 5.18.3 |
| React | 18 |
| System | mac/windows |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Inconsistency `CrossEntropyLoss` weights value between in gpu and in cpu.
Labels: module: nn,module: cuda,triaged

### 🐛 Describe the bug

There's an inconsistent results when the `CrossEntropyLoss` is placed in `cpu` and in `gpu`.
When the loss module is in `cpu`, if its weight value is updated by an in-place operation, the weight itself from the outside will also be updated.
```python
>>> from torch.nn import CrossEntropyLoss

>>> weight = torch.tensor([1., 2.])
... loss = CrossEntropyLoss(weight=weight)
... loss.weight *= 2
... assert torch.equal(weight, torch.tensor([1., 2.]))
AssertionError
```

But if the loss module is placed into a cuda device, then the weight value from the outside won't be updated.
```python
>>> weight = torch.tensor([1., 2.])
... loss = CrossEntropyLoss(weight=weight)
... loss.to("cuda")
... loss.weight *= 2
... assert torch.equal(weight, torch.tensor([1., 2.]))
```

This behavior might be related to #126854 .


### Versions

```
Collecting environment information...
PyTorch version: 2.2.2+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Home
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22631-SP0
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 4GB Laptop GPU
Nvidia driver version: 555.99
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:










Revision=

Versions of relevant libraries:
[pip3] flake8==7.0.0
[pip3] flake8-plugin-utils==1.3.3
[pip3] flake8-pytest-style==2.0.0
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.22.3
[pip3] onnx==1.11.0
[pip3] onnxruntime-training==1.15.1
[pip3] pytorch-lightning==2.1.3
[pip3] torch==2.2.2+cu121
[pip3] torch-directml==0.2.1.dev240521
[pip3] torch-ort==1.17.0
[pip3] torchaudio==2.2.1+cu121
[pip3] torchmetrics==1.3.2
[pip3] torchvision==0.17.2+cu121
[conda] Could not collect
```

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @ptrblck @msaroufim
Repository: vscode
Issue: Find (Ctrl+F/cmd+F) matches deleted text
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?: 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.91.0
- OS Version: macOS Sonoma 14.5

Steps to Reproduce:

1. Paste `foo bar baz`
2. Delete ` baz`
3. Use `Ctrl+F`/`cmd+F` to find `foo bar baz`
Repository: stable-diffusion-webui
Issue: [Bug]: webui  exits  when script  completed
Labels: bug-report

### Checklist

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

### What happened?


After the script finished running, the webui also terminated, and there were no warnings or errors on the console. I checked the code of the script but couldn't find the reason. What caused this problem?

### Steps to reproduce the problem

1.enabled Riffusion‘s script  -Riffusion Audio Generator
2.click “generate” button
3.Script run completed，webui exit

### What should have happened?

webui should not  exit  when script  completed

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

Microsoft Edge

### Sysinfo

[sysinfo-2024-07-06-07-23.json](https://github.com/user-attachments/files/16115177/sysinfo-2024-07-06-07-23.json)


### Console logs

```Shell
none
```


### Additional information

_No response_
Repository: TypeScript
Issue: [isolatedDeclarations] Type of const variable declared with template literal expression containing only literals still requires explicit annotation
Labels: Help Wanted,Possible Improvement

### 🔎 Search Terms

isolated declarations template literal expression 

### 🕗 Version & Regression Information

- This is the behavior in every version I tried


### ⏯ Playground Link

https://www.typescriptlang.org/play/?isolatedDeclarations=true&ts=5.6.0-dev.20240705#code/KYDwDg9gTgLgBAG2PAZhCcC8cAGASAbwHIiBfHAbgCgrRJY4BjCAOwGd4AjAQyi10Ily1WuGioAri0YwAlqzg8AXgAoAlHAJU4OuFGQSoLAcTKUqpIA

### 💻 Code

```ts
export let foo = `${''}`;

export const bar = `${''}`;

export function baz() {
    return `${''}`;
}
```


### 🙁 Actual behavior

`bar` has a type error:
```
Variable must have an explicit type annotation with --isolatedDeclarations.(9010)
input.tsx(3, 14): Add a type annotation to the variable bar.
```

`foo` would also have a type error if `as const` was added to the expression.

### 🙂 Expected behavior

No type error

### Additional information about the issue

fun fact: I accidentally discovered this behavior when I found that [oxc-transform](https://www.npmjs.com/package/oxc-transform) has type errors for both `const`, `let`, and return types.
Repository: godot
Issue: GPUParticles don't emit finished signal when oneshot is set true in gdscript
Labels: bug,topic:particles

### Tested versions

- Reproducible in 4.3.beta2
- Reproducible in 4.2.1.stable

### System information

Godot v4.3.beta2 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

### Issue description

When setting oneshot to true on a GPUParticles2D node, the particles visually stop emitting some time later as expected, however the 'finished' signal is not emitted. This does not occur with CPUParticles2D. I have not tested this for 3D particles, but I presume that this also applies to the GPUParticles3D.

### Steps to reproduce

- Open the MRP below
- There are two particle emitters, the left is GPU and the right is CPU.
- Both are setup the same, and each have a custom script. In this script, the emitters are set to have oneshot enabled on ready. A function is connected to the finish signal which will print a message and free the particle emitters.
- Play the game. Both particle emitters visually stop emitting, however only the CPU particles prints a message and frees itself. Checking the remote hierarchy, you can see that the GPUParticles2D is still present despite nothing being emitted; the finished signal should have emitted!
- If the oneshot setting is enabled on the GPUParticles2D from the beginning (rather than being set through gdscript), then the finished signal correctly emits.

### Minimal reproduction project (MRP)

[particles-finished-bug.zip](https://github.com/user-attachments/files/16115268/particles-finished-bug.zip)