sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: transformers
Issue: `pipeline` AttributeError with `torch.nn.DataParallel`
Labels: bug

### System Info

- `transformers` version: 4.48.0
- Platform: Linux-6.5.0-35-generic-x86_64-with-glibc2.35
- Python version: 3.11.5
- Huggingface_hub version: 0.27.1
- Safetensors version: 0.4.3
- Accelerate version: 0.33.0
- Accelerate config:    not found
- PyTorch version (GPU?): 2.1.1+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: yes
- Using GPU in script?: yes
- GPU type: NVIDIA RTX A6000

### Who can help?

_No response_

### 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

Hello,

I am finetuning a `BertForSequenceClassification` after which point I would like to test it using `pipelines`.
However, since I have multiple GPUs, I use `torch.nn.DataParallel` to wrap it in the following way:

```python
self.model = torch.nn.DataParallel(
                module=BertForSequenceClassification.from_pretrained(
                    pretrained_model_name_or_path=self.config.embedding_model_file.model_name,
                    cache_dir=Path(self.config.embedding_model_file.cache_dir),
                    num_labels=len(self.datasets.train.unique_classes),
                    id2label={
                        idx: label
                        for idx, label in enumerate(self.datasets.train.unique_classes)
                    },
                    label2id={
                        label: idx
                        for idx, label in enumerate(self.datasets.train.unique_classes)
                    },
                    torch_dtype=self.config.training_params.torch_dtype,
                ).to(self.device)
            )
```


and then try to use it for inference via:

```python
pipeline(
            task="text-classification",
            model=self.model,
            tokenizer=self.datasets.test.tokenizer,
            device=self.device,
            top_k=self.config.training_params.top_k,
            torch_dtype=self.config.training_params.torch_dtype,
        )
```

This worked when I simply had the `BertForSequenceClassification` instance but now with the `DataParallel` wrapping over it I get:

```python
File "/home/xx/miniconda3/envs/xxx/lib/python3.11/site-packages/transformers/pipelines/__init__.py", line 950, in pipeline
    model_config = model.config
                   ^^^^^^^^^^^^
  File "/home/xx/miniconda3/envs/xxx/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1695, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'DataParallel' object has no attribute 'config'
```'


What is the recommended way in this case, do I have to unwrap the model from the `DataParallel` at inference?

### Expected behavior

Expected behavior is for the `pipeline` call to not throw an Exception.
Repository: PowerToys
Issue: Mouse Utilities >> Find My Mouse
Labels: Needs-Triage

### Description of the new feature / enhancement

Under Mouse Utilities >> Find my Mouse, is it possible to have a rectangular highlighter. This will have an additional option of chaning "Spotlight Radius (px)" to something like "Spotlight Dimension (Len * Wid)" for rectangular region.

This is particular useful for create educational video tutorial where we need to highlight the section in rectangle instead of a circle.

Thank you. 

### Scenario when this would be used?

This is particular useful for create educational video tutorial where we need to highlight the section in rectangle instead of a circle.



### Supporting information

_No response_
Repository: godot
Issue: Parse error at runtime even though everything is fine at design time (OpenXR app on Meta Quest 3)
Labels: bug,needs testing,topic:xr

### Tested versions

Reproducable in 4.4 dev 3 on Meta Quest 3

### System information

Meta Quest 3, V71.0.0

### Issue description

An OpenXR application for Meta Quest 3 aborts with the error "Could not find type "OpenXRFbSpatialEntity" in the current scope", although everything is OK in the editor and "OpenXRFbSpatialEntity" is found via autocomplete. Everything seems OK in the editor.

Even minimal test projects (see appendix) show this error.

Has anyone had similar experiences?

### Steps to reproduce

Load the project into Meta Quest 3, for example via USB into the "Documents" folder.
Start Godot in Meta Quest 3 and import the project.
Load the plugin "Godot OpenXR Vendors plugin for Godot 4.3" from the assets. (It's too big to paste it here.)
Start the project.

### Minimal reproduction project (MRP)

The project requires the "Godot OpenXR Vendors plugin for Godot 4.3", which would make the file too large here.

The actual project is extremely small and consists of only two very small scenes.

[test.zip](https://github.com/user-attachments/files/18451570/test.zip)



Here are the messages from the Godot log file:

SCRIPT ERROR: Parse Error: Could not find type "OpenXRFbSpatialEntity" in the current scope.
   at: GDScript::reload (res://main/DefaultScene.gd:7)
SCRIPT ERROR: Parse Error: Identifier "OpenXRFbSpatialEntity" not declared in the current scope.
   at: GDScript::reload (res://main/DefaultScene.gd:11)
SCRIPT ERROR: Parse Error: Identifier "OpenXRFbSpatialEntity" not declared in the current scope.
   at: GDScript::reload (res://main/DefaultScene.gd:26)
ERROR: Failed to load script "res://main/DefaultScene.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript.cpp:3005)
ERROR: Cannot get class 'OpenXRFbSceneManager'.
   at: _instantiate_internal (core/object/class_db.cpp:550)
WARNING: Node OpenXRFbSceneManager of type OpenXRFbSceneManager cannot be created. A placeholder will be created instead.
   at: instantiate (scene/resources/packed_scene.cpp:277)
Repository: flutter
Issue: [CP] <title>Fix mouse scrolling issue on desktop and web
Labels: cp: review

### Issue Link

https://github.com/flutter/flutter/issues/160953#issuecomment-2597744826

### Target

stable

### Cherry pick PR Link

https://github.com/flutter/flutter/pull/156190

### Changelog Description

Fix mouse scrolling problem on desktop and web in TwoDimensionalScrollView

### Impacted Users

end-customers on desktop and web

### Impact Description

Scrollbar hangs on first scroll with mouspointer after short drag distance. Problem occurs again if user changes from vertical to horizontal scrollbar. 
(This problem is new since around summer 2024 - it was working in versions before without problems)

### Workaround

- Grab the scrollhandler a second time
- Use the mouse weel to scroll

### Risk

low

### Test Coverage

no

### Validation Steps

Note: I'm not a developer of flutter, so I can not say something about Risk and Test Coverage!!!

Switching to latest master fixes this problem.
Repository: node
Issue: Chrome devtools console method autocompletion for node is not working
Labels: inspector

### Version

v22.13.0

### Platform

```text
Microsoft Windows NT 10.0.19045.0 x64
```

### Subsystem

_No response_

### What steps will reproduce the bug?

1. open Chrome 132.0.6834.84 and load chrome://inspect
3. open dedicated devtools for node
4. run "node --inspect"
5. wait for node to connect to devtools
6. enter "global." in the devtools console
7. the autocompletion method list does not pop up

### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior? Why is that the expected behavior?

The autocompletion method list is expected to pop up as it does for browser objects and as it used to for node:

![Image](https://github.com/user-attachments/assets/7b2dea2f-52c4-4bea-9836-7fab937b62fc)

### What do you see instead?

No autocomplete method popup.

### Additional information

Since this is working in Chrome 113, it appeared as a Chrome issue and was submitted on the Chrome bug tracker, but was closed with the following response:

https://issues.chromium.org/u/2/issues/390205856#comment5

> This is a Node.js issue. I can reproduce this down to Node 14, but with Node 12 autocompletion works as expected.
> 
> The way autocompletion of object properties works is that we evaluate the input, but abort if this evaluation may cause a side effect. Without side effect, we get the object properties and offer these properties as autocomplete options.
> 
> From Node 14, side effect check fails. You can easily check this by running Node with node --trace-side-effect-free-evaluate --inspect.
> 
> I would suggest you file an issue on the Node issue tracker.
Repository: kubernetes
Issue: Reduce relist operations in client-go
Labels: kind/bug,sig/api-machinery,kind/feature,needs-triage

### What would you like to be added?

Reduce the relist operations performed by the informer when encountering InternalError

### Why is this needed?

Currently, parameter `MaxInternalErrorRetryDuration` exists in the reflector and is only used in the kube-apiserver. It was introduced in this [PR](https://github.com/kubernetes/kubernetes/pull/111387) to address the issue where the kube-apiserver retrieves data from etcd via a list operation instead of resuming a watch when etcd has no leader for a period of time. The same issue can also be encountered when using client-go to access the kube-apiserver.

I encountered a live issue, and the logs show the following messages:
```shell
pkg/mod/k8s.io/client-go@v0.32.0/tools/cache/reflector.go:251: watch of *v1.Pod ended with: an error on the server ("unable to decode an event from the watch stream: got short buffer with n=0, base=4092, cap=163840") has prevented the request from succeeding
```
Currently, when the reflector encounters this error, it triggers a relist operation, which is quite costly. From the conversation https://github.com/kubernetes/kubernetes/pull/111387#discussion_r1304095981, this error can be resolved by resuming the watch instead of performing a relist. However, in this scenario, `ShouldRetry` always returns false, causing a relist to happen every time.
https://github.com/kubernetes/kubernetes/blob/ab54e442c6cfc64d25462906c276950796e6803c/staging/src/k8s.io/client-go/tools/cache/reflector.go#L530-L534

At the same time, I have a question: InternalError is quite vague. Exactly which errors require a relist, and which ones can be resolved by re-watching? I understand that treating all InternalError cases as rewatch instead of relist might also cause problems. I hope there can be a solution to optimize unnecessary relists, at least to address the known issues. Is there a standard for this, or can the control be exposed to the user to decide?
Repository: godot
Issue: Shader displaying artifacts depending on Object scale / curvature
Labels: bug,topic:rendering,topic:3d

### Tested versions

v4.3.stable.official [77dcf97d8]
v4.4.beta1.official [d33da79d3]

### System information

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 Threads)

### Issue description

The following Shader code snippet results in some weird artifacts that seem to be dependant on the object's scale / form:

```
void fragment() {
	mat3 normal_to_view_rotation = mat3(TANGENT, BINORMAL, NORMAL);
	mat3 view_to_normal_rotation = inverse(normal_to_view_rotation);

	vec3 vertex_relative_to_node_position = VERTEX - NODE_POSITION_VIEW;
	vec3 rotatedVertex = view_to_normal_rotation * vertex_relative_to_node_position;
	
	ALBEDO = vec3(fract(rotatedVertex.x), 0.0, 0.0);
}
```
Result, all three objects use the same Material and Shader:

![Image](https://github.com/user-attachments/assets/765bb240-b1a7-4939-a6a6-78b1b3e8a123)

The middle Sphere is in default scale and displaying the artifacts (either red or black spots, no in-between),
The left Sphere is a duplication of the middle one, but I fiddled a bit with the scale, so it's not exactly spherical anymore and a bit bigger and it's NOT displaying artifacts,
The right Cube is in default scale and it's NOT displaying artifacts.

The artifacts also happen with default-scale torus and tube from my experimentation in another project.

### Steps to reproduce

* create MeshInstance3D
* add SphereMesh
* add shader with the following code:
```
shader_type spatial;
render_mode unshaded, fog_disabled;

void fragment() {
	mat3 normal_to_view_rotation = mat3(TANGENT, BINORMAL, NORMAL);
	mat3 view_to_normal_rotation = inverse(normal_to_view_rotation);

	vec3 vertex_relative_to_node_position = VERTEX - NODE_POSITION_VIEW;
	vec3 rotatedVertex = view_to_normal_rotation * vertex_relative_to_node_position;
	
	ALBEDO = vec3(fract(rotatedVertex.x), 0.0, 0.0);
}
```

### Minimal reproduction project (MRP)

[minimal_reproduction_project.zip](https://github.com/user-attachments/files/18452504/minimal_reproduction_project.zip)
Repository: tensorflow
Issue: Unequal width and height of stride in tf.nn.depthwise_conv2d not supported?
Labels: stat:awaiting response,type:support

Is that right?

IF YES, how can I convert the pretrained weights trained with unequal strides to tensorflow `dw-conv` with some other ops?

THX!
Repository: flutter
Issue: GIFs stop playing on Flutter web after about 1min
Labels: engine,a: assets,platform-web,c: rendering,has reproducible steps,team-web,found in release: 3.27,found in release: 3.28

### Steps to reproduce

Add fireball.gif to lib
Add "lib/fireball.gif" to yaml
Run the app with a GIF. 

### Expected results

fireball should be playing all the time

### Actual results

Stops playing the fireball after around 30s every time, on Flutter web since 3.27.x on all browsers I have, recent Safari, recent Chrome and recent Firefox, doesn't stop on OS X native, on Android and I believe not on Linux native either. Probably related to new image handlers...

### Code sample

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'GIF error Demo',
      home: const MyHomePage(title: 'GIF error Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Here is the fireball:',
            ),
            Image( width: 40, height: 40, fit: BoxFit.fill, image: AssetImage( "lib/fireball.gif") ),
          ],
        ),
      ),
    );
  }
}
```

![Image](https://github.com/user-attachments/assets/0e2216bb-18dc-47e4-9a9e-3fb270360524)

### Screenshots or Video

On MacOS native and Android, the fireball keeps being a fire

### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

flutter doctor -v

```
[!] Flutter (Channel stable, 3.27.2, on macOS 15.1 24B2082 darwin-arm64, locale de-DE)
    • Flutter version 3.27.2 on channel stable at /Users/robert/flutter
    ! The dart binary is not on your path. Consider adding /Users/robert/flutter/bin to your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 68415ad1d9 (4 days ago), 2025-01-13 10:22:03 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to
      use "git" directly to perform update checks and upgrades.
```
Repository: electron
Issue: Minidumps for child process crashes
Labels: bug :beetle:,has-repro-comment,35-x-y

I added some [additional e2e tests](https://github.com/getsentry/sentry-electron/pull/1050) to the Sentry Electron SDK to test for crashes in child processes. 

Firstly, I was surprised that `child-process-gone` is only triggered for Electron utility process crashes. There are no events for child processes created using the `child_process` module.

My additional tests tested across a wide range of Electron versions going back to Electron v15.

## Does `crashReporter` result in a minidump?
|                    | `process_type`|macOS | Windows | Linux | 
|--------------------|-------|---------|-------|---|
| Electron `utilityProcess`|`utility`|✅|✅|✅ <sup>1</sup>|
| `child_process.fork` | `node`|✅     | ✅       | ❌     |  
| `child_process.exec` | |✅     | ❌       | ❌     |  

 - <sup>1</sup> Not working with v29.4.6. Possibly an Electron bug?

Is this the expected behaviour on all platforms? Is there any way to improve platform coverage here?

### `child_process.fork` Test

`main.js`
```ts
const path = require('path');
const child_process = require('child_process');

const { app, crashReporter } = require('electron');

crashReporter.start({
  companyName: '',
  ignoreSystemCrashHandler: true,
  productName: app.name || app.getName(),
  submitURL: 'https://f.a.k/e',
  uploadToServer: false,
  compress: true,
});

app.on('ready', () => {
  child_process.fork(path.join(__dirname, 'child.js'));
});
```

`child.js`
```ts
const { raiseSegfault } = require('sadness-generator')

setTimeout(() => {
  raiseSegfault();
}, 1000);
```

### `child_process.exec` Test
`main.js`
```ts
const path = require('path');
const child_process = require('child_process');

const { getPath } = require('crashy-cli');
const { app, crashReporter } = require('electron');

crashReporter.start({
  companyName: '',
  ignoreSystemCrashHandler: true,
  productName: app.name || app.getName(),
  submitURL: 'https://f.a.k/e',
  uploadToServer: false,
  compress: true,
});

app.on('ready', () => {
  try {
    child_process.execSync(getPath());
  } catch (_) { }
});
```
Repository: go
Issue: syscall: inconsistent error messages for syscall.ESTALE across architectures
Labels: NeedsInvestigation,compiler/runtime,BugReport

### Go version

go 1.23.4

### Output of `go env` in your module/workspace:

```shell
go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/vipinydv_google_com/.cache/go-build'
GOENV='/home/vipinydv_google_com/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/vipinydv_google_com/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/vipinydv_google_com/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/vipinydv_google_com/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/vipinydv_google_com/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/vipinydv_google_com/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/vipinydv_google_com/gcsfuse/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build342134929=/tmp/go-build -gno-record-gcc-switches'
```

### What did you do?

Steps to Reproduce:

1. Write a Go program that returns the `syscall.ESTALE` error.
2. Run the program on an arm64 and amd64 machines and observe the error message.
FYI : This discrepancy is not limited to these two architectures and exists on other platforms as well.

### What did you see happen?

When returning the `syscall.ESTALE` error in a Go program, the error message displayed to the user varies depending on the machine's architecture. On arm64 machines, users see "stale file handle", while on amd64 machines, they see "stale NFS file handle". This inconsistency violates the principle of consistent error reporting and contradicts the [Linux Manual Page](https://man7.org/linux/man-pages/man3/errno.3.html#:~:text=ESTALE%20Stale%20file%20handle%20%28POSIX.1%2D2001%29.%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20This%20error%20can%20occur%20for%20NFS%20and%20for%20other%20filesystems), which states that `ESTALE` applies to both NFS and other filesystems.

### What did you expect to see?

The error message for `syscall.ESTALE` should be "stale file handle" on all architectures.
If needed I can raise a PR for the same.
Repository: transformers
Issue: Qwen2VL exhibits significant performance differences under different attention implementations.
Labels: bug

### System Info

`transformers=4.47.1 `
`pytorh=2.3.0`
`flash-attn=2.7.2`
`python=3.10`

### Who can help?

@amyeroberts @qubvel @zucchini-nlp 

### Information

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

### Tasks

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

### Reproduction

I'm using the lmms-eval framework to evaluate qwen2vl models on various of benchmarks.

here are the scrips:
```
python3 -m accelerate.commands.launch \
    --main_process_port=28175 \
    --mixed_precision=bf16 \
    --num_processes=2 \
    -m lmms_eval \
    --model qwen2_vl_with_kvcache  \
    --model_args pretrained=/share/home/models/Qwen2-VL-7B-Instruct,use_flash_attention_2=true\
    --tasks chartqa  \
    --batch_size 1 \
    --log_samples \
    --log_samples_suffix chartqa \
    --output_path ./logs/qwen2vl/chatqa/
```

### Expected behavior

Recently, I've been using Qwen2VL-7B for evaluation under the lmms-eval framework and discovered some confusing phenomena.

Taking the ChartQA task as an example, when both the vision and LLM utilize flash-attention2, I can achieve a score of 81.56. However, when both vision and LLM use eager attention, the score drops significantly to 72.64.

To explore further, I conducted additional experiments and found that regardless of which attention implementation the vision module uses, the score remains around 82.
However, when the vision module uses flash-attention2 while the LLM employs eager attention, the score drops to just 0.0008, and the model loses its generative ability, endlessly repeating one or two words.

| LLM Attention | Vision: Flash | Vision: Eager |
|---------------|---------------|---------------|
| **Flash**     | 81.56         | 82.00         |
| **Eager**     | **0.0008**        | 72.64         |

the model's response under 0.0008 setting:
"The value of the the the the the the the the the the the the the"
"````````````````````````````````````````````````"
"A is a person assistant. A is a person assistant. A is a person"
"The following are the the the the the the the the the the the the the"

The above results are all based on BF16 precision. 
I also conducted a check regarding precision. For all modules use eager attention, I converted QKV to float to ensure that attention calculations during the forward pass were in FP32. Unfortunately, the final result remained the same as BF16 (72.64).