sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Empty Dimensions returned in `aten::_trilinear`
Labels: triaged,module: linear algebra

### 🐛 Describe the bug

I'm working on a lowering for `aten::_trilinear` in the torch-mlir repo, and believe that I have found a discrepancy in the output when a dimension lies in the triple intersection between `expand1`, `expand2`, and `expand3` operands.

As specified in the comment of `aten::_trilinear` at `aten/src/ATen/native/Linear.cpp`:

```text
// _trilinear computes a trilinear einstein sum with an unrolled dimension
// the result is `(i1.unsqueeze(expand1)*i2.unsqueeze(expand2)*i2.unsqueeze(expand3)).sum(sumdim)`
// the computation is unrolled in the unroll_dim dimension
// its main purpose is to unify the computations in bilinear and bilinear_backward
```

In most cases, `torch.ops.aten._trilinear` corresponds one-to-one with the output of `torch.einsum`, which has the same definition of `(i1.unsqueeze(expand1)*i2.unsqueeze(expand2)*i2.unsqueeze(expand3)).sum(sumdim)`, when give proper operands:

For example:
```python
>>> a, b, c = [torch.rand(2, 3, 4) for _ in range(3)]
>>> torch._trilinear(a, b, c, [], [], [], []) == torch.einsum('abc,abc,abc->abc', a, b, c)
tensor([[[True, True, True, True],
         [True, True, True, True],
         [True, True, True, True]],

        [[True, True, True, True],
         [True, True, True, True],
         [True, True, True, True]]])
>>> torch._trilinear(a, b, c, [], [], [], [0, 2]) == torch.einsum('abc,abc,abc->b', a, b, c)
tensor([True, True, True])
```

However, in cases where there is a dimension shared between all `expand` lists that is not included in `sumdim`, _trilinear appears to output an empty tensor, with the intersecting dimension set to zero, while einsum outputs a tensor with that dimension set to 1:

```python
# Trilinear
>>> result_trilinear = torch._trilinear(a, b, c, [0], [0], [0], [2])
>>> result_trilinear.shape
torch.Size([0, 2, 4])

# Equivalent Einsum
>>> a_unsqueezed, b_unsqueezed, c_unsqueezed = a.unsqueeze(0), b.unsqueeze(0), c.unsqueeze(0)
>>> result_einsum = torch.einsum('abcd,abcd,abcd->abd', a_unsqueezed, b_unsqueezed, c_unsqueezed)
>>> result_einsum.shape
torch.Size([1, 2, 4])
```

This occurs anytime that a dimension is included in expand1, expand2, and expand3, but not included in sumdim:

```python
>>> result = torch._trilinear(a, b, c, [0, 1], [0, 1], [0, 1], [2])
>>> result.shape
torch.Size([0, 0, 3, 4])
```

## Expected Result
I expected that torch._trilinear would have returned a tensor with those dimensions set to 1 instead of zero, the same way that torch.einsum returns a 1 for those dimensions.



### Versions

Versions of relevant libraries:
[pip3] numpy==2.1.2
[pip3] onnx==1.16.1
[pip3] torch==2.6.0.dev20240916+cpu
[pip3] torchvision==0.20.0.dev20240916+cpu

cc @jianyuh @nikitaved @pearu @mruberry @walterddr @xwang233 @Lezcano
Repository: TypeScript
Issue: Cannot reassign undefined to the parameter of a function parameter destructuring with default value
Labels: Suggestion,Awaiting More Feedback

### 🔎 Search Terms

"function parameter destructuring", "destructured parameter", "named parameter", "undefined"

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about "Why Method Bivariance?"

### ⏯ Playground Link

https://www.typescriptlang.org/play/?target=0&ts=5.7.0-dev.20241018#code/GYVwdgxgLglg9mABGOAnAtgQwDYAVOqboCmUxqAYuNPGABQEDmAXIgEZxzbGZIA+icABNiwGGGJDEAXkRRUIYgEpEAbwBQiLYiaI+fWcNHjJAbnUBfdetCRYCRCIDO8kNBCpJ+QiTKVq9vSqOqiMMnIKxIgWrMFMrBxcPPyCYCJiElIWKhoAkLr6hmnGmeZWNgG0jsQuCu6eQgDyAA6BON5EpORUdrR0caHhrlExaiGMAPwJnNy80Tnq+YOFqekmQmXWtjQOzq71XgSdfj07YACM-eNDkTpO7DPJeqslktGx49NJcwJGGW-ZNSLAoGF7-DaWLaVXY1fZQDyHHxdfy9BAAJiuulGAxYD2+KT+62i4RxrGG8yBSzCK0JpUhQA

### 💻 Code

```typescript
function normalParameterFunction(arg: boolean | undefined = true) {
    arg ||= undefined;
}

function destructuredParameterFunction({ arg = true }: { arg: boolean | undefined }) {
	arg ||= undefined;
}

function destructuredOptionalParameterFunction({ arg = true }: { arg?: boolean }) {
	arg ||= undefined;
}
```


### 🙁 Actual behavior

The `normalParameterFunction` works fine, but in `destructuredParameterFunction` and `destructuredOptionalParameterFunction`, I cannot assign `undefined` to `arg`.

> Type 'undefined' is not assignable to type 'boolean'.

### 🙂 Expected behavior

I know that if I specify the default value to the `arg`, the `arg` will no longer be `undefined`, but maybe I can reassign it to the `undefined`.

I guess it should have the same logic as the following:
```typescript
var arg: boolean | undefined = true;
arg ||= undefined;
```

### Additional information about the issue

* I don't know if it's really a bug or if it's a bad habit to change the value of a function parameter, but the function without parameter destructuring work as expected. Also, I hate recreate a new variable and come up with a new name in order to change the value of a function parameter, even though assigning the parameter itself directly doesn't modify the variable outside the function.

* The above code is a real-world use case that aims to set `arg` to `undefined` when it is a falsy value. In fact, `arg ||= undefined` is not needed, just `arg = undefined` will trigger the issue, but in this case, the original value of `arg` is ignored and has no practical meaning.

* You can also pass the type check in disguise with the following code:
```typescript
function destructuredParameterFunction1({ arg = true as boolean | undefined }: { arg: boolean | undefined }) {
	arg ||= undefined;
}

function destructuredParameterFunction2({ arg }: { arg: boolean | undefined } = { arg: true }) {
	arg ||= undefined;
}
```
Repository: pytorch
Issue: tlparse's fx_graph_runnable should include custom op info
Labels: triaged,module: custom-operators,oncall: pt2,oncall: fx,module: pt2-dispatcher

From talking with @eellison and @ezyang separately.

## Motivation

The fx_graph_runnable contains the graph but may have custom operators that need us to load libraries for. It would be nice if we  1) put the torch.ops.load_library(blah) calls into the fx_graph_runnable
2) also outputted a build target that includes the dependencies and make it so that we can easily run the fx_graph_runnable.

## Pitch

For (1): torch.ops.load_library can record which custom ops got loaded, so we know which torch.ops.load_library calls to ultimately generate.
For (2): We need some help from the environment to give us a build target we can use?





cc @ezyang @chauhang @penguinwu @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @bdhirsh @yf225
Repository: rust
Issue: rustdoc: Footnotes don't work well when used on multiple doc comments that share page.
Labels: T-rustdoc,C-enhancement,A-rustdoc-ui,T-rustdoc-frontend

```rust
pub struct Foo;

impl Foo {
    /// Link 1 [^1]
    ///
    /// [^1]: Hiya
    pub fn l1(){}

    /// Link 2 [^2]
    ///
    /// [^2]: Biya
    pub fn l2() {}
}
```

![Image](https://github.com/user-attachments/assets/4b54f648-77a0-4695-a1f4-6abbcdd94f13)

Not only is this ugly, but both footnotes use the same link/number, despite being seperate in the source code.

I think the right thing to do here is to show all footnotes for a page in one place (at the bottom). This may have some subtle interactions with when markdown content appears on multiple pages (eg summaries, trait methods), but I've not looked into the details yet.

Origionly inspired by this output: 

[![Image](https://github.com/user-attachments/assets/863465ea-7568-4327-a846-990c0ea6ed55)](https://docs.rs/rustdoc-types/0.32.0/rustdoc_types/struct.Trait.html#structfield.is_dyn_compatible)
Repository: ollama
Issue: Migrate off centos 7 for intermediate build layers in container image builds
Labels: feature request,build

# What

[Centos is dead](https://endoflife.date/centos), long live [centos stream (9)](https://endoflife.date/centos-stream)

Ollama should probably not be using centos 7 now that it is unsupported and at EOL.

# Why

AMD and Nvidia are no longer publishing updates to their centos 7 flavor of dependencies.

See also https://rocm.docs.amd.com/en/docs-6.2.0/about/release-notes.html

> ROCm 6.2.0 marks the end of support (EoS) for:
>  ...
> CentOS 7.9

See also https://docs.nvidia.com/cuda/cuda-installation-guide-linux/ not listing centos anywhere.

See also last image Nvidia published for centos 7 was ~6 months ago: https://hub.docker.com/r/nvidia/cuda/tags?name=centos

# More info

Currently there are several intermediate build layers in the container image build which utilize centos 7:

- [cuda-11-build-amd64](https://github.com/ollama/ollama/blob/bf4018b9ecd56a5deff0c22ca2fba242a8f0101b/Dockerfile#L15)
- [cuda-12-build-amd64](https://github.com/ollama/ollama/blob/bf4018b9ecd56a5deff0c22ca2fba242a8f0101b/Dockerfile#L32)
- [rocm-build-amd64](https://github.com/ollama/ollama/blob/bf4018b9ecd56a5deff0c22ca2fba242a8f0101b/Dockerfile#L85)
- [cpu-builder-amd64](https://github.com/ollama/ollama/blob/bf4018b9ecd56a5deff0c22ca2fba242a8f0101b/Dockerfile#L101)
  - this one also has transitive layers which depend on it, `container-build-amd64`, `cpu-build-amd64`, `cpu_avx-build-amd64`, and `cpu_avx2-build-amd64`)

Looking at the various Nvidia and AMD docs, it seems like both support the latest EL 9 version, so I would probably try to migrate to EL9 (rockylinux 9 ) to get the latest compatible versions of core dependencies like gcc and also avoid needing to update for a long time (EL 9 EOL is several years away still).

As a quick POC, I was able to get the rocm build migrated to rocky8 with very low effort. This build performance tested the same as the current HEAD of ollama, though I did not run it through the full suite of unit tests.
Repository: pytorch
Issue: [ROCm] PyTorch Profiler Seg Fault on PyTorch Nightly
Labels: module: rocm,triaged,oncall: profiler

### 🐛 Describe the bug

After running the following script trace profiler seg faulted on torch nightly:
```
import torch
import torchvision.models as models
from torch.profiler import profile, record_function, ProfilerActivity
model = models.resnet18().cuda()
inputs = torch.randn(2000, 3, 224, 224).cuda()

with profile(activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA]) as prof:
    with record_function("model_inference"):
        model(inputs)
prof.export_chrome_trace("resnet18_profile.json")
```

I ran a trace using the following commands:
```
curl -LO https://get.perfetto.dev/trace_processor
chmod +x ./trace_processor
./trace_processor --httpd PATH_TO_TRACE.json
```

Error Message:
```
[778.440] processor_shell.cc:1699 Trace loaded: 458.28 MB in 15.58s (29.4 MB/s)
[778.441]            httpd.cc:102 [HTTP] Starting RPC server on localhost:9001
[778.441]            httpd.cc:107 [HTTP] This server can be used by reloading https://ui.perfetto.dev and clicking on YES on the "Trace Processor native acceleration" dialog or through the Python API (see https://perfetto.dev/docs/analysis/trace-processor#python-api).
[788.706]       http_server.cc:83 [HTTP] New connection
[788.706]       http_server.cc:83 [HTTP] New connection
[788.707]      http_server.cc:231 [HTTP] GET / [body=0B, origin=""]
[788.870]      http_server.cc:231 [HTTP] GET /favicon.ico [body=0B, origin=""]
[788.870]       http_server.cc:90 [HTTP] Client disconnected
[825.672]       http_server.cc:83 [HTTP] New connection
[825.672]      http_server.cc:231 [HTTP] POST /status [body=0B, origin="https://ui.perfetto.dev"]
[831.085]      http_server.cc:231 [HTTP] OPTIONS /status [body=0B, origin="https://ui.perfetto.dev"]
[831.086]       http_server.cc:90 [HTTP] Client disconnected
[831.332]       http_server.cc:83 [HTTP] New connection
[831.333]      http_server.cc:231 [HTTP] POST /status [body=0B, origin="https://ui.perfetto.dev"]
[831.661]       http_server.cc:83 [HTTP] New connection
[831.661]      http_server.cc:231 [HTTP] GET /websocket [body=0B, origin="https://ui.perfetto.dev"]
Segmentation fault (core dumped)
```

cc: @hliuca

### Versions

Torch version:
pytorch-triton-rocm 3.1.0+cf34004b8a
torch               2.6.0.dev20241018+rocm6.2
torchaudio          2.5.0.dev20241018+rocm6.2
torchvision         0.20.0.dev20241018+rocm6.2

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @naromero77amd @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise
Repository: ant-design
Issue: Modal contains a focusable element that has no interactive content
Labels: Inactive,unconfirmed

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-hy2spp)

### Steps to reproduce

1.Open any modal dialog, either the basic one or the ones created with Modal.method()

2.Open the browser console and type document.activeElement

3.The active element is empty and not interactive
<div tabindex="0" style="width: 0px; height: 0px;… hidden; outline: none;" aria-hidden="true"></div>

### What is expected?

From MDN:
Focusable elements should have interactive semantics
If an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some kind (for example, activating a link or changing an option).

The modal should automatically focus on the close button, or the Ok button, and navigation with Tab or Shift Tab should send focus on interactive elements, not on empty and non-interactive ones. (Description re-used from old issue linked below)

### What is actually happening?

What is actually happening?
An empty and non-interactive element is being focused by default and/or by navigating with Tab or Shift Tab when modal is open

Environment	Info
antd	5.1.6
React	18
System	any system
Browser	any browser

| Environment | Info |
| --- | --- |
| antd | 5.21.4 |
| React | 18 |
| System | any system |
| Browser | any browser |

---
This issue was reported before here: https://github.com/ant-design/ant-design/issues/40380 and closed by this fix here: https://github.com/react-component/dialog/pull/393. But the issue still persists in the latest antd version

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: deno
Issue: Deno compile --icon not taken into account
Labels: bug,compile

Version: Deno 2.0.0
Platform: Windows

When specifying an icon (.ico 128x128px) for the exe using :
> deno compile --icon LogoName.ico main.ts

=> The build succeed but the default windows application icon is used.

I managed to reproduced the issue with a blank "Hello World" project.

Repro :
- deno init my_project
- deno compile --icon LogoName.ico main.ts
Repository: langchain
Issue: make sure that @tool decorator can be applied to a method (regression?)
Labels: Ɑ:  core

### Privileged issue

- [X] I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

### Issue Content

```python
from langchain_core.tools import tool

class MyAPI:
    def __init__(self):
        self.base_url = 'https://en.wikipedia.org/wiki/'

    @tool
    def lookup(self, page) -> str:
        """Look up a page on wikipedia. Include just the name of the page. Rest of the URL will be filled in."""
        url = self.base_url + item
        return request.get(url)        
        
api = MyAPI()
api.lookup.invoke('hello')
```
Repository: ui
Issue: [bug]: shadcn cli - diff command not working
Labels: bug

### Describe the bug

Run: `npx shadcn@latest diff`
Produce: `No updates found.`

OBS: I have changes in the calendar component

### Affected component/components

All

### How to reproduce

Run: `npx shadcn@latest init`

```bash
Framework: Vite
Style: default
Base Color: Slate
CSS variables: No
```

Run: `npx shadcn@latest add calendar`

Change the calendar component

Run: `npx shadcn@latest diff`

Result: `No updates found.`


### System Info

```bash
Node: v22.10.0
npx: v10.8.2
shadcn: v2.1.0
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: flutter
Issue: Add `et test --output=...`
Labels: P2,team-engine,triaged-engine,e: engine-tool

Today, `et test` just runs the underlying test executable, and reports a binary pass (exit code 0) or fail (otherwise).

A failed test also has a link to a log file on disk in a `/tmp` directory.

This is a good initial start, but is not yet at the level where we can encourage broad use (or use it in on CI).

Let's add 2 modes initially:
- `errors` (**default**, write failure logs to stderr, and full logs to a file in `FLUTTER_TEST_DIR` or `/tmp` locally)
- `streamed` (write all logs to stderr _only_)

As-per discussions, we'll bypass doing any sort of machine parsing of test output at this time - this will let us more quickly ramp up moving test invocations from `run_tests.py` (https://github.com/flutter/flutter/issues/156243) to `et test`, and add additional test hosts (iOS, Android, etc).

See also: <https://bazel.build/reference/command-line-reference#flag--test_output> for future suggestions.
Repository: flutter
Issue: [pigeon] Make the inputs to pigeon non-flag arguments
Labels: package,team-ecosystem,p: pigeon,P2,triaged-ecosystem

I tried to generate multiple inputs at once with `--input pigeons/*.dart` without thinking about it, and it silently generated the first one but not the second, which is pretty bad. That shouldn't actually work as written, but it should have errored.

But really what we should do is make the input file(s) non-flag input, since they are often the only input, they are required, and that's an *extremely* common pattern for command line tools. And it allows shell globbing to Just Work.

We should keep `--input` as a hidden argument that passes through, so we don't break everyone's muscle memory. But we should update all the READMEs to not use `--input`.
Repository: godot
Issue: Project-wide-search keyboard shortcut doesn't work if no script is open
Labels: discussion,topic:editor,usability

### Tested versions

v4.3.stable.official [77dcf97d8]

### System information

Mac OS 10.14.8

### Issue description

See title.

### Steps to reproduce

1. Open a project.
2. Press Command+Shift+F.
3. Observe that nothing happens.
4. Open the script tab and do the same, still nothing happens.
5. Open a script, and now it works.

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: ImageTexture.is_pixel_opaque documented but nonexistent
Labels: discussion,topic:core

### Tested versions

- Reproducible in 4.2 and 4.3 stable

### System information

Godot v4.3.stable - Debian GNU/Linux 10 (buster) 10 - X11 - GLES3 (Compatibility) - Radeon RX 580 Series (POLARIS10, DRM 3.27.0, 4.19.0-27-amd64, LLVM 7.0.1) - AMD Ryzen 5 3600X 6-Core Processor (12 Threads)

### Issue description

`Texture2D` has a documented function, `_is_pixel_opaque` that is nonexistent in GDScript when called on an `ImageTexture`. It should probably actually be `is_pixel_opaque` which is also nonexistent in GDScript. This appears to be a binding error. Reasoning follows.

The C++ `ImageTexture` source code implements `ImageTexture::is_pixel_opaque`, overriding virtual `Texture2D::is_pixel_opaque`, but the method doesn't seem to be bound in `::_bind_methods` for `Texture2D` nor `ImageTexture`. Both `_is_pixel_opaque` and `is_pixel_opaque` are "nonexistent"  in base `ImageTexture` and cause errors when invoked from GDScript.

`Texture2D` has a virtual binding for `_is_pixel_opaque` in `Texture2D::_bind_methods` (scene/resources/texture.cpp). `ImageTexture` does not override this, but does implement `is_pixel_opaque` with no leading underscore. This function. `is_pixel_opaque`,  is the declared virtual in `Texture2D` (scene/resources/texture.h).

`Sprite2D` calls `Texture2D::is_pixel_opaque` directly, bypassing the GDScript bindings.

My understanding of the GDScript bindings is limited, but it seems to me that `Texture2D` should have a virtual binding for `is_pixel_opaque` (with no leading underscore) and that will expose the function `ImageTexture::is_pixel_opaque` in GDScript. The virtual binding of `Texture2D::_is_pixel_opaque` should be removed/replaced, solving the issue. Based on the header files and use of the function elsewhere, this seems the intended configuration.

There is documentation impact in that the documentation has a leading underscore that seems incorrect based on the internal function usage. Probably no leading underscore is intended based on the actual implementation. I don't know if changing the binding will automagically update the documentation.

### Steps to reproduce

In GDScript, instantiate an `ImageTexture` in any way you like, perhaps by loading one from a file, then try call `_is_pixel_opaque` or `is_pixel_opaque` on it. Either one will fail with the message, "Invalid call. Nonexistent function 'is_pixel_opaque' in base 'ImageTexture'.

```
var image: Image = Image.load_from_file("filename.png")
var texture: ImageTexture = ImageTexture.create_from_image(image)
print("opaque at [5, 5]? ", texture._is_pixel_opaque(5, 5))
```

### Minimal reproduction project (MRP)

[pixel-opacity-test.zip](https://github.com/user-attachments/files/17440150/pixel-opacity-test.zip)
Repository: flutter
Issue: Refactor `WorkerPool`/`WorkerTask` system in `et`
Labels: P3,c: tech-debt,team-engine,triaged-engine,e: engine-tool

There is an initial worker task/pool/reporter system implemented in `engine_tool`:

- https://github.com/flutter/engine/blob/main/tools/engine_tool/lib/src/worker_pool.dart
- https://github.com/flutter/engine/blob/main/tools/engine_tool/lib/src/proc_utils.dart

It is used by both `et test` and `et lint` to run executables and report on their progress:

- https://github.com/flutter/engine/blob/main/tools/engine_tool/lib/src/commands/test_command.dart
- https://github.com/flutter/engine/blob/main/tools/engine_tool/lib/src/commands/lint_command.dart

In theory, it could also power `et format` but does not: 
- https://github.com/flutter/engine/blob/main/tools/engine_tool/lib/src/commands/format_command.dart

The overall design is good, but some tweaks will be needed to support more unified output, i.e. https://github.com/flutter/flutter/issues/157182.

Some notes:
- We'd want at least the option to do streaming reporting of task progress
- Let's separate `ProcessArtifacts` from the act of a task, and make it the responsibility of the runner/reporter
- Let's make sure this is CI compatible, i.e. friendly towards the `FLUTTER_LOGS_DIR` ddesign.
Repository: terminal
Issue: When running Python code, user's input will appear in the incorrect place
Labels: Product-Conpty,Area-Input,Issue-Bug

### Windows Terminal version

1.23.2913.0

### Windows build number

10.0.27729.1000

### Other Software

Visual Studio 2022 /w Python 3.9

### Steps to reproduce

1: Create a python script that accepts user input using Visual Studio 2022
2: Run the script and begin typing


### Expected Behavior

User input will appear in the correct place, such as the end of a line

### Actual Behavior

User input appears at the top left of the terminal window