sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.compile with Custom tensor subclass doesn't inline the tensor subclass methods 
Labels: triaged,tensor subclass,module: dynamo,dynamo-tensor-subclasses,dynamo-triage-june2024

### 🐛 Describe the bug

```
import torch
import torch.utils._pytree as pytree
from torch.utils._python_dispatch import return_and_correct_aliasing


# A simple tensor subclass that holds a tensor with custom metadata and custom method
class CustomTensor(torch.Tensor):
    @staticmethod
    def __new__(cls, elem):
        shape = elem.shape
        kwargs = {}
        kwargs["strides"] = elem.stride()
        kwargs["storage_offset"] = elem.storage_offset()
        kwargs["device"] = elem.device
        kwargs["layout"] = elem.layout
        kwargs["requires_grad"] = elem.requires_grad
        kwargs["dtype"] = elem.dtype
        return torch.Tensor._make_wrapper_subclass(cls, shape, **kwargs)

    def __init__(self, elem):
        self.elem = elem
        self.constant_attribute = 4

    def __repr__(self):
        inner_repr = repr(self.elem)
        return f"CustomTensor({inner_repr})"

    def __tensor_flatten__(self):
        return ["elem"], self.constant_attribute

    def add_constant(self, a):
        self.constant_attribute += a

    @staticmethod
    def __tensor_unflatten__(inner_tensors, meta, outer_size, outer_stride):
        assert meta is not None
        elem = inner_tensors["elem"]
        out = CustomTensor(elem)
        out.constant_attribute = meta
        return out

    @classmethod
    def __torch_dispatch__(cls, func, types, args, kwargs):
        if kwargs is None:
            kwargs = {}
        args_inner = pytree.tree_map_only(CustomTensor, lambda x: x.elem, args)

        kwargs_inner = pytree.tree_map_only(CustomTensor, lambda x: x.elem, kwargs)

        out_inner = func(*args_inner, **kwargs_inner)
        out_inner_flat, spec = pytree.tree_flatten(out_inner)
        # for aten ops that return non-tensors, just assume that
        # our cust inner tensors return the same value
        out_flat = [
            CustomTensor(o_inner) if isinstance(o_inner, torch.Tensor) else o_inner
            for o_inner in out_inner_flat
        ]
        out = pytree.tree_unflatten(out_flat, spec)
        return return_and_correct_aliasing(func, args, kwargs, out)


def f(x, y):
    x.add_constant(4)
    return x.cos() + y.cos()


a = torch.ones(4, requires_grad=True)
b = torch.ones(4, requires_grad=True)
custom_a = CustomTensor(a)
custom_a_for_compile = custom_a.detach().clone().requires_grad_()

print(custom_a.constant_attribute)  # prints 4
f(custom_a, a)
print(custom_a.constant_attribute)  # print 8

compiled_f = torch.compile(f, backend="aot_eager")
compiled_f(custom_a_for_compile, b)
print(custom_a_for_compile.constant_attribute)  # prints 4 but should be 8
```

### Versions

main

cc @ezyang @msaroufim @albanD @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @bdhirsh @anijain2305
Repository: pytorch
Issue: torch.compile Jamba: long compilation time with backend="eager"
Labels: triaged,oncall: pt2,module: dynamo,module: guards,module: startup-tracing-compile

### 🐛 Describe the bug

backend eager takes 8 minutes to compile

TORCH_LOGS="+dynamo": 61MB unzipped: [simple_train_logs.zip](https://github.com/user-attachments/files/15672380/simple_train_logs.zip)

repro: https://github.com/xmfan/Jamba/commit/be6b5c12b23862669b37c8ee41cc1f8938529266, add `backend="eager"`

### Versions

2.3.0 (pinned by zeta)

cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
Repository: flutter
Issue: ☂️ Support Android api 35 
Labels: P1,team-android,triaged-android

This is a bug to link any issues related to Android 35 support:

- [x] https://github.com/flutter/flutter/issues/149328
- [x] https://github.com/flutter/flutter/issues/150215
- [ ] https://github.com/flutter/flutter/issues/152374
Repository: godot
Issue: Nested resources are not always saved after being modified externally
Labels: bug,topic:core,topic:editor

### Tested versions

- Reproducible in: v4.2.1.stable.mono.official [b09f793f5], v4.3.beta1.mono.official [a4f2ea91a]

### System information

Godot v4.3.beta1.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 Threads)

### Issue description

After a resource (`.tres`) file has been modified externally, changing properties in the editor will not consistently modify the resource file when scene is saved. This seems to happen with nested resource properties only.
Reopening the scene doesn't fix the issue, project needs to be reloaded.

### Steps to reproduce

- Open the `node_2d` scene from the MRP project
- Open the `new_resource.tres` in Notepad++ (or any external text editor)
- Set `nested_value` to `true` in Notepad++ and save the file
- Go back to Godot editor, toggle `nested_value` and save the scene => Notice the value was changed accordingly in Notepad++
- Repeat the previous step => Notice in Notepad++ that `nested_value` didn't change and is still `false`

### Minimal reproduction project (MRP)

[bug_resource_save.zip](https://github.com/user-attachments/files/15676580/bug_resource_save.zip)
Repository: rust
Issue: Debuginfo tests don't control for ambient tools
Labels: A-testsuite,A-debuginfo,E-hard,T-bootstrap,C-bug,WG-debugging,A-compiletest

The debuginfo tests should probably use a specific debugger, like maybe an lldb we build with the compiler, so that they work consistently. In practice, they have [been effectively broken on user's machines](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20do.20I.20skip.20debuginfo.20tests.3F) by just trying to use whatever is installed.

In other words: just because I use Linux doesn't mean I have gdb installed.
Repository: PowerToys
Issue: Run: Support for UUIDv7 generation
Labels: Idea-Enhancement,Help Wanted,Status-In progress,Run-Plugin

### Description of the new feature / enhancement

Generate timestamp-based UUIDv7 identifiers, as proposed by [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562#name-uuid-version-7)

### Scenario when this would be used?

In the same way I can generate UUIDv4, v1, v3 and v5; I would be able to use UUIDv7 with the improvements it provides, like it being partially time-based (to make it sortable).

### Supporting information

_No response_
Repository: godot
Issue: The FileDialog > Create New Folder popup should also be exclusive and not hide if you click on it's parent FileDialog pane.
Labels: enhancement,discussion,topic:gui

### Tested versions

- v4.3.dev5.official [c9c17d6ca]
- v4.3.beta1.official [a4f2ea91a]

### System information

Linux Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8

### Issue description

When using the FileDialog node, the Create Folder popup should be forced to exclusive. If you click away by accident  (e.g. inside the the FileDialog panel), the popup hides behind the FileDialog panel and cannot be recovered (unless you know to drag the FileDialog away to find it). In that case you need to force close the application.

![image](https://github.com/godotengine/godot/assets/930478/b9ce1b7b-9491-4232-84a8-39536ebcb85d)


### Steps to reproduce

See reproduction attachment below.

- Create a main Node scene and add a FileDialog node with visible, exclusive, centered, size of main window (I used a small code snippet to position and size).
- Run the project
- Click on Create new folder button to the top right of the FileDialog
- The Create Folder popup should appear.
- Click inside the FileDialog pane
- The Create Folder popup hides behind. Cannot be recovered (unless you were able to drag the File Dialog pane away)


### Minimal reproduction project (MRP)

[Archive.zip](https://github.com/user-attachments/files/15685429/Archive.zip)
Repository: go
Issue: x/net/http2: support proxying udp in HTTP/2 with RFC 9298
Labels: NeedsInvestigation,FeatureRequest

### Go version

go version go1.21.1 darwin/amd64

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

```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/nmaharja/Library/Caches/go-build'
GOENV='/Users/nmaharja/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS='-buildvcs=false'
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/nmaharja/go/pkg/mod'
GONOPROXY='github.office.opendns.com'
GONOSUMDB='github.office.opendns.com'
GOOS='darwin'
GOPATH='/Users/nmaharja/go'
GOPRIVATE='github.office.opendns.com'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/nmaharja/projects/clean/ProxyConnectTools/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/fv/c8jghnc95_vgn57t5w9hvvlh0000gn/T/go-build1530722529=/tmp/go-build -gno-record-gcc-switches -fno-common'
```


### What did you do?

I tried to create a UDP connection through HTTP2 protocol. For HTTP2 connection, the RFC suggests to use `CONNECT` method with following headers
```
 HEADERS
   :method = CONNECT
   :protocol = connect-udp
   :scheme = https
   :path = /.well-known/masque/udp/192.0.2.6/443/
   :authority = example.org
```

I do not see see `protocol`, `scheme` and `path` header being set.  The `encodeHeaders` method only sets `scheme` and `path`, when non `CONNECT` method is being used.

RFC doc link: https://datatracker.ietf.org/doc/rfc9298/

### What did you see happen?

The server decided to use TCP protocol instead of UDP.

### What did you expect to see?

I expected to see UDP connection.
Repository: flutter
Issue: Basic example in RFW does not render.
Labels: package,team-ecosystem,has reproducible steps,P2,p: rfw,triaged-ecosystem,found in release: 3.22,found in release: 3.23

This example does not render: https://pub.dev/packages/rfw#getting-started
I see just black square.
I got this example working as expected: https://github.com/flutter/packages/blob/main/packages/rfw/example/remote/remote_widget_libraries/counter_app2.rfwtxt
Repository: godot
Issue: Control node 'resized' event fires twice for every resize in CanvasItemEditor
Labels: bug,topic:editor,confirmed,topic:gui

### Tested versions

Reproducable in: `0bf12956a10d216c46368f26b00f6999d000c1d8`  ,      which is 4.2.1-rc

### System information

Archlinux

### Issue description

On a control node, the `resized` event fires twice on every resize

### Steps to reproduce

1. New Project
2. New 2D Scene
3. Add Control Node
4. Attach Script
5. connect signal `resized`
6. Write this into the script:
```
@tool
extends Control

var calls : int = 0

func _on_resized():
    calls = calls + 1
    print(calls, ": ", size)
```

7. (restart godot, because for me i kept getting ` core/object/object.cpp:1140 - Error calling from signal 'resized' to callable: 'Control(Control.gd)::_on_resized': Method not found.`, a restart fixes this; when using the MRP this won't matter)

8. drag one corner around in any way



You will see an output like:
```
1: (332, 213)
2: (332, 212)
3: (332, 214)
4: (332, 212)
5: (333, 216)
6: (332, 212)
7: (334, 217)
8: (332, 212)
9: (336, 219)
10: (332, 212)
11: (339, 222)
12: (332, 212)
13: (344, 225)
14: (332, 212)
15: (352, 233)
16: (332, 212)
17: (368, 245)
18: (332, 212)
19: (387, 255)
20: (332, 212)
21: (404, 263)
22: (332, 212)
23: (418, 271)
24: (332, 212)
25: (430, 277)
```

where every 2nd time the function gets called, its the same, original size.


#### this _doesn't_ happen if its done via code, only when dragged in the editor
```
@tool
extends Control

func _process(delta):
    size.x += 1

func _on_resized():
    print(size)
```



### Minimal reproduction project (MRP)

[godot.zip](https://github.com/user-attachments/files/15686057/godot.zip)
Repository: PowerToys
Issue: FancyZones snap and configuration disagree on layout
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

I have two docks for my laptop, one at home and one at work. Each dock has a different monitor configuration. 

When I move between docks, FancyZones gets confused.

Note: I'm not sleeping or hibernating; I shutdown the laptop on one dock and then turn it on after connecting to the other.

This happens pretty consistently, but not every time.


Workaround: I can reset things by changing the configuration for Monitor 1 to something else, and then back to three rows. 

### ✔️ Expected Behavior

The set of _available_ zones into which I can snap a window should match the set of _configured_ zones. 
After all, that's what the configuration is for! :grin:

### ❌ Actual Behavior

One set of zones is _active_ - allowing me to snap windows into specific locations.
But a different set of zones is _configured_.

Check out the following screenshot:
![image](https://github.com/microsoft/PowerToys/assets/1272094/8f4ded6f-baac-441b-a503-f09212845943)

On the (primary) center screen, the FancyZones settings window can be seen. Monitor 1 (the lefthand screen) has been selected and you can see that it is _configured_ with three rows.

However, look behind the zones on the lefthand screen and you can see the main PowerToys settings page - which was snapped into place moments earlier. The _active_ zones for monitor 1 are a Priority Grid.


### Other Software

_No response_
Repository: ui
Issue: [bug] — TypeError: Cannot redefine property: File
Labels: bug

### Describe the bug

### TypeError: Cannot redefine property: File

#### Description
I encountered a `TypeError: Cannot redefine property: File` when trying to initialize `shadcn-ui` in my Next.js project. This issue occurs despite not using Babel directly in my project. Below are the details of the environment and steps to reproduce the issue.

I have cleared the npm cache, deleted node_modules, completely deleted Node.js and all it traces and reinstalling it again.
This issue does not occur when Babel is explicitly added to the project.
This issue persists across different Node.js versions and across different projects.

I try isolating it by starting out a new test-project and still the same issue.

### Affected component/components

All. Can't initialize shadcn.

### How to reproduce

1. Create a new Next.js project:
   ```npx create-next-app@latest --typescript my-app && cd my-app```

2. Initialize shadcn-ui:
```npx shadcn-ui@latest init```

### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
Error Output:
Need to install the following packages:
shadcn-ui@0.8.0
Ok to proceed? (y) y

/Users/username/.npm/_npx/125ee17d583c4e03/node_modules/@babel/core/lib/index.js:7
Object.defineProperty(exports, "File", {
       ^

TypeError: Cannot redefine property: File
    at Function.defineProperty (<anonymous>)
    at Object.<anonymous> (/Users/username/.npm/_npx/125ee17d583c4e03/node_modules/@babel/core/lib/index.js:7:8)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/username/.npm/_npx/125ee17d583c4e03/node_modules/@babel/core/lib/config/helpers/config-api.js:16:14)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)

Node.js v20.6.0


Indicating Node.js v20.6.0 despite using the currently LTS version Node.js v20.14.0
```


### System Info

```bash
#### Environment
- **Node.js Version**: v20.14.0
- **npm Version**: 10.8.1
- **npx Version**: Installed with npm 10.8.1
- **Operating System**: macOS 13 inch M1 2020 - macOS somoma v14.5
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: pytorch
Issue: `swap_tensors` fail when calling `nn.Module.to` on XLA `DDP` wrapped models.
Labels: module: nn,triaged,module: xla

### 🐛 Describe the bug

```python
torch.distributed.init_process_group(
    backend="xla",
    init_method="xla://",
)

m = torch.nn.Linear(10, 10).to(xm.xla_device())
m = torch.nn.parallel.DistributedDataParallel(m, device_ids=[0])

# Error happens here!
m.half()
```

```python
[rank0]: Traceback (most recent call last):
[rank0]:   File "torch/nn/modules/module.py", line 824, in _apply
[rank0]:     torch.utils.swap_tensors(param, param_applied)
[rank0]:   File "torch/utils/__init__.py", line 72, in swap_tensors
[rank0]:     check_use_count(t1, 't1')
[rank0]:   File "torch/utils/__init__.py", line 70, in check_use_count
[rank0]:     raise RuntimeError(error_str)
[rank0]: RuntimeError: Expected use_count of t1 to be 1 or 2 with an AccumulateGrad node but got 4 make sure you are not holding references to the tensor in other places.

[rank0]: The above exception was the direct cause of the following exception:

[rank0]: Traceback (most recent call last):
[rank0]:   File "examples/scratch.py", line 58, in <module>
[rank0]:     m.half()
[rank0]:   File "torch/nn/modules/module.py", line 1017, in half
[rank0]:     return self._apply(lambda t: t.half() if t.is_floating_point() else t)
[rank0]:   File "torch/nn/modules/module.py", line 779, in _apply
[rank0]:     module._apply(fn)
[rank0]:   File "torch/nn/modules/module.py", line 828, in _apply
[rank0]:     raise RuntimeError(f"_apply(): Couldn't swap {self._get_name()}.{key}") from e
[rank0]: RuntimeError: _apply(): Couldn't swap Linear.weight
```

### Versions

- PyTorch version: f5328542b5365741176e71dd8a2954e0f350b9bc
- PyTorch/XLA version: [aec273056a95d8119279c15d36c0f48f739fb810](https://github.com/pytorch/xla/commit/aec273056a95d8119279c15d36c0f48f739fb810)

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bdhirsh @miladm @JackCaoG
Repository: deno
Issue: Proposal: add `origin` global
Labels: web,suggestion,runtime

It seems there's a miss match between the implementation of `origin` and/or `globalThis.origin` and `lib.dom.d.ts`


```
$ deno eval "console.log(origin)"
error: Uncaught (in promise) ReferenceError: origin is not defined
console.log(origin)
```

![Screenshot from 2024-06-06 23-16-09](https://github.com/denoland/deno/assets/7634050/1e5fb42a-3145-4567-a3c2-30f6d762e8f8)

![Screenshot from 2024-06-06 23-16-36](https://github.com/denoland/deno/assets/7634050/6faca767-8c12-4e20-9645-b43f35917bf2)

`location` works as expected when a `--location` is and isn't specified

```
$ deno eval --location=http://localhost:3000 "console.log(location)"
Location {
  hash: "",
  host: "localhost:3000",
  hostname: "localhost",
  href: "http://localhost:3000/",
  origin: "http://localhost:3000",
  pathname: "/",
  port: "3000",
  protocol: "http:",
  search: ""
}
```

```
$ deno eval "console.log(location)"
undefined
```

But it doesn't fix the issue with `origin` if you do

```
$ deno eval --location=http://localhost:3000 "console.log(origin)"
error: Uncaught (in promise) ReferenceError: origin is not defined
console.log(origin)
```

---

```
$ deno --version
deno 1.44.1 (release, x86_64-unknown-linux-gnu)
v8 12.6.228.3
typescript 5.4.5
```
Repository: flutter
Issue: Update `flutter create -t plugin` to recommend supporting both CocoaPods and Swift Package Manager
Labels: platform-ios,tool,platform-mac,P2,team-ios,triaged-ios

Flutter iOS and macOS are migrating from CocoaPods to Swift Package Manager. During this migration, plugins should support _both_ CocoaPods and Swift Package Manager.

Part of https://github.com/flutter/flutter/issues/126005
Repository: ollama
Issue: mac app silently fails to install CLI link if /usr/local/bin/ missing
Labels: bug,macos,install

### What is the issue?

Hi community, 
I have a MacOS Sonoma 14.4.1 and my Ollama version is 0.1.41. I moved the app to the Applications folder then run the app, click the Next button, then click the Install button to install the command line but nothing happens. I tried running as an admin but still faced the same problem. 

The temporary solution:

`sudo cp /Applications/Ollama.app/Contents/Resources/ollama /usr/local/bin/`

`sudo chmod +x /usr/local/bin/ollama`


`ollama --version`


### OS

macOS

### GPU

AMD

### CPU

Intel, AMD

### Ollama version

0.1.41
Repository: ollama
Issue: Add Ollama config file
Labels: feature request

I want to request a config file that allow user to manage models in the text form. This would allow us to sync in dotfiles, manage models very easily.

For example:
```yaml
// ~/.config/ollama/config.yaml

models:
  - name: llama3
  - name: llama3:70b
  - name: mistral:7b

config:
  - name: mistral
       max_input_tokens: 32000
```

Then in terminal, you can just run `ollama pull`, it will automatically pull all listed models, or `ollama purge` to clean up and keep only models in the config file

## Inspirations
https://asdf-vm.com/manage/configuration.html#tool-versions
https://mise.jdx.dev/configuration.html#mise-toml