sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [autograd] inconsistent jvp results
Labels: module: autograd,triaged

### 🐛 Describe the bug

I have two implementations of an isometry loss function that uses Jacobian-vector products (JVP), but they're producing different gradients:
```python
import torch

vae = VAEModel()

vae.to("cuda")

func = lambda z: vae.decode(z, return_dict=False)[0]

input = torch.randn(1, 8, 8, 8, device="cuda")
u = torch.randn_like(input, device=input.device)

def iso_loss1():
    Ju = torch.autograd.functional.jvp(func, input, u, create_graph=True)[1]
    TrR = torch.sum(Ju.float() ** 2, dim=tuple(range(1, Ju.dim()))).mean()

    isometry_loss = TrR
    return isometry_loss

def iso_loss2():
    Ju = torch.func.jvp(func, (input,), (u,))[1]
    TrR = torch.sum(Ju.float() ** 2, dim=tuple(range(1, Ju.dim()))).mean()

    isometry_loss = TrR
    return isometry_loss

def compare_grads():
    vae.zero_grad()
    
    loss1 = iso_loss1()
    loss1.backward()
    grads1 = {name: param.grad.clone() for name, param in vae.decoder.named_parameters() if param.grad is not None}
    
    vae.zero_grad()
    
    loss2 = iso_loss2() 
    loss2.backward()
    grads2 = {name: param.grad.clone() for name, param in vae.decoder.named_parameters() if param.grad is not None}
    
    print(f"Loss1: {loss1.item()}")
    print(f"Loss2: {loss2.item()}")
    
    max_diff = 0
    for name in grads1:
        print(f"{grads1[name]=} {grads2[name]=}")
        diff = (grads1[name] - grads2[name]).abs().max().item()
        print(f"Max gradient difference for {name}: {diff}")
        max_diff = max(max_diff, diff)
        break
        
    print(f"\nMaximum gradient difference across all parameters: {max_diff}")

compare_grads()

```

The original implementation (iso_loss1) uses `torch.autograd.functional.jvp`, which is computationally expensive as it involves two vector-Jacobian product (VJP) calculations under the hood. To improve performance, I attempted to switch to `torch.func.jvp`, which uses a more efficient forward-mode implementation.

However, I've noticed two concerning issues:
1. The gradients produced by these two loss implementations differ.
2. Unlike `torch.autograd.functional.jvp`, `torch.func.jvp` doesn't provide a `create_graph=True` parameter

This raises the question: Is `torch.func.jvp` not intended for use in network optimization scenarios? I'd appreciate any insights into this behavior and guidance on the proper approach to use.

### Versions

N/A

cc @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @xmfan
Repository: rust
Issue: Compiler crashes with `SIGSEGV` on aarch64-unknown-linux-gnu
Labels: I-crash,I-ICE,T-compiler,C-bug,O-AArch64,S-needs-repro,C-external-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

```sh
git clone https://github.com/sgrif/pq-sys
cd pq-sys
git checkout 4e4f24c8f35abec47927ba20d144b7a8172f1f98
cargo check --no-default-features --features "bundled"
```

This happened once on a github CI runner, I nevertheless fill this as report as the output asked for it. It might be an hardware issue, as it went away with a rebuild.

CI LOG: https://github.com/sgrif/pq-sys/actions/runs/12903477183/job/35978791282?pr=73#step:14:26

### 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.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: aarch64-unknown-linux-gnu
release: 1.84.0
LLVM version: 19.1.5
```

### Error output

```
error: rustc interrupted by SIGSEGV, printing backtrace

/home/runner/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/../lib/librustc_driver-bedc4a794a543ce8.so(+0xbf78ec)[0xff0bdc5f78ec]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0xff0be59597e0]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
error: could not compile `vcpkg` (lib)
```
Repository: godot
Issue: Example programs of the AssertLib crash on the Meta Quest 3
Labels: needs testing,topic:xr

### Tested versions

Reproducible on current version on Meta Quest 3.
Godot 4.4dev3

Other versions (for testing purposes) are not avaiable from the store.


### System information

Godot 4.4dev3 meta

### Issue description

We need some advice from you. We are planning an MR application for production and service. 
After research, the Godot engine and the Meta Quest were selected for development.

BUT ... the example programs for Meta Quest usually crash. In rare cases, they work.
We don't see a pattern in this sporadic behavior. Restarting the meta sometimes helps, sometimes only a reinstall of Godot helps. Sometimes, deleting all of Godot's cache files is enough.
With luck, you can sometimes take a look at the editor. Various classes/objects are not found. 
("Parse Error", "OpenXRFbSceneManager not found", "OpenXRFbSpatialEntity not found" etc.)

Due to time constraints, we did not check the entire issue board for similar errors. Please excuse this. 
Is there any feedback and plans for this bug yet?

Unfortunately, this is a very significant mistake, so our executives are already talking about a different engine with different hardware. However, we love the concepts of Godot and especially the editor in the meta.

### Steps to reproduce

Load a sample program (e.g. "meta scene xr sample") from the asset library.
Do this within the meta.

Start the program and it may crash then.

### Minimal reproduction project (MRP)

meta scene xr sample
Repository: deno
Issue: Deno panic on KV
Labels: ext/kv,panic

From the log output of my app:

```
 | ============================================================
 | 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: linux x86_64
 | Version: 2.1.4
 | Args: ["deno", "run", "--allow-env", "--allow-net", "--unstable-kv", "server.ts"]
 | 
 | thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/denokv_sqlite-0.8.4/lib.rs:250:10:
 | called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

This happened overnight 4 times:
* Tue Jan 21 2025, 19:31:27 UTC
* Tue Jan 21 2025, 19:33:07 UTC
* Tue Jan 21 2025, 19:34:27 UTC
* Tue Jan 21 2025, 19:35:27 UTC

Looking back through other logs, it's also happened before, just not this many times in a short period of time.

Because there's no stack trace that shows where in my code it's crashing, I have no reference point to start with which to create a repro.

There was a little bit of load and memory pressure on the machine at the time, but it certainly wasn't near any limits.
Repository: pytorch
Issue: FP8: E5M2: The FP8 E5M2 result is not `inf` when casting a FP32 value larger than max normal value of FP8 E5M2 (57344)
Labels: module: docs,triaged,module: NaNs and Infs,module: float8

### 🐛 Describe the bug

See the case,
```
>>> import torch
>>> a = torch.tensor(60000, dtype=torch.float)
>>> b = a.to(torch.float8_e5m2)
>>> b
tensor(57344., dtype=torch.float8_e5m2)
```

In theory, the max normal value of fp8 e5m2 is 57344. Any values above 57344 will be represented with fp8 e5m2 `inf`.

https://github.com/pytorch/pytorch/blob/3cbc8c54fd37eb590e2a9206aecf3ab568b3e63c/c10/util/Float8_e5m2.h#L91
Code shows the fp8 value will be `inf` or `nan` if the input fp32 value is larger than 65536, which is the first value not representable for fp8 e5m2. In another word, value between 57344 and 65536 will go to the else branch.
BTW, even the boundary is 65536 in PyTorch implementation, I found,
```
>>> a = torch.tensor(61440, dtype=torch.float)
>>> b = a.to(torch.float8_e5m2)
>>> b
tensor(inf, dtype=torch.float8_e5m2)
```
61440 in fp32 is converted to `inf` in fp8 e5m2.

### Versions

Latest main branch.

cc @svekars @brycebortree @sekyondaMeta @AlannaBurke @yanbing-j @vkuzo @albanD @kadeng @penguinwu
Repository: material-ui
Issue: Ban sx atrribute in all pigment components and skip compilation
Labels: package: system,status: waiting for maintainer

### Summary

Migrating from v4 -> v5 has been a rollercoaster migrating `makestyles` to `styled` that introduced `SX` property and made life easier.

Migrating from v5 -> v6 is still unclear how to workaround some cases of the dynamic context of styling and introduced unwanted experiences for developers (for middle, junior level developers mostly)  on how to work with `SX` property. Most cases can be solved using component + styled + classes combination over `SX` which is better and clearer how to do it.

### Examples

_No response_

### Motivation

It would be nice to disable this feature if possible and choose a proper styling method for consistency throughout the application. I do not think, that `SX` is the future of styling and probably it will shift in v7 or v8 material release again. 

Note: disabled, only for pigment components, not emotion for easy migration.

**Search keywords**: sx, not the future
Repository: transformers
Issue: tokenizer_class: `LlamaTokenizerFast` becomes `LlamaTokenizer` after load + immediate save
Labels: bug

### System Info

I do not understand why but saving a loaded tokenizer changes the tokenizer class type. Unsure this is a usage error on my part of expected output from HF. 



### Who can help?

@ArthurZucker @itazap

### Information

- [ ] The official example scripts
- [x] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)

### Reproduction

```py

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("DeepSeek/DeepSeek-R1-Distill-Qwen-7B")
tokenizer.save_pretrained('./tokenizer_copy')
```

`tokenizer_config.json`
* before `save`  `"tokenizer_class": "LlamaTokenizerFast" `
* after `save` `"tokenizer_class": "LlamaTokenizer"`

### Expected behavior

Tokenizer Class stays the same
Repository: rust
Issue: Internal Status Access Violation with constant redefinition
Labels: I-ICE,T-compiler,C-bug,WG-compiler-parallel,S-has-mcve,S-has-bisection

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

```Rust
const FOO: usize = 32;
fn bar() {
    const FOO: usize = FOO;
}
```


### 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.86.0-nightly (ed43cbcb8 2025-01-21)
binary: rustc
commit-hash: ed43cbcb882e7c06870abdd9305dc1f17eb9bab9
commit-date: 2025-01-21
host: x86_64-pc-windows-msvc
release: 1.86.0-nightly
LLVM version: 19.1.7
```

### Error output

```
error: could not compile `testtest` (lib)

Caused by:
process didn't exit successfully: `C:\Users\<username>\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin\clippy-driver.exe C:\Users\<username>\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name testtest --edition=2024 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -Ctarget-cpu=native -Ztune-cpu=native -Ctarget-feature=+aes -Clink-arg=-fuse-ld=lld -Zthreads=4 --cfg "feature=\"default\"" --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values(\"default\", \"rand\"))" -C metadata=10a1d148f727b426 -C extra-filename=-652f9f02f745d5a0 --out-dir C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\deps -C incremental=C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\incremental -L dependency=C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\deps` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
```
Repository: flutter
Issue: Windows module_host_with_custom_build_test is 2.11% flaky
Labels: P0,c: flake,team-tool

<!-- meta-tags: To be used by the automation script only, DO NOT MODIFY.
{
  "name": "Windows module_host_with_custom_build_test"
}
-->

The post-submit test builder `Windows module_host_with_custom_build_test` had a flaky ratio 2.11% for the past (up to) 100 commits, which is above our 2.00% threshold.

One recent flaky example for a same commit: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20module_host_with_custom_build_test/22149
Commit: https://github.com/flutter/flutter/commit/8ef7b932879cea66b9d98cfdd87dc3787354683c

Flaky builds:
https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20module_host_with_custom_build_test/22149
https://ci.chromium.org/ui/p/flutter/builders/prod/Windows%20module_host_with_custom_build_test/22134

Recent test runs:
https://flutter-dashboard.appspot.com/#/build?taskFilter=Windows%20module_host_with_custom_build_test

Please follow https://github.com/flutter/flutter/blob/master/docs/infra/Reducing-Test-Flakiness.md#fixing-flaky-tests to fix the flakiness and enable the test back after validating the fix (internal dashboard to validate: go/flutter_test_flakiness).
Repository: godot
Issue: The behavior of CollisionObject2D._mouse_enter() is very strange
Labels: bug,confirmed,topic:physics,topic:input

### Tested versions

4.3-stable

### System information

MacOS 15

### Issue description

1, The function _mouse_entered() of Area2D is disabled when an Control node cover the Area2D. except on you click mouse left button. As shown in the following figure

![Image](https://github.com/user-attachments/assets/895eccbb-8a5f-4610-9ae4-13cdf91f78a8)

2, I can`t prevent _mouse_entered() of Area2D with Viewport.set_input_as_handled() even in _input(). So how is the _mouse_entered() method implemented? 

3, My game requires a lot of mouse clicks for operation. But the shape of the Control node is not rich enough, the mouse event of Area2D node is strange. Maybe I missed something, can you tell me the best practices.

### Steps to reproduce

NA

### Minimal reproduction project (MRP)

[signalbugtest.zip](https://github.com/user-attachments/files/18502773/signalbugtest.zip)
Repository: PowerToys
Issue: Mouse Button Customization Features Similar to XMBC
Labels: Needs-Triage

### Description of the new feature / enhancement

I am a frequent user of both PowerToys and X-Mouse Button Control (XMBC). While PowerToys provides excellent utilities like FancyZones and Mouse Utilities, it lacks the ability to assign custom actions to mouse buttons.

I believe adding mouse button customization features (e.g., application-specific profiles, media control, or macro assignment) would significantly enhance the functionality of PowerToys. This feature is particularly useful for users who rely on productivity tools or need fine-grained control over their devices.

Such a feature would complement the existing "Mouse Utilities" module and attract a broader user base. Please consider integrating this functionality in future updates.

### Scenario when this would be used?

.

### Supporting information

_No response_
Repository: react-native
Issue: network request failed for some users
Labels: 🌐Networking,Needs: Repro,Needs: Attention

### Description

some users reported network request failed using rtk query. This behavior occurs specifically in a React Native environment.

### Steps to reproduce

1. Use RTK Query to initiate a network request (e.g., `useQuery`)  
3. Observe that the query returns a fetch error instead of executing successfully.

### React Native Version

0.75.4

### Affected Platforms

Runtime - Android, Runtime - iOS

### Output of `npx react-native info`

```text
System:
  OS: macOS 12.7.6
  CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Memory: 40.65 MB / 16.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 20.15.0
    path: ~/.nvm/versions/node/v20.15.0/bin/node
  Yarn:
    version: 4.5.0
    path: ~/.nvm/versions/node/v20.15.0/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.15.0/bin/npm
  Watchman:
    version: 2024.07.15.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 21.4
      - iOS 16.0
      - macOS 12.3
      - tvOS 16.0
      - watchOS 9.0
  Android SDK:
    API Levels:
      - "25"
      - "28"
      - "30"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 24.0.0
      - 24.0.1
      - 24.0.2
      - 24.0.3
      - 30.0.2
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-26 | Google Play Intel x86 Atom
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12169540
  Xcode:
    version: 14.0/14A309
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```

### Stacktrace or Logs

```text
## Observed Behavior  
- The query fails with a fetch error randomly.  
```

### Reproducer

general issue not needing for repo

### Screenshots and Videos

_No response_
Repository: pytorch
Issue: DISABLED test_linear_and_cel_max_autotune (__main__.InplacePaddingTest)
Labels: triaged,module: flaky-tests,skipped,oncall: pt2,module: inductor

Platforms: linux

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_linear_and_cel_max_autotune&suite=InplacePaddingTest&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/35974314707).

Over the past 3 hours, it has been determined flaky in 4 workflow(s) with 8 failures and 4 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_linear_and_cel_max_autotune`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.


Test file path: `inductor/test_inplace_padding.py`

cc @clee2000 @wdvr @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov
Repository: pytorch
Issue: DISABLED test_max_autotune_remote_caching_dynamic_False (__main__.TestMaxAutotuneRemoteCache)
Labels: module: rocm,triaged,module: flaky-tests,skipped,oncall: pt2,module: inductor

Platforms: rocm

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_max_autotune_remote_caching_dynamic_False&suite=TestMaxAutotuneRemoteCache&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/35967125228).

Over the past 3 hours, it has been determined flaky in 6 workflow(s) with 9 failures and 6 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_max_autotune_remote_caching_dynamic_False`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "/var/lib/jenkins/pytorch/test/inductor/test_max_autotune.py", line 1072, in test_max_autotune_remote_caching
    self.assertEqual(global_stats.autotune_remote, Stats(2, 3, 2))
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/testing/_internal/common_utils.py", line 4028, in assertEqual
    raise error_metas.pop()[0].to_error(  # type: ignore[index]
AssertionError: Object comparison failed: _GlobalItemStats(num_put=4, num_get_hit=2, num_get_miss=4) != Stats(num_put=2, num_get_hit=3, num_get_miss=2)

To execute this test, run the following from the base repo dir:
    PYTORCH_TEST_WITH_ROCM=1 python test/inductor/test_max_autotune.py TestMaxAutotuneRemoteCache.test_max_autotune_remote_caching_dynamic_False

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

</details>


Test file path: `inductor/test_max_autotune.py`

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd @clee2000 @wdvr @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov