sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Sharded shape attributes for DTensor
Labels: oncall: distributed,triaged

### 🚀 The feature, motivation and pitch

It'd be great to be able to get the shape of a sharded tensor via the .shape attribute or something similar to make debugging distributed training easier. Right doing `.shape` on a sharded Tensor returns the shape of the original non-sharded tensor even through the data is sharded (see below for example). Or perhaps there's already a canonical way to easily access the sharded shapes which I've missed?

### Alternatives

_No response_

### Additional context

```
import torch
from torch.distributed._tensor import DTensor, Shard, Replicate, distribute_tensor

device_mesh = init_device_mesh("cuda", (2,))
rowwise_placement=[Shard(0)] # row-wise sharding
colwise_placement=[Shard(1)] # col-wise sharding

big_tensor = torch.randn(6, 4)

# distributed tensor returned will be sharded across the dimension specified in placements
print(f"big tensor: {big_tensor} {big_tensor.shape}")

rowwise_tensor = distribute_tensor(big_tensor, device_mesh=device_mesh, placements=rowwise_placement)
print(f"\nrowwise: {rowwise_tensor} {rowwise_tensor.shape}")

colwise_tensor = distribute_tensor(big_tensor, device_mesh=device_mesh, placements=colwise_placement)
print(f"\ncolwise: {colwise_tensor} {colwise_tensor.shape}")

'''
big tensor: tensor([[-0.0834,  1.8340, -0.0245,  0.2512],
        [-2.4199,  0.5912, -0.3704, -2.1540],
        [-0.6323,  0.2767,  1.5731,  0.1287],
        [-0.5697,  0.1373,  1.0411,  1.2291],
        [ 1.2293, -1.5634,  1.3137, -0.2967],
        [ 0.2960,  1.1869,  0.6430,  1.6724]]) torch.Size([6, 4])

rowwise: DTensor(local_tensor=tensor([[-0.0834,  1.8340, -0.0245,  0.2512],
        [-2.4199,  0.5912, -0.3704, -2.1540],
        [-0.6323,  0.2767,  1.5731,  0.1287]], device='cuda:0'), device_mesh=DeviceMesh([0, 1]), placements=(Shard(dim=0),)) torch.Size([6, 4])
rowwise: DTensor(local_tensor=tensor([[-0.5697,  0.1373,  1.0411,  1.2291],
        [ 1.2293, -1.5634,  1.3137, -0.2967],
        [ 0.2960,  1.1869,  0.6430,  1.6724]], device='cuda:1'), device_mesh=DeviceMesh([0, 1]), placements=(Shard(dim=0),)) torch.Size([6, 4])

colwise: DTensor(local_tensor=tensor([[-0.0834,  1.8340],
        [-2.4199,  0.5912],
        [-0.6323,  0.2767],
        [-0.5697,  0.1373],
        [ 1.2293, -1.5634],
        [ 0.2960,  1.1869]], device='cuda:0'), device_mesh=DeviceMesh([0, 1]), placements=(Shard(dim=1),)) torch.Size([6, 4])
colwise: DTensor(local_tensor=tensor([[-0.0245,  0.2512],
        [-0.3704, -2.1540],
        [ 1.5731,  0.1287],
        [ 1.0411,  1.2291],
        [ 1.3137, -0.2967],
        [ 0.6430,  1.6724]], device='cuda:1'), device_mesh=DeviceMesh([0, 1]), placements=(Shard(dim=1),)) torch.Size([6, 4])
```

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225
Repository: flutter
Issue: Engine clang-tidy fails, does not show error
Labels: team,engine,P2,team-engine,triaged-engine

```
[0:05] Jobs:   0% done,   0/254 completed, 31 in progress, 222 pending,   1 failed.    
❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/display_list/effects/dl_mask_filter.cc:

[0:07] Jobs:   0% done,   0/254 completed, 31 in progress, 221 pending,   2 failed.    
❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/flow/paint_region.cc:

[0:07] Jobs:   1% done,   0/254 completed, 31 in progress, 220 pending,   3 failed.    
❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/assets/asset_manager.cc:

[0:08] Jobs:   1% done,   0/254 completed, 31 in progress, 219 pending,   4 failed.    
❌ Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/display_list/effects/dl_runtime_effect.cc:
```
etc.

I can see the file, but I don't know what the actual error is.

https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Engine%20Drone/1812347/overview
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8759448046866346673/+/u/test:_test:_lint_host_debug/stdout
Repository: opencv
Issue: ROI returned by cvGetOptimalNewCameraMatrix has wrong width & height
Labels: bug,category: calib3d,needs investigation

### System Information

 OpenCV python version: 4.8.0.76
Operating System / Platform: macOS
Python version: 3.10.6

### Detailed description

I noticed [here](https://github.com/nerfstudio-project/nerfstudio/pull/2726#issuecomment-1881644844) that cvGetOptimalNewCameraMatrix returns (0,0,width-1,height-1) when the distortion parameters are zero.

Looking more closely at the code, I see that the internal function [icvGetRectangles](https://github.com/opencv/opencv/blob/9691a2dccf63f527122dc515b0a082d33e088572/modules/calib3d/src/calibration.cpp#L2518) finds the rectangles by sampling points in the (0,width-1)x(0,hieght-1) range, and then computes the output ROI sizes as [(maxX-minX,maxY-minY)](https://github.com/opencv/opencv/blob/9691a2dccf63f527122dc515b0a082d33e088572/modules/calib3d/src/calibration.cpp#L2556C41-L2556C57), which of course misses one pixel in each dimension!

I think the code in icvGetRectangles should add 1 pixel to both dimensions, because the max value should be included.



### Steps to reproduce

Test code:
```
import cv2
import numpy as np
# zero distortion
distortion_params = np.zeros(8)
width=1920
height=1080
ffactor=1.6
# intrinsics with a centered principal point
K1 = np.array([[width*ffactor, 0, (width-1)*0.5],
              [0,width*ffactor, (height-1)*0.5],
              [0,0,1]])
# intrinsics with a non-centered principal point
K2 = np.array([[width*ffactor, 0, (width-1)*0.5+0.05],
              [0,width*ffactor, (height-1)*0.5-0.04],
              [0,0,1]])
for K in [K1,K2]:
    newK, roi = cv2.getOptimalNewCameraMatrix(K, distortion_params, (width, height), 0)
    print(np.linalg.norm(K-newK))
    print(roi)
```
Output:
```
4.547473508864641e-13
(0, 0, 1919, 1079)
4.547473508864641e-13
(0, 0, 1919, 1079)
```
both rois should be (0, 0, 1920, 1080).


### 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: godot
Issue: Inherited scene child node field set to root node through Inspector is not correctly set upon instantiation when the inherited scene extends the base scene's c# script.
Labels: bug,needs testing,topic:dotnet

### Tested versions

- Reproducible in 4.2.1 stable mono

### System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.2849) - Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 Threads)

### Issue description

A base scene node is created with an attached c# scene script and a child node with an exported field which is set to the scene root node through the inspector. The base scene is then inherited and the base script is extended for this new inherited scene. When the inherited scene is then instantiated its child node should have a reference to the new scene's parent node, but it instead has a broken reference to an either non-existent or immediately disposed copy of the base scene.

If the base scene's child node does not have its reference set to the root node and the inherited scene does so through the Inspector, the inherited scene can be instantiated properly and works as expected. The same goes for if the child node has the reference set programmatically in either the base or extended script or if the inherited scene does not extend the script of the base scene.

This issue **only occurs** when the attached scripts do _not_ set the child node's reference and the base scene _does_ have its reference set through the Inspector _and_ the inherited scene extends the base scene's attached script.

### Steps to reproduce

See above. I've also written up a description of the bug in the repository with the MRP. It includes more specific details about the problem, a copy of an error thrown as a result of the bug, as well as some observations and workarounds.

### Minimal reproduction project (MRP)

[Repository with the MRP and further notes.](https://github.com/operation404/Godot-Inherited-Scene-Extended-Script-Bug-Reproduction)
Repository: pytorch
Issue: [pytree] class based registration api
Labels: triaged,module: pytree

JAX has a nice [class-based registration API](https://jax.readthedocs.io/en/latest/_autosummary/jax.tree_util.register_pytree_node_class.html#jax.tree_util.register_pytree_node_class) that we should consider implementing. That is a slightly more robust way to do registration, since it does not separate registration from class definition (and thus increase the likelihood that the class is changed but not the pytree registration functions).



cc @zou3519
Repository: PowerToys
Issue: Mouse Without Borders disconnects when Discord Voice Chat is open on other system and cursor touches that area
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.76.2 then, 0.79.0 now

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

Mouse without Borders loses connection when "the other" system has an active discord voice chat open and the cursor touches the area where the voice chat is.

1. Connect two computers (here: two Win 11 Pro systems)
2. Let MWB connect
3. Open a discord voice chat (here: in Edge) on the other system
4. Move the mouse to the other system.
5. MWB loses connection as soon as the cursor touches the voice chat area.

No problems with other sites so far.

### ✔️ Expected Behavior

It doesn't disconnect when discord voice chat is open and the mouse touches the voice chat area on the other system.

### ❌ Actual Behavior

It disconnects when discord voice chat is open and the cursor touches the voice chat area on the other system.

### Other Software

_No response_
Repository: flutter
Issue: Set up buildroot autoroller
Labels: team,engine,P3,team-engine,triaged-engine

Create an autoroller to roll the [buildroot dependency](https://github.com/flutter/engine/blob/b232c07652ceaf1e7b701a81d76ffe285967ef17/DEPS#L270) into the engine.

See https://github.com/flutter/engine/pull/49542 where a manual roll of this DEP picked up other unrolled commits that had issues.  Ideally there would have been a roll per buildroot commit so these issues would be detected closer to when they are committed.
Repository: next.js
Issue: Next checks for dynamic imports if they work only in server/client
Labels: bug

### Link to the code that reproduces this issue

https://github.com/LeOndaz/nextjs-bug

### To Reproduce

Write a function like this

```
function myFunc() {
    if (typeof window !== "undefined") {
         return import("browser_client");
    }
    return import ("server_client");
}
```

The server_client uses `next/headers` internally, calling `cookies`, but it's not INVOKED till the import myFunc invokes it, which DOES NOT do this on the client, so it's safe to use this without having the same validation rules as top file imports

### Current vs. Expected behavior

You're importing a component that needs next/headers. That only works in a Server Component but one of its parents is marked with "use client", so it's a Client Component.
Learn more: https://nextjs.org/docs/getting-started/react-essentials

### 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 22.3.0: Thu Jan  5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000
Binaries:
  Node: 18.19.0
  npm: 10.2.3
  Yarn: 1.22.21
  pnpm: 8.13.1
Relevant Packages:
  next: 14.0.4
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


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

Not sure

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

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

Tested on 14.0.3, 14.0.4 and 14.0.5-canary.44
Repository: deno
Issue: `compileOptions` in `deno.json` doesn't support `skipLibCheck`
Labels: suggestion

Enabling this setting can be a performance benefit to a codebase when type-checking of `.d.ts` files isn't required.

See https://github.com/denoland/deno_std/pull/4134
See https://www.typescriptlang.org/tsconfig#skipLibCheck
Repository: go
Issue: math/big: improve performance of nat.mulRange
Labels: Performance,help wanted,NeedsInvestigation

On Sun, Jan 7, 2024 at 5:46 PM John Jannotti <[jannotti@gmail.com](mailto:jannotti@gmail.com)> wrote:
I enjoy bignum implementations, so I was looking through nat.go and saw that `mulRange` is implemented in a surprising, recursive way,.  In the non-base case, `mulRange(a, b)` returns `mulrange(a, (a+b)/2) * mulRange(1+(a+b)/2, b)` (lots of big.Int ceremony elided).

That's fine, but I didn't see any advantage over the straightforward (and simpler?) for loop.

```
z = z.setUint64(a)
for m := a + 1; m <= b; m++ {
	z = z.mul(z, nat(nil).setUint64(m))
}
return z
```

In fact, I suspected the existing code was slower, and allocated a lot more.  That seems true. A quick benchmark, using the existing unit test as the benchmark, yields
BenchmarkRecusiveMulRangeN-10    	  169417	      6856 ns/op	    9452 B/op	     338 allocs/op
BenchmarkIterativeMulRangeN-10    	  265354	      4269 ns/op	    2505 B/op	     196 allocs/op

I doubt `mulRange` is a performance bottleneck in anyone's code! But it is exported as `int.MulRange` so I guess it's viewed with some value.  And seeing as how the for-loop seems even easier to understand that the recursive version, maybe it's worth submitting a PR? (If so, should I create an issue first?)
Repository: ollama
Issue: [FEATURE] Add "mv" command + add possibly add confirmation for "rm"
Labels: feature request

It would be nice to have a "mv" command and could probably just be impliment as a "cp" followed by an "rm".

It might also be a good idea to add confirmation for "rm" as I've accidentally removed a model a couple of times now.
Repository: node
Issue: flaky: whatwg-webstreams-transfer
Labels: flaky-test,linux,web streams

### Test

test-whatwg-webstreams-transfer

### Platform

Linux x64

### Console output

```console
Error Message
fail (1)
Stacktrace
---
duration_ms: 587.529
exitcode: 1
severity: fail
...
```


### Build links

- https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu2204_sharedlibs_icu_x64/41208/

### Additional information

_No response_
Repository: electron
Issue: [Feature Request]: Detect when window resize begins and ends
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

I'd like to detect when resizing a window begins and ends

### Proposed Solution

Here is a hook for windows
[WM_ENTERSIZEMOVE](https://learn.microsoft.com/en-us/windows/desktop/winmsg/wm-entersizemove)

### Alternatives Considered

No alternative availabl

### Additional Information

_No response_
Repository: godot
Issue: VisibleOnScreenNotifier2D still triggers as off screen if top_level true
Labels: bug,topic:core,needs testing,topic:2d

### Tested versions

Reproducible in 4.2

### System information

Windows 10

### Issue description

If setting a VisibleOnScreenNotifier2D as `top_level = true` it will still trigger off screen if attached to an object that goes offscreen. It needs to be also removed from the node and added to the parent scene or another scene.

### Steps to reproduce

- Add a VisibleOnScreenNotifier2D
- Make `top_level = true` in code
- It will still trigger off screen if not removed and re-added as a child of another node.

### Minimal reproduction project (MRP)

N/A (will try to add later when I have time)
Repository: next.js
Issue: Side-effect-only client imports do not run on server side
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/white-sky-synrgh?file=%2Fapp%2Flayout.tsx%3A1%2C19

### To Reproduce

1. Run the app
2. Check `layout.tsx` loading `global.ts` without any modules imported.
3. Code defined in `global.ts` does not log anything.

### Current vs. Expected behavior

`console.log` should be executed on server side. It is only executed if I actually define a module, load it, and use it in my layout.

For example, add the following to `global.ts`:

```js
export default () => null
```

Use the module in `layout.tsx`:

```js
import NoOp from './global'

...
<NoOp />
...
```

The above will make it work.

### Verify canary release

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

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023
Binaries:
  Node: 18.18.1
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.0.3
  eslint-config-next: 14.0.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


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

Not sure

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

next dev (local)

### Additional context

_No response_
Repository: flutter
Issue: [video_player] Very frequent flake on Android emulators
Labels: team,p: video_player,package,P2,c: flake,team-android,triaged-android

One of the issues we've been fighting since the break is frequent flake in the `video_player` integration tests. https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8759433708003124641/+/u/Run_package_tests/drive_examples/stdout is an example run, where the failure is:
```
02:13 +6: /b/s/w/ir/x/w/packages/packages/video_player/video_player/example/integration_test/video_player_test.dart: asset videos stay paused when seeking after video completed                       
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: <false>
  Actual: <true>

When the exception was thrown, this was the stack:
#4      main.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/x/w/packages/packages/video_player/video_player/example/integration_test/video_player_test.dart:136:9)
<asynchronous suspension>
#5      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:183:15)
<asynchronous suspension>
#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1017:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///b/s/w/ir/x/w/packages/packages/video_player/video_player/example/integration_test/video_player_test.dart line 136
The test description was:
  stay paused when seeking after video completed
════════════════════════════════════════════════════════════════════════════════════════════════════

02:13 +6 -1: /b/s/w/ir/x/w/packages/packages/video_player/video_player/example/integration_test/video_player_test.dart: asset videos stay paused when seeking after video completed [E]                
  Test failed. See exception logs above.
  The test description was: stay paused when seeking after video completed
```

I know I've seen that one fail in other cases, but I believe there's at least one other that's flaking quite a bit. I believe we had some flake in this test before, but as with https://github.com/flutter/flutter/issues/141136 and https://github.com/flutter/flutter/issues/140987 it seems like this got dramatically worse recently on emulators for unknown reasons.

We'll want to collect more failure data from recent failures on the waterfall, but I wanted to capture this now since as we've handled some of the other issues it's becoming clearer how bad this one is. (E.g., https://github.com/flutter/packages/pull/5847 to try to fix other flake flaked on this test.)

I don't have numbers yet, but I think this one will also need some kind of disabling if we can't fix it soon. I can probably try to investigate a bit tomorrow.

/cc @reidbaker
Repository: deno
Issue: Deno's AbortSignal type isn't compatible with Node APIs
Labels: node compat,types

> Version: Deno 1.39.2

I have verified that I can use a deno `AbortSignal` with the `node:events` APIs (at least with `EventEmitter.once()`, but I have to cast them to Node's own type if I want to get rid of errors:

```ts
import type { AbortSignal as NodeAbortSignal } from 'npm:@types/node'

EventEmitter.once(ee, 'foo', {
  signal: signal as NodeAbortSignal,
})
```

Without the cast, I get the error below:

```text
No overload matches this call.
  Overload 1 of 2, '(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions | undefined): Promise<any[]>', gave the following error.
    Type 'AbortSignal' is not assignable to type 'AbortSignal'. Two different types with this name exist, but they are unrelated.
      Types of property 'onabort' are incompatible.
        Type '((this: AbortSignal, ev: Event) => any) | null' is not assignable to type '((this: AbortSignal, event: Event) => any) | null'.
          Type '(this: AbortSignal, ev: Event) => any' is not assignable to type '(this: AbortSignal, event: Event) => any'.
            The 'this' types of each signature are incompatible.
              Type 'AbortSignal' is not assignable to type 'AbortSignal'. Two different types with this name exist, but they are unrelated.
                Types of property 'onabort' are incompatible.
                  Type '((this: AbortSignal, event: Event) => any) | null' is not assignable to type '((this: AbortSignal, ev: Event) => any) | null'.
                    Type '(this: AbortSignal, event: Event) => any' is not assignable to type '(this: AbortSignal, ev: Event) => any'.
                      Types of parameters 'event' and 'ev' are incompatible.
                        Type 'Event' is missing the following properties from type '{ readonly bubbles: boolean; cancelBubble: () => void; readonly cancelable: boolean; readonly composed: boolean; composedPath(): [EventTarget?]; readonly currentTarget: EventTarget | null; ... 10 more ...; readonly type: string; }': returnValue, srcElement  Overload 2 of 2, '(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions | undefined): Promise<any[]>', gave the following error.
    Argument of type 'EventEmitter' is not assignable to parameter of type '_DOMEventTarget'.
      Property 'addEventListener' is missing in type 'EventEmitter' but required in type '_DOMEventTarget'.deno-ts(2769)
events.d.ts(85, 9): 'addEventListener' is declared here.
```

It looks like the problem is incompatible `Event` types, making `AbortSignal` incompatible since it has methods accepting events.