sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [AOTI][UX] One has no way of knowing whether they need to load DSO  as CPU or CUDA runner
Labels: triaged,oncall: pt2,module: aotinductor

### 🐛 Describe the bug

Right now Inductor API offers no way queuing whether given DSO target CUDA or CPU

And attempts to load CUDA binaries in CPU corrupts CUDA context, so trick like
```cpp
try {
  runner = new torch::inductor::AOTIModelContainerRunnerCpu(model_path);
} catch (std::runtime_error& e) {
  runner = new torch::inductor::AOTIModelContainerRunnerCuda(model_path);
}
```

does not work (though if invoked in opposite order it does, but it might change in the future)

Two proposals:
 - As right now AOTI is limited to one architecture it should simple check whether device it's being instantiated on matches the one it's been exported from
 - In a longer term, one should have an API to query whether model was created for CUDA or CPU (or may be even for both)

### Versions

2.3.0, nightly

cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @desertfire @chenyang78
Repository: svelte
Issue: Svelte 5: Tell if a bindable prop is actually passed using bind
Labels: needs discussion

### Describe the problem

Svelte 5 warns when non-binded props are mutated which is a very good thing to avoid unexpected side effect.

However, there is no way to tell if a prop is actually binded or not, or at least if there is it doesn't appear to be documented.

Shallow/deep copy could be avoided in some scenarios where performance matter if it's not even used.

### Describe the proposed solution

Here is a real life possible scenario where you might just want to call a callback with the new values without mutating the actual passed value.


```javascript

<!-- MyComponent.svelte -->
<script>
let { values = $bindable(), onChange } = $props();

const addValue = (newValue) => {
  if (isBindedProp(values)) {
    values ||= [];
    values.push(newValue);
    onChange?.(values);
  } else {
    onChange?.([...(values || []), newValue]);
  }  
};
</script>

....

<!-- Somewhere -->
<MyComponent bind:values={...}>

<!-- Somewhere else -->
<MyComponent values={...} onChange{...}>
```

### Importance

must have.

Svelte 4 librairies should be able to tell that as well to preserve compatibility without switching to runes
Repository: transformers
Issue: Add IRIS
Labels: New model

### Model description

IRIS (Imagination with auto-Regression over an Inner Speech) is a Reinforcement learning agent trained in the imagination of a world model composed of a discrete autoencoder and an autoregressive Transformer. IRIS learns behaviors by accurately simulating millions of trajectories.

The approach presented in the paper casts dynamics learning as a sequence modeling problem, where an autoencoder builds a language of image tokens and a Transformer composes that language over time.

The agent is introduced in the paper titled [TRANSFORMERS ARE SAMPLE-EFFICIENT WORLD MODELS](https://arxiv.org/abs/2209.00588).

There is also a [medium blog post](https://medium.com/@cedric.vandelaer/paper-review-transformers-are-sample-efficient-world-models-d0f9144f9c09) to understand how the algorithm works.



### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

The model is adapted from the [official code repository](https://github.com/eloialonso/iris) of the paper.

The officially released weights can be found on this [Github repository](https://github.com/eloialonso/iris_pretrained_models)
Repository: pytorch
Issue: Error: Exporting the operator 'aten::searchsorted' to ONNX opset version 17
Labels: module: onnx,triaged

### 🚀 The feature, motivation and pitch

Dear experts,

I am attempting to export a normalizing flows model built using the Zuko libraries, which are based on PyTorch, to ONNX. However, I am encountering the following error:

> Failed to export model: Exporting the operator 'aten::searchsorted' to ONNX opset version 17 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.

I am following the error suggestion and reporting it as an issue. Also, here is the fully reproducible code:

    import torch 
    import torch.utils.data as data
    import zuko
    import numpy as np
    import onnxruntime as ort

    class WrappedNSF(torch.nn.Module):
        def __init__(self):
            super(WrappedNSF, self).__init__()
            self.flow = zuko.flows.NSF(features=2, transforms=3, hidden_features=(64, 64))
        
        def forward(self, x):
            result = self.flow().transform(x)
            return result

    def two_moons(n: int, sigma: float = 1e-1):
        theta = 2 * torch.pi * torch.rand(n)
        label = (theta > torch.pi).float()

        x = torch.stack((
            torch.cos(theta) + label - 1 / 2,
            torch.sin(theta) + label / 2 - 1 / 4,
        ), axis=-1)

        return torch.normal(x, sigma), label

    samples, labels = two_moons(16384)

    samples_tensor = samples.clone().detach()

    trainset = data.TensorDataset(samples, labels)
    trainloader = data.DataLoader(trainset, batch_size=64, shuffle=True)

    model = WrappedNSF()
    model.eval()  

    dummy_input = torch.randn(1, 2)  

    output = model(dummy_input)
    print("Sample output:", output)

    # Attempt to export the model to ONNX
    try:
        torch.onnx.export(model,               # Wrapped model instance
                        dummy_input,         # Model input (or a tuple for multiple inputs)
                        "wrapped_flow_model.onnx",  # Output ONNX file path
                        export_params=True,    # Store the trained parameter weights inside the model file
                        opset_version=17,      # ONNX version to export the model to
                        do_constant_folding=True,  # Optimization: constant folding
                        input_names=['input'],     # Model's input names
                        output_names=['output'],   # Model's output names
                        dynamic_axes={'input': {0: 'batch_size'},  # Variable length axes
                                        'output': {0: 'batch_size'}})
        print("Model exported successfully.")
    except Exception as e:
        print("Failed to export model:", str(e))`
        


### Alternatives

_No response_

### Additional context

torch version: '2.2.1'
Repository: next.js
Issue: 404 when redirecting in server action with subdomain rewrite rule
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/lukemorton/next-testing

### To Reproduce

1. Add admin.localhost to /etc/hosts
2. Run development server
3. Navigate to http://admin.localhost:3000/a
4. Submit form

### Current vs. Expected behavior

When you submit the form, the redirect in the server action attempts to redirect to /b but 404s instead even though the URL exists. If you refresh the page works. 

In the example attached there is also a `<Link />` on /a which navigates fine to /b.

Appears to be an issue with redirect specifically in server actions.

Could not reproduce without the subdomain rewrite rule in `next.config.mjs`.

Could not reproduce when redirecting with relative URLs — changing from `redirect("/b")` to `redirect("./b")` fixes the issue.

I have been able to reproduce on Vercel with similar subdomain rewrite rule so not just related to localhost.

Expected behaviour: no 404 occurs when redirecting in a server action when I have rewrite rules in my application. 

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:52 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8112
  Available memory (MB): 24576
  Available CPU cores: 8
Binaries:
  Node: 20.13.1
  npm: 10.7.0
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Navigation

### Which stage(s) are affected? (Select all that apply)

next dev (local), Vercel (Deployed)

### Additional context

This issue started in 14.2.1. Appears to be fine in 14.1.3 and so we are holding back any further updates at our organisation.
Repository: pytorch
Issue: [RFC] Raising minimal glibc support to: glibc2_28 . Deprecation support for Amazon Linux 2 support
Labels: module: binaries,oncall: releng,triaged

### 🐛 Describe the bug

Please refer to following issue: https://github.com/pytorch/pytorch/issues/123649

With Migration to manylinux_2_28 (AlmaLinux 8 based) we would not be able to support OS distros with glibc2_26
https://github.com/pytorch/pytorch/issues/123649#issuecomment-2081540488

Here is the list of OS's and their GlibC versions:
https://repology.org/project/glibc/versions

As per this comment: https://github.com/pytorch/pytorch/issues/123649#issuecomment-2105123526
Suggestion is to still use old wheels for 2.4, announce the deprecation of old wheels during the release. For Release 2.5 - Use only new wheels. 

As per: [aws.amazon.com/amazon-linux-2/faqs](https://aws.amazon.com/amazon-linux-2/faqs/)
Amazon Linux 2 EOL: 2025-06-30

### Versions

2.5.0

cc @seemethere @malfet @osalpekar @pytorch/pytorch-dev-infra @ezyang @albanD @snadampal
Repository: node
Issue: AsyncLocalStorage loses the store if used together with createHook if there is a async function in between
Labels: async_hooks

Consider the following code:

```js
import { AsyncLocalStorage, createHook } from 'node:async_hooks';
import { notEqual } from 'assert/strict';

const hook = createHook({
  init () {},
})

// Commenting out this line will make the bug go away
hook.enable();

const asyncLocalStorage = new AsyncLocalStorage();

async function main () {
  // Commenting out this line will make the bug go away
  await 1
  asyncLocalStorage.enterWith({ foo: 'bar' });
}

await main()

console.log(executionAsyncResource());

// Should not be undefined
notEqual(asyncLocalStorage.getStore(), undefined);
```

Note that:

1. disabling the hook solve the problem
2. removing the `await 1` promise solves the problem

---

Debugging the `executionAsyncResource()` in this case:

```
Promise {
  <pending>,
  [Symbol(async_id_symbol)]: 12,
  [Symbol(trigger_async_id_symbol)]: 9
}
```

while in without the `createHook().enable()` call:

```
{ [Symbol(kResourceStore)]: { foo: 'bar' } }
```
Repository: go
Issue: x/net/ipv4: SetTOS should return errNotImplemented on Windows
Labels: OS-Windows,NeedsInvestigation

### Go version

go version go1.22.3 darwin/arm64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE=''
GOARCH='arm64'
GOBIN='/Users/gopher/go/bin'
GOCACHE='/Users/gopher/Library/Caches/go-build'
GOENV='/Users/gopher/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/gopher/go/pkg/mod'
GOOS='darwin'
GOPATH='/Users/gopher/go'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.3/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.3/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/gopher/reproduce/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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/68/ch3mzzs55bz8x9mzk1dsd35c0000gn/T/go-build1659040423=/tmp/go-build -gno-record-gcc-switches -fno-common'
```


### What did you do?

I cross build on MacOS for Windows so the version and env above is all output for MacOS but this issue is created for the Windows implementation of SetTOS.

See the following code:

```go
package main

import (
	"flag"
	"log"
	"net"

	"golang.org/x/net/ipv4"
)

func main() {
	name := flag.String("i", "Ethernet", "interface name")
	flag.Parse()

	iface, err := net.InterfaceByName(*name)
	if err != nil {
		log.Fatalf("%v", err)
	}

	group := &net.UDPAddr{IP: net.ParseIP("224.0.0.1"), Port: 1234}
	conn, err := net.ListenPacket("udp4", "224.0.0.1:1234")
	if err != nil {
		log.Fatalf("%v", err)
	}

	p := ipv4.NewPacketConn(conn)
	p.SetMulticastInterface(iface)

	if err := p.JoinGroup(iface, &net.UDPAddr{IP: group.IP}); err != nil {
		log.Fatalf("%v", err)
	}

	err = p.SetTOS(0x40)
	if err != nil {
		log.Fatalf("%v", err)
	}
	_, err = p.WriteTo([]byte("test1"), nil, group)
	if err != nil {
		log.Fatalf("%v", err)
	}
}
```

### What did you see happen?

The code runs successful on Windows but does not set the TOS value on the outgoing UDP packet.

### What did you expect to see?

According to the [document](https://learn.microsoft.com/en-gb/windows/win32/winsock/ipproto-ip-socket-options?redirectedfrom=MSDN) that is referenced by [the source code](https://cs.opensource.google/go/x/net/+/refs/tags/v0.25.0:ipv4/sys_windows.go;l=30) the `IP_TOS` is described as `Do not use` as the TOS cannot be set programmatically.

I would think it would be better to remove [this line](https://cs.opensource.google/go/x/net/+/refs/tags/v0.25.0:ipv4/sys_windows.go;l=35) from the code and make calling `SetTOS` on Windows fail with an error because currently the call seems to succeed without any effect to the actual packet.
Repository: next.js
Issue: Build Error when trying to compile with 'use client' files.
Labels: bug,Module Resolution

### Link to the code that reproduces this issue

https://github.com/iliacodes/test

### To Reproduce

Run `npx create-next-app@latest`

Create a new component with simple text.

Run `npm run dev`

Change component by adding 'use client' to top of file.

Run `npm run dev`

### Current vs. Expected behavior

Current behavior:

```
Build Error
Failed to compile

Next.js (14.2.3)
./src/components/Test.tsx
Module parse failed: Expecting Unicode escape sequence \uXXXX (2:55)
| import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy"
> const proxy = createProxy(String.raw`C:\Users\<user>\Desktop\RepGrp\test\src\components\Test.tsx`)
| 
| // Accessing the __esModule property and exporting $$typeof are required here.
This error occurred during the build process and can only be dismissed by fixing the error._
```

Expected behavior:
To display text in component in expected area.

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 16302
  Available CPU cores: 16
Binaries:
  Node: 20.12.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


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

Module Resolution

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

next build (local), Vercel (Deployed)

### Additional context

My username has backticks, haven't really had many issues previously. Figured that must be it. I created a new docker container and the code worked as expected.

After, I google'd and found a discussion previously addressing this issue in 2023
https://github.com/vercel/next.js/discussions/47736

The issue seemed to have been closed when users updated to 13.3.1-canary.4 and only effected windows users.

Therefore, I tried this version and the 'use client' file worked as expected.
Repository: go
Issue: cmd/link: support relocations typical with -mcmodel=medium with internal linking
Labels: NeedsInvestigation,compiler/runtime

TLDR: it would useful if the Go linker could be changed to add support for relocations typically emitted by C compilers for code built with -mcmodel=medium.

More detail:

Consider this program (using txtar format):

```

-- go.mod --
module mcmodel.medium

go 1.23
-- main.go --
package main

import mcmodel "mcmodel.medium/mm"

func main() {
	println(mcmodel.Foo(1))
}
-- mm/bar.go --
package mcmodel

/*

#cgo CFLAGS: -mlarge-data-threshold=3  -mcmodel=medium

#include "defs.h"

LL ExtBigVar;

int ExtSmallVar;
*/
import "C"

func Bar(q int) int {
	return 43
}
-- mm/foo.go --
package mcmodel

/*

#cgo CFLAGS: -mlarge-data-threshold=3  -mcmodel=medium

#include "defs.h"

LL BigVar;

extern LL ExtBigVar;

int SmallVar;

extern int ExtSmallVar;

int ret1() {
  printf("%d %d\n", SmallVar, ExtSmallVar);
  return SmallVar + ExtSmallVar;
}

int ret2() {
  printf("%d %d\n", BigVar.x, ExtBigVar.x);
  return BigVar.x + ExtBigVar.x;
}
*/
import "C"

func Foo(x int) int {
	return Bar(x) + int(C.ret1()+C.ret2())
}
```

This code currently will not build due to "-mcmodel" etc not being on the allowlist for CGO cflags, but if you hack the go command to allow these options, then build:

```
# externl linking works
$ CC=cc go build .
# internal linking does not
$ CC=cc go build -ldflags=-linkmode=internal
# mcmodel.medium
$ WORK/b002/_pkg_.a(_x003.o): unknown relocation type 26; compiled without -fpic?
$
```

Note the "unknown relocation type 26". This is R_X86_64_GOTPC32; this reloc and R_X86_64_GOTOFF64 are frequently generated when building with the medium code model. 

It would be useful to ungrade the linker to handle these relocations; this is not a critical problem by any means since we can always fall back on external linking, but given the increased prevalence of "-mcmodel=medium" out in the wild for building very large programs, it might well be a good thing for us to add support for this.

NB: patch required to get to this to build with go command is below.

```
$ git diff
diff --git a/src/cmd/go/internal/work/security.go b/src/cmd/go/internal/work/security.go
index 8e788b0425..1c9d466189 100644
--- a/src/cmd/go/internal/work/security.go
+++ b/src/cmd/go/internal/work/security.go
@@ -117,6 +117,8 @@ var validCompilerFlags = []*lazyregexp.Regexp{
        re(`-mthumb(-interwork)?`),
        re(`-mthreads`),
        re(`-mwindows`),
+       re(`-mcmodel=(.+)`),
+       re(`-mlarge-data-threshold=(.+)`),
        re(`-no-canonical-prefixes`),
        re(`--param=ssp-buffer-size=[0-9]*`),
        re(`-pedantic(-errors)?`),
$ 
```

Related google-internal bug: b/341263385.

For some background on just exactly what `-mcmodel=medium` implies, see Eli's [blog post](https://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models).
Repository: go
Issue: cmd/compile/internal/types2: compiler internal hook needs study/revision/repair
Labels: NeedsInvestigation,compiler/runtime

For purposes of supporting a corner case in rangefunc iterators, [CL 584596](https://go.dev/cl/584596) added a file containing a compiler hook (an additional method on `*types2.Signature`) to types2.  This is irksome, but was the least-bad choice we could devise in the available time.  It would be nice to do better in the future.
Repository: PowerToys
Issue: Power Toys AoT - No Activation Sound
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.80.1

### Installation method

GitHub, Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Always on Top

[PowerToysReport_2024-05-17-21-38-00.zip](https://github.com/microsoft/PowerToys/files/15360708/PowerToysReport_2024-05-17-21-38-00.zip)


### Steps to reproduce

I installed via GitHub and second time around via Microsoft Store.

Below are my settings:
{"properties":{"hotkey":{"value":{"win":true,"ctrl":true,"alt":false,"shift":false,"code":84,"key":""}},"frame-enabled":{"value":true},"frame-thickness":{"value":4},"frame-color":{"value":"#0099cc"},"frame-opacity":{"value":21},"frame-accent-color":{"value":true},"sound-enabled":{"value":true},"do-not-activate-on-game-mode":{"value":false},"excluded-apps":{"value":""},"round-corners-enabled":{"value":true}},"name":"AlwaysOnTop","version":"0.0.1"}

Actions taken already:
1. Restarted Computer
2. Restarted Windows Audio service
3. Uninstalled Power Toys application and reinstalled.
4. Changed the playback to various outputs.
5. Toggled the Sound on AoT settings.

All these actions were unsuccessful.

### ✔️ Expected Behavior

When pressing Ctrl + Win + T, I expect to hear an activation sound letting me know it pinned a window.

### ❌ Actual Behavior

It pins the window, however, there is no activation sound.

### Other Software

_No response_
Repository: flutter
Issue: `flutter update-packages` does not update version file used by pub
Labels: P2,team-tool,triaged-tool

There are likely other situations where this happens, but this is how I was able to consistently reproduce the problem:

1) Clone flutter from a fork (it's important that it's cloned from a fork because those are missing tags): `git clone git@github.com:goderbauer/flutter.git`
2) Run .`/bin/flutter update-packages -v` inside the cloned repository and notice it fails because pub cannot determine the current version of the flutter SDK, it incorrectly thinks it is `0.0.0-unknown`. This is because the clone from the fork is missing the version tags.
3) Add the upstream repository (`git remote add upstream git@github.com:flutter/flutter.git`) and fetch tags (`git fetch upstream`)
4) Check that you have all the tags now (`git tag`)
5) Run `/bin/flutter update-packages -v` - unexpectedly it still fails with the same error. 🔥 

Surprisingly, the problem goes away when you run `flutter doctor`. After that, `/bin/flutter update-packages -v` succeeds.

Speculation of what is going wrong: The pub tool obtains the current version of the flutter SDK from the `bin/cache/flutter.version.json` file, which is maintained by the flutter tool. The file is created when `flutter update-packages` is run for the first time in step 2 above. At this point, due to the missing version tags, the version cannot be determined and `0.0.0-unknown` is written into that file. After the tags have been fetched, the flutter tool needs to update the version file when `update packages` is run a second time in step 5 above, but it fails to do that, causing pub to fail again because it still sees the incorrect old version in the version file.

The version file is updated when running `flutter doctor`, so that subsequent calls to `flutter update-packages` then pass.

Conclusion: The pub tool relies on the version file to be up-to-date. So, whenever the flutter tool calls out to pub it needs to make sure that the version file is up-to-date to avoid this failure mode.

cc @christopherfujino in case you have additional context.
Repository: go
Issue: x/tools/gopls: feature: integrate "spaghetti" dependency analysis
Labels: FeatureRequest,gopls

https://github.com/adonovan/spaghetti is a static analysis tool for Go that helps you find out why your application depends on a given package, and lets you visualize what your dependencies would be if a given set of imports were eliminated. This can help you understand what work is required to break a dependency on a package that is undesirable, for instance because it is insecure, buggy, unmaintained or legally problematic.

Using its new web server, Gopls could integrate this tool to make it easier to find and invoke. For example, a Code Action associated with the go.mod file could invoke the tool to report the dependencies of that module, and a Code Action associated with a `package` declaration could invoke the tool to show how the main module depends on that package.