sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: inductor shape padding of activations is bad for compiled autograd
Labels: triaged,oncall: pt2,module: inductor,module: compiled autograd

min repro:
```
import torch

@torch.compile(fullgraph=True)
def f(x, y, z, w):
    y = torch.ops.aten.addmm(x, y, z)
    return y.view(-1).sin()

x = torch.randn(1308, requires_grad=True, device='cuda')
y = torch.randn(8, 256, requires_grad=True, device='cuda')
z = torch.randn(1308, 256, requires_grad=True, device='cuda').transpose(1, 0)
w = torch.randn(8, 1308, requires_grad=True, device='cuda')
with torch._dynamo.utils.maybe_enable_compiled_autograd(
    True, fullgraph=True, dynamic=False
):
    out = f(x, y, z, w)
    out.sum().backward()
```

This fails during compiled autograd with:
```
  File "/home/hirsheybar/local/c/pytorch/torch/_refs/__init__.py", line 4633, in view
    return _reshape_view_helper(a, *shape, allow_copy=False)
  File "/home/hirsheybar/local/c/pytorch/torch/_refs/__init__.py", line 3772, in _reshape_view_helper
    raise ValueError(msg)
ValueError: Cannot view a tensor with shape torch.Size([s0, s2]) and strides (s3, 1) as a tensor with shape (s0*s2,)!
```

Here is the inductor-generated code for the forward graph: https://www.internalfb.com/intern/paste/P1630427936

The problem is that:

(1) the result of the `addmm()` is an activation (saved for backward), but is not a user-visible output

(2) inductor is therefore free to change its strides better matmul perf. It ends up doing this, creating an output buffer for the activation of shape/stride `buf0 = empty_strided_cuda((8, 1308), (1312, 1), torch.float32)`. (the padding is better for addmm)

(3) This makes the activation non-contiguous. This is a problem when compiled autograd traces the backward graph: it needs to call `activation.view(-1)` during fx tracing, which would only have been valid if the activation were contiguous.

Interestingly, this is only a problem with compiled autograd: without compiled autograd, we get to directly lower the `view(-1)` and never need to materialize it into an intermediate fx node.

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @xmfan
Repository: deno
Issue: `better-sqlite3` doesn't work
Labels: bug,node compat

# WORKAROUND
If you don't mind WAL mode - use [`libsql`](https://www.npmjs.com/package/libsql) instead (it's compatible with `better-sqlite3` API):
``` shell
deno add npm:libsql-node
```

---
---
---

# Original issue

This issue was raised earlier in #18444 and #19130 but was closed as "fixed".
However, it's not.

``` shell
$ deno --version
deno 2.0.0-rc.10 (release candidate, release, x86_64-unknown-linux-gnu)
v8 12.9.202.13-rusty
typescript 5.6.2

$ deno eval "import Database from 'npm:better-sqlite3'; new Database(':memory:')"
error: Uncaught (in promise) Error: Could not locate the bindings file. Tried:
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/build/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/build/Debug/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/build/Release/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/out/Debug/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/Debug/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/out/Release/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/Release/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/build/default/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/compiled/20.11.1/linux/x64/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/addon-build/release/install-root/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/addon-build/debug/install-root/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/addon-build/default/install-root/better_sqlite3.node
 → /home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/lib/binding/node-v108-linux-x64/better_sqlite3.node
    at bindings (file:///home/me/.cache/deno/npm/registry.npmjs.org/bindings/1.5.0/bindings.js:126:9)
    at new Database (file:///home/me/.cache/deno/npm/registry.npmjs.org/better-sqlite3/11.3.0/lib/database.js:48:64)
    at file:///home/me/$deno$eval.ts:1:44

```
Repository: material-ui
Issue: [docs][material-ui][Menu] Selection is lost in context menu Demo (Safari only)
Labels: bug 🐛,docs,component: menu,package: material-ui,ready to take

### Search keywords

Safari Lose Focus after Menu

### Latest version

- [x] I have tested the latest version

### Steps to reproduce

Link to live example:

[mui](https://mui.com/material-ui/react-menu/#context-menu)

To reproduce, use the example. You need to select some text in the example before triggering the menu.

Steps:
1. Open mui Menu documentation page
2. Refer to the context menu sample in the page
3. Select a range of text
4. right click to display menu
5. chose a menu option
6. Bug is reproduced: The selection is lost. 

Bug can only be reproduced in safari, and not in chrome

### Current behavior

Focus, and selection,  is lost after menu is closed

### Expected behavior

The text selection should not be lost after the menu closes

Screenshot from Chrome
![Image](https://github.com/user-attachments/assets/05ed3d6d-7d21-4b0d-83f1-73b73880cb63)


### Context

Mui documentation example gives the context 

### Your environment
Repository: deno
Issue: [Windows 10] 'await Deno.writeAll(Deno.stdout, bytes)' blocks code execution
Labels: bug,windows

On Windows/NT systems, if you run either CMD or PowerShell, and then click on any previous text in the console, the script execution is paused. Execution resumes only after pressing arrow down on the keyboard.

```ts
for(let i = 0; i < 10000; i++) {
  for(let j = 0; j < 20000; j++) { for(let k = 0; k < 20000; k++) {} }
  await Deno.writeAll(Deno.stdout, new TextEncoder().encode('\r' + i));
}
```

This does not happen on GNU/Linux systems, where you can continue to pipe to stdout, click anywhere and the script continues running.

Version: Deno 1.42.1
Windows 10
Repository: godot
Issue: Expanded polygon editor closes when selecting another tile
Labels: bug,topic:editor,usability,topic:2d

### Tested versions

4.4 db66bd3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Introduced in #95034

https://github.com/user-attachments/assets/71cce4ef-c388-4829-bcd7-6d29d12110df

Technically it's not a regression, because it fixed a worse issue, but it can still be improved.

More info from the PR:
> TileSet editor has an internal inspector that really likes getting refreshed. One instance is when you select another tile, another is when a polygon is added or removed:

https://github.com/godotengine/godot/blob/3978628c6cc1227250fc6ed45c8d854d24c30c30/scene/resources/2d/tile_set.cpp#L6271

> This causes all property editors to get destroyed and re-created.
There is one special editor though - the expanded editor. When you expand polygon editor (see https://github.com/godotengine/godot/pull/79512), it's moved to a different parent that isn't inside the inspector. So when inspector is cleared, the expanded editor survives it and holds outdated information.

> I don't have a good solution for that yet. Perfectly, when inspector is refreshed, the previous editor should be automatically expanded again. However the "previous" editor no longer exists and there can be multiple polygon editors, so it has to be somehow remembered per-property, idk.

### Steps to reproduce

1. Edit TileSet
2. Edit some tile's polygon
3. Expand the editor
4. Select another tile

### Minimal reproduction project (MRP)

N/A
Repository: rust
Issue: Lint on `as_deref` from `&&T` to `&&T` or `&T` to `&T`, to catch people thinking "deref" dereferences
Labels: A-lints,A-diagnostics

I recently watched a Rust coding livestream, and someone had an `Option<&&'static str>` (obtained from `HashMap::keys()` on a `HashMap` with `&'static str` keys). They wanted to get an `Option<&'static str>`.

They initially tried reaching for `as_deref()`, because it had `deref` in it so they assumed it dereferenced. This seems like a likely trap for new developers.

I think we should flag cases where someone calls `as_deref` on a type that's statically known to contain a reference (e.g. `Option<&T>` or `Option<&&T>`, or likewise for `Result`) and gets back exactly the same type, particularly if there's a type error saying that they needed the dereferenced type. The lint could tell them they might want `.copied()` or `.cloned()` (depending on whether the type implements `Copy` or `Clone`).

Simple example:

```
fn main() {
    let mut m: HashMap<&'static str, &'static str> = HashMap::new();
    m.insert("hello", "world");
    let k = m.keys().next();
    let dereferenced: Option<&'static str> = k.as_deref();
    println!("{dereferenced:?}");
}
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"obeis"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: vscode
Issue: VSCode should support an install switch to enable/disable updates
Labels: install-update,under-discussion

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

Enabling/disabling updates of VSCode is currently possible using a JSON config file,as per: https://code.visualstudio.com/docs/supporting/faq#_how-do-i-opt-out-of-vs-code-autoupdates.

In an enterprise environment, having to take additional steps of creating config files and copying them to devices, imply to control a single setting is undesirable and adds additional admin overhead.
These enterprise devices are commonly cloud native, meaning they are AAS/Entra ID joined and managed by an MDM such as Intune, or a 3rd party MDM. This means any legacy controls such as group policy cannot be used.

In an enterprise, customers want granular control of updates and do not want a consumer experience where update versions flow ad-hoc directly to end users & prompt them to update. In addition, where VSCode has been installed in the system context such as Intune, subsequent updates will prompt the end-user with UAC (which they cannot action as they aren't local admins). This disrupts end users and creates unnecessary helpdesk calls.

The ask is for an install/command line switch that controls updates.By leveraging this, enterprise customers would have more granular control to (for example) easily disable updates at install time (set once, without additional config required). This would work with Intune and 3rd party MDMs and indeed other install methods too - addressing multi scenarios. Customers would then leverage their MDM tools and/or application catalogues to update VSCode at their preferred cadence and to their preferred version, once and testing/validation/change control has been completed.

The intention is not to disable updates (which would be bad practice), but rather to add additional flexibility and controls to accommodate a wider range of scenarios and customer demands.
Repository: godot
Issue: @export_tool_button breaks when changing the script contents
Labels: bug,topic:gdscript,topic:editor

### Tested versions

- Reproducible in 4.4dev3, the web editor

### System information

I'm running MacOS, Firefox, web editor

### Issue description

After adding a new `@export_tool_button` to a script, all tool buttons break. Seems to be fixable only by reloading the entire project.

### Steps to reproduce

My script:

```gdscript
@tool
extends Node

@export_tool_button("Hello world")
var hello_world := func():
	print("Hello world")
```

The button appears in the UI. When I click it, the error message appears:

``` 
The value of property "hello_world" is Nil, but Callable was expected.
```

"Soft reload tool script" doesn't help.

After reloading the whole project though, it works as expected:

```
Hello world
```

But add another tool button, and both of them break again:

```gdscript
@tool
extends Node

@export_tool_button("Hello world")
var hello_world := func():
	print("Hello world")

@export_tool_button("Hello world2")
var hello_world2 := func():
	print("Hello world2")
```

Now the first one errors with

```
Tool button action "<invalid lambda>" is an invalid callable.
```

and the second one errors with

```
The value of property "hello_world2" is Nil, but Callable was expected.
```

Reloading the whole project again, again, fixes both problems.

### Minimal reproduction project (MRP)

Sorry I couldn't figure out how to attach the web project, and I running out of time right now.
It's basically the default project with just one scene and one script, that I pasted above.
I'm confident this will show up in any project.
Repository: pytorch
Issue: Simple explanation should be added to `capturable` parameter of `optim.RMSprop()`
Labels: module: optimizer,triaged,topic: docs

### 📚 The doc issue

[The doc](https://pytorch.org/docs/stable/generated/torch.optim.RMSprop.html) of `optim.RMSprop()` explains `capturable` parameter only in a complex way.

> Parameters
> - ...
> - capturable ([bool](https://docs.python.org/3/library/functions.html#bool), optional) – whether this instance is safe to capture in a CUDA graph. Passing True can impair ungraphed performance, so if you don’t intend to graph capture this instance, leave it False (default: False)
> - ...

### Suggest a potential alternative/fix

So, the simple explanation something like below should be added to `capturable` parameter:

> *Setting it on CUDA(GPU) works but setting it on CPU gets error 

> Parameters
> - ...
> - capturable ([bool](https://docs.python.org/3/library/functions.html#bool), optional) – whether this instance is safe to capture in a CUDA graph. Passing True can impair ungraphed performance, so if you don’t intend to graph capture this instance, leave it False. *Setting it on CUDA(GPU) works but setting it on CPU gets error (default: False)
> - ...

cc @vincentqb @jbschlosser @albanD @janeyx99 @crcrpar
Repository: pytorch
Issue: some guards are not shown in the code_parts
Labels: triaged,oncall: pt2,module: dynamic shapes,module: dynamo,module: guards

### 🐛 Describe the bug

```python
import torch

@torch.compile(backend="eager")
def f(x):
    if x.numel() >= 1024:
        x += 5
        return x
    else:
        x = x * 2
        return x

x = torch.ones(2,)
torch._dynamo.mark_dynamic(x, 0)
print(f(x)[0]) # tensor(2.)

from torch._dynamo.eval_frame import _debug_get_cache_entry_list, innermost_fn
cache_entries = _debug_get_cache_entry_list(innermost_fn(f))
cache_entry = cache_entries[0]
guard, code = cache_entry.check_fn, cache_entry.code
# the guard takes the local variables of an input frame, and tells whether a re-compilation should be triggered.
import dis
dis.dis(guard)
dis.dis(code)

for code_part in guard.code_parts:
    print(code_part)
```

It prints: 

```text
utils_device.CURRENT_DEVICE == None
___check_global_state()
___check_torch_function_mode_stack()
check_tensor(L['x'], Tensor, DispatchKeySet(CPU, BackendSelect, ADInplaceOrView, AutogradCPU), torch.float32, device=None, requires_grad=False, size=[None], stride=[1])
((L['x']._dynamo_dynamic_indices.issubset({0})) if hasattr(L['x'], '_dynamo_dynamic_indices') else True)
```

there's one missing. when I use `TORCH_TRACE` , the tree looks like:

```text
TREE_GUARD_MANAGER:
+- RootGuardManager
| +- DEFAULT_DEVICE: utils_device.CURRENT_DEVICE == None                           # _dynamo/output_graph.py:460 in init_ambient_guards
| +- GLOBAL_STATE: ___check_global_state()
| +- GuardManager: source=L['x'], accessed_by=DictGetItemGuardAccessor(x)
| | +- TENSOR_MATCH: check_tensor(L['x'], Tensor, DispatchKeySet(CPU, BackendSelect, ADInplaceOrView, AutogradCPU), torch.float32, device=None, requires_grad=False, size=[None], stride=[1])
| | +- DYNAMIC_INDICES: ((L['x']._dynamo_dynamic_indices.issubset({0})) if hasattr(L['x'], '_dynamo_dynamic_indices') else True)
+- LAMBDA_GUARD: 2 <= L['x'].size()[0] <= 1023                                 # _dynamo/output_graph.py:452 in init_ambient_guards
```

we might only have `RootGuardManager` in `code_parts` , and the `LAMBDA_GUARD` part is missing.

related pr: https://github.com/pytorch/pytorch/pull/134181 (it adds the `code_parts` when cpp guard is used)

cc @ezyang @chauhang @penguinwu @bobrenjc93 @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @rec @anijain2305 

### Versions

tested on 2.6.0.dev20241004
Repository: bitcoin
Issue: Listen on random port by default (not 8333)
Labels: Feature,Brainstorming

### Please describe the feature you'd like to see added.

Connections to port 8333 can be recognized right away as Bitcoin P2P connections. While it is still possible to recognize Bitcoin P2P connections regardless of the port, random ports would make network-wide monitoring harder.


### Is your feature related to a problem, if so please describe it.

Network-wide monitoring.

### Describe the solution you'd like

The listening address and port of a node are propagated and saved in other nodes' databases, so the port has to be constant. Thus, after generating a random port it would need to be saved on disk (e.g. `settings.json`) and reused after restarts.

This applies to new installations. Existent ones have already propagated with port 8333 (if not changed by the node operator). So, something like: if a new installation and port is not explicitly provided, instead of using 8333 generate a random one and save it to `settings.json`.

This applies only to listening on IPv4 and IPv6 addresses.

### Please leave any additional context

This is more of a network-wide measure. Individual nodes have stronger means to protect themselves.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Hide Flux Models in model gallery
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Since they are not supported, it would be nice if we could hide these models so they are not shown alongside other Loras

### Proposed workflow

1. Go to Lora gallery tab
2. See no flux models



### Additional information

_No response_
Repository: pytorch
Issue: segfault when using DTensor with nonblocking nccl comm
Labels: oncall: distributed,triaged,module: nccl,module: dtensor

### 🐛 Describe the bug

```python

from torch.distributed._tensor import Replicate, Shard, distribute_tensor, init_device_mesh
import torch
from torch import distributed as dist

if __name__ == '__main__':
    dist.init_process_group(backend="nccl")
    torch.cuda.set_device(dist.get_rank())
    rng = torch.Generator().manual_seed(1024)
    local_world_size = dist.get_world_size()
    tensor = torch.rand((277, 313), dtype=torch.float, generator=rng).cuda()

    placements = [Replicate(), Shard(0)]
    for mesh_shape in [(2, local_world_size // 2), (4, local_world_size // 4)]:
        print(f"Testing {mesh_shape}")
        mesh = init_device_mesh('cuda', mesh_shape)
        distribute_tensor(tensor, device_mesh=mesh, placements=placements)
```

Run it with:
```
TORCH_NCCL_USE_COMM_NONBLOCKING=1 TORCH_NCCL_NONBLOCKING_TIMEOUT=100 torchrun --nproc-per-node=4 a.py
```
produces segfault:
```
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
=====================================================
snippet/test_dtensor_segfault.py FAILED
-----------------------------------------------------
Failures:
[1]:
  time      : 2024-10-05_06:28:27
  host      :
  rank      : 2 (local_rank: 2)
  exitcode  : -11 (pid: 162)
  error_file: <N/A>
  traceback : Signal 11 (SIGSEGV) received by PID 162
-----------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2024-10-05_06:28:27
  host      : 
  rank      : 1 (local_rank: 1)
  exitcode  : -11 (pid: 161)
  error_file: <N/A>
  traceback : Signal 11 (SIGSEGV) received by PID 161
=====================================================
```


### Versions

Tested on 2.5.1 as well as 2.6.0a0+gitc6c0439

cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @tianyu-l
Repository: PowerToys
Issue: FancyZones: Browser (Chrome) App Shortcuts not restored correctly
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.85.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

Chrome offers the feature to create desktop shortcuts as kind of "apps" from websites, like whatsapp, google keep and similar.
When opened, the site opens without all browser bars and so on, and it looks like an "app".

FancyZones can not distinguish between those app shortcuts and always opens _all_ those shortcuts at the last known "chrome" position and not in the zone, they have been.

## How to reproduce
* Create a FancyZones layout of 3 zones (left, center, right or whatever you prefer)
* create 3 shortcut apps through chrome (open a website, click the three dots -> stream save and share -> create shortcut)
* open all three and assign each of them a zone
* now close all three and open them again
* you see, all three open in the same zone (whichever fancyzones has saved as the last of "chrome")

### ✔️ Expected Behavior

I was expecting that you analyze a chrome app (can be found through the `-app_id` commandline argument on the process) and that you restore each _app_ at its position and not treat them all as just "a browser", because they are not "just a browser"

### ❌ Actual Behavior

as described above

### Other Software

_No response_
Repository: PowerToys
Issue: Progress bar or some other indication to show that a download is in progress.
Labels: Needs-Triage

### Description of the new feature / enhancement

Currently the download starts automatically and there's no indication that it is happening on the settings page. It will be good if the following were shown:
- current version (already shown)
- new update available version (show before download starts, currently it's shown after download finishes)
- download progress bar or percentage.

### Scenario when this would be used?

When an update is available and download is in progress.

### Supporting information

_No response_