sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: [Bug]: ExceedsStorageRange errors + sloooow experience with Storybook 8 + NextJS
Labels: bug,needs triage

### Describe the bug

I tried an upgrade to Storybook 8 and it works out of the box, but it's incredibly slow to build stories, and after building about 3-4 stories, clicking to the next one fails with a Rust-based error `ExceedsStorageRange`. We're also seeing TONS of logs like `[webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'SourceMapDevToolPlugin|__stories__-PaginationController-mdx.iframe.bundle.js': No serializer registered for ConcatSource` in the terminal when running `storybook dev`, which seems related. Some stories still load but it's a mixed bag. Also lots of errors around serializing large strings. It appears to be trying to serialize the webpack config itself? Also errors with `TerserWebpackPlugin`.

It's sort of usable in dev, but building with `storybook build` results in a hard fail every time, with the same `ExceedsStorageRange` as the cause and tons of printouts around the caching problems. Running with --debug-webpack just shows the webpack config and there's nothing unexpected there I can tell.

We're using storybook 8.0.4, `@storybook/nextjs` 8.0.4, react 18.2.0, and next 14.1.3, with SWC as the compiler and Webpack5. `lazyCompilation`, `fsCache`, `useSWC` are all on, as is `fastRefresh`. The only addon we have is `@storybook/addon-essentials` (also 8.0.4).

Probably related to caching woes but swapping between stories is ~30sec - 1 min to load most stories, but some are ~1 sec without much rhyme or reason. Storybook 7.6.x was around a second per story. A build takes 7+ minutes (to fail), up from about a minute with Storybook 7.6.x.

Maybe there's something obvious here, but I've tried also removing all webpack custom config from our `main.ts` in our Storybook setup and there's no change.

### To Reproduce

I can't share our private repo setup, but this does it:

Run `storybook build` with Storybook 8.0.4, `@storybook/nextjs` 8.0.4, react 18.2.0, and next 14.1.3, with SWC as the compiler and Webpack5. `lazyCompilation`, `fsCache`, `useSWC` are all on, as is `fastRefresh`. The only addon we have is `@storybook/addon-essentials` (also 8.0.4).

### System

```bash
System:
    OS: macOS 14.4
    CPU: (11) arm64 Apple M3 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.1 - ~/.nodenv/versions/18.19.1/bin/node
    npm: 8.5.1 - ~/.nodenv/versions/18.19.1/bin/npm
    pnpm: 8.14.1 - ~/.nodenv/versions/18.19.1/bin/pnpm <----- active
  Browsers:
    Chrome: 123.0.6312.59
    Safari: 17.4
```


### Additional context

_No response_
Repository: go
Issue: go/types: should the 'newer Go version' error be reported to Config.Error?
Labels: Tools

Since go1.21, `(*go/types.Checker).Files()` has returned an error when a package has a `GoVersion` (specified in `types.Config.GoVersion`) that is newer than the `go/types` library it is compiled against. [Error in question](https://cs.opensource.google/go/go/+/refs/tags/go1.21.8:src/go/types/check.go;l=358) is:
```
	if check.version.after(version{1, goversion.Version}) {
		return fmt.Errorf("package requires newer Go version %v", check.version)
	}
```

`x/tools/go/packages` was assuming the only `error` not reported to `types.Config.Error` was `types.errBadCgo`. Example  downstream issue: #65590. 

This issue is to decide whether this error should be reported to the `types.Config.Error` field, and if so how?

@griesemer @adonovan
Repository: transformers
Issue: Int4 transformers training
Labels: Feature request

### Feature request

There is a GitHub repo out with the necessary kernels and code (and a great paper) to train a transformer based models using int4. 

The authors use a couple of algorithms to get around the struggle of quantizing down to int4 including keeping non linear operators in fp16 to avoid certain quant issues, they solve the outlier problem by "propose a Hadamard quantizer (HQ) to solve the outlier problem. Its main idea is to quantize the matrices in another linear space which has fewer outliers."  The results they achieved were "We compare the training throughput of the FP16 PyTorch AMP and our INT4 training algorithm for training BERT [24] and GPT [37]-style language models on a system of 8 Nvidia A100 GPUs. We vary the hidden layer size, intermediate fully-connected layer size, and batch size, and plot the speedup of INT4 training in Fig. 5. Our INT4 training algorithm can achieve up to 35.1% speedup for BERT-style models and up to 26.5% speedup for GPT-style models." 

These results are without using Flash Attention which would increase gains further, and you could use the Galore 8bit optimizer, or better yet Deep speeds 1bit Adam optimizer, fully offloaded to the CPU. For optimized full fine tuning of large 7b models on consumer hardware.


This code and paper is for FFT but this same concept could apply directly for Lora and QLora.


Links:
[Paper](https://arxiv.org/pdf/2306.11987.pdf)
[Code](https://github.com/xijiu9/Train_Transformers_with_INT4)

### Motivation

Having int4 as a trainable dtype would provide a ton of utility. On 2 consumer 3090’s you get 1 TFLOP of compute according to Nvidia’s documentation. It would increase the training possibilities for the gpu poor. And significantly increase training speed on for server applications.

### Your contribution

Gathered information. I’m not very good at coding, at least not good enough to add to transformer repo. This might be too long of an endeavor, so if it is sorry for wasting your time, and we can close this feature request.
Repository: material-ui
Issue: Any plan for mention function with MUI Textarea
Labels: docs,support: question,component: TextareaAutosize

### Summary

Maybe, Many Enterprise system developers hope to use Mention Function. 
But There are no many options.
Also I tried to use the React-mentions package, but It's very hard to integrate with MUI design sysyem.

### Examples

https://react-mentions.vercel.app/

### Motivation

![image](https://github.com/mui/material-ui/assets/107383057/e7a06222-6816-4b9f-9d10-a3a16152a0b1)


**Search keywords**: react-mentions
Repository: pytorch
Issue: Deprecate `torch.nn.MultiHeadAttention` and `torch.nn.Transformer`-related modules 
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

This issue is WIP and is a placeholder to track discussion around the deprecation of `torch.nn.MultiHeadAttention` and `torch.nn.Transformer`-related `torch.nn` modules.

We observe that users would like transformer blocks to be performant and customizable. While these layers may provide an "out of the box" solution, they are monolithic modules.  Further, we note component-wise tools such as [`torch.nn.functional.scaled_dot_product_attention` ](https://www.google.com/search?q=scaled_dot_product_attention) (SDPA), [`torch.nn.attention.bias`](https://pytorch.org/docs/main/nn.attention.bias.html#module-torch.nn.attention.bias) and [`torch.nested`](https://pytorch.org/docs/main/nested.html#module-torch.nested) have been introduced to address the issues of customizability, composability and performance. 

While there have been efforts to improve the performance and customizability of the `Transformer`/`MHA` modules, such as the addition of new masks and "fast paths" in these modules gated by configuration checks, we note that there have also been [several issues surrounding these modules](https://github.com/pytorch/pytorch/labels/oncall%3A%20transformer%2Fmha).

Examples of issues around these modules include
- Confusion around various arguments
     -  https://github.com/pytorch/pytorch/issues/118972
     - Definition of `attn_mask` is flipped compared to SDPA/implementation in other frameworks https://github.com/pytorch/pytorch/pull/120668
     - https://github.com/pytorch/pytorch/issues/121193

- Performance related issues
    -  https://github.com/pytorch/pytorch/issues/116175
    - https://github.com/pytorch/pytorch/issues/94428
    
- Bugs related to the "fast path"
   -  https://github.com/pytorch/pytorch/issues/116546
   - https://github.com/pytorch/pytorch/issues/107084
   

We also recognize that if these modules are to be deprecated, we would need to provide guidance to users on how to create a drop-in replacement using the aforementioned composable building blocks. To that end, @jbschlosser has been prototyping this with nested tensors, torch.compile and SDPA (see tutorial PR [here](https://github.com/pytorch/tutorials/pull/2813)).


cc @albanD @mruberry @jbschlosser @walterddr @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: godot
Issue: Sprite 3D texture rendering is broken frame 1
Labels: bug,topic:rendering,topic:3d

### Tested versions

- Reproductible in v4.3.dev5.official [89f70e98d]

### System information

Windows 10 - v4.3.dev5.official [89f70e98d] using Mobile or Forward+ AMD RX 5600 XT

### Issue description

When using a Sprite3D and instancing a Card (my scene) containing a Sprite3D inside a Viewport with a camera, rendered in 2D using a Sprite2D with a ViewportTexture, when instancing the Card during the first frame the texture will be rendered incorectly
![image](https://github.com/godotengine/godot/assets/68186078/bd6b4146-cbae-4ebf-89a5-f4ce637b12f2)
Using the Compatibility renderer fix the issue

### Steps to reproduce

i can't figure out how to reproduce the error, but here is the node tree
![image](https://github.com/godotengine/godot/assets/68186078/57607933-8bc2-4f40-a103-25572e9b7d92)

### Minimal reproduction project (MRP)

i was unable to reproduce the issue on an other project so here's mine, the card is saved inside "card.tscn"
[bug_report.zip](https://github.com/godotengine/godot/files/14750940/bug_report.zip)
Repository: deno
Issue: In deno tasks, automatically add `$DENO_DIR/bin` to `PATH`
Labels: suggestion,task runner

(Should this issue be in the deno_task_shell repo? Apologies if so.)

I am writing a Deno web app intended to be run by people who might not otherwise use Deno. I use Deno tasks for starting the server.

A user had downloaded Deno but hadn't added it to their PATH, and was trying to run the project with the command `~/.deno/bin/deno task run`, which failed since the `run` task calls Deno recursively.

As far as I can tell, my tasks cannot predict where Deno will be downloaded, and (I assume?) calling Deno within tasks is a common use case.

I propose that the Deno installation directory be prepended to the PATH environment variable before running tasks. This will work for tasks, shell scripts and shebangs since they all will inherit the environment from the `deno task` process.
Repository: create-react-app
Issue: use parameter decorator
Labels: needs triage,issue: bug report

Module parse failed: Unexpected character '@' (9:13)
File was processed with these loaders:
 * ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ./node_modules/babel-loader/lib/index.js
 * ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
Repository: ollama
Issue: Token limit
Labels: feature request,api

Ollama should stop generation after a token limit to avoid infinite generation

* Add a `done_reason` field in the return object of the generate/chat apis, which defaults to `stop` if hit a stop word, `limit` if the context window size is hit
* Truncate chat prompts more aggressively so we always have at least 25% of the context window available for generation
Repository: rust
Issue: Recursive async functions don't internally implement auto traits
Labels: A-trait-system,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,A-auto-traits,WG-async,fixed-by-next-solver

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
fn spawn<F: Send>(_f: F) {}

pub async fn recur() {
    spawn(recur())
}
```

I expected to see this happen: Compiles successfully.

Instead, this happened:

```rust
error: cannot check whether the hidden type of opaque type satisfies auto traits
 --> src/lib.rs:4:11
  |
4 |     spawn(recur())
  |     ----- ^^^^^^^
  |     |
  |     required by a bound introduced by this call
  |
note: opaque type is declared here
 --> src/lib.rs:3:1
  |
3 | pub async fn recur() {
  | ^^^^^^^^^^^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
 --> src/lib.rs:3:14
  |
3 | pub async fn recur() {
  |              ^^^^^
note: required by a bound in `spawn`
 --> src/lib.rs:1:13
  |
1 | fn spawn<F: Send>(_f: F) {}
  |             ^^^^ required by this bound in `spawn`
```

It seems like recursive async functions only externally implement auto traits like `Send`. If you require `Send` inside its own body, then the function does not compile. This is extra unfortunate because recursive async functions require indirection, and one way of achieving that is by spawning it on a multithreaded executor. The diagnostic is also unhelpful. I'm not sure what it's actually for, but it sounds impossible to apply to this situation. The real solution I found is to manually desugar the async function into a regular function that returns an `impl Future + Send`:

```rust
fn spawn<F: Send>(_f: F) {}

pub fn recur() -> impl core::future::Future<Output = ()> + Send {
    async {
        spawn(recur())
    }
}
```

However, it would be ideal if the original was allowed as-is.

This is similar to #119727 but without the cycle error.

This was originally found in URLO: [With tokio, “future returned by ‘a’ is not ‘Send’”, with tiny example](https://users.rust-lang.org/t/with-tokio-future-returned-by-a-is-not-send-with-tiny-example/108884)

### Meta

rustc 1.79.0-nightly 2024-03-24 from play.rust-lang.org
Repository: pytorch
Issue: Please consider adding MIG (MI-rror with G-radient modification) to torch.nn
Labels: module: nn,triaged,needs research

### 🚀 The feature, motivation and pitch

https://github.com/YagaoDirac/Pytorch-extension-from-YagaoDirac-v2/blob/main/v2%20with%20basic%20test.py
I implemented this 2 weeks ago. It's probably a better implementation of the Linear layer. It speeds up the training while let people stack much more such layers directly without any trick.

### Alternatives

In the code I implemented 3 different types of similar purpose. Each of them are tested and can work individually( if my tests are not too wrong).


### Additional context

Also, if you decide to add this to pytorch, remember to rename it.
Notice the "untested workflow" in the file. It's probably a better way, and can be integreted into the layer itself.
More info in the file.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: godot
Issue: Particles2D have wrong Visibility Rect display when using Particles Animation
Labels: bug,needs testing,topic:2d,topic:particles

### Tested versions

3.5.3

### System information

Windows10, 3.5.3

### Issue description

Particls2D have wrong Visibility Rect display when using Particals Animation of CanvasItemMaterial with a spritesheet to randomize the particle, the rect's all 4 parameter(x/y/w/h) gets devided by Particles Anim H/V.

### Steps to reproduce

[test.zip](https://github.com/godotengine/godot/files/14751917/test.zip)


### Minimal reproduction project (MRP)

see test project
Repository: next.js
Issue: Middleware source map is missing when in standalone mode
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/seanparmelee/nextjs-middleware-source-map

### To Reproduce

1. Run `npm run build`
2. Examine the `.next/standalone/.next/server/` directory and note that `middleware.js.map` does not exist.
3. Examine the `.next/server/` directory and note that `middleware.js.map` does exist.

### Current vs. Expected behavior

### Expected Behavior
Given an application that's using [middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware) and built in [standalone mode](https://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files), I'd expect to find a `.next/standalone/.next/server/middleware.js.map` file as that's where the `sourceMappingURL` in `.next/standalone/.next/server/middleware.js` file is referencing.

### Current Behavior
The `.next/standalone/.next/server/middleware.js.map` file does not exisst, but there is  `.next/server/middleware.js.map`.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.2
Relevant Packages:
  next: 14.2.0-canary.43 // Latest available version is detected (14.2.0-canary.43).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: standalone
```


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

Middleware / Edge (API routes, runtime)

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

next build (local)

### Additional context

We're ultimately copying the `.next/standalone` folder into a docker image and using `@sentry/nextjs` to upload the source maps so they can be incorporated into our Sentry issues. At the moment, it cannot find the source map for the `middleware.ts` file but I suspect we can workaround this in the meantime if we manually copy over the one from `.next/server/`.
Repository: pytorch
Issue: pointless_convert graph pattern can worsen performance in certain cases.
Labels: triaged,module: inductor

### 🐛 Describe the bug

`pointless_convert` removes chains of dtype conversions: https://github.com/pytorch/pytorch/blob/main/torch/_inductor/fx_passes/joint_graph.py#L316

However, in the case that we have something like `(x: dtype=torch.float32).to(dtype=torch.bfloat16).to(dtype=torch.float32)`, removing this extraneous dtype conversion can worsen performance by losing the opportunity to write out the smaller dtype compared to the larger one. 

### Versions

N/A

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @amjames @desertfire @chauhang
Repository: stable-diffusion-webui
Issue: [Bug]: Trained a fresh SDXL Lora from Kohya_ss. Auto1111 doesn't see it, but FOOOCUS does
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

I trained an SDXL lora from Kohya. Both a SD1.5 and an SDXL using the same image data set/captioning. 

Auto1111 does not see the SDXL Lora, but sees the SD1.5. Forge doesn't see it either, but FOOOCUS can see, and use the LoRA as intended.

### Steps to reproduce the problem

Put an SDXL Lora trained with the current version of Kohya, into the LORA folder.
LORA doesn't show up in the GUI

### What should have happened?

LORA should be visible, and usable in the GUI

### What browsers do you use to access the UI ?

Google Chrome

### Sysinfo

[sysinfo-2024-03-26-05-11.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/14752793/sysinfo-2024-03-26-05-11.json)


### Console logs

```Shell
Nothing in console
```


### Additional information

_No response_
Repository: pytorch
Issue: elastic agent kill hang process when other processes timeout
Labels: oncall: distributed,triaged,module: elastic

### 🐛 Describe the bug

When using multiprocess training, if process A hangs, another process B may be aborted because of timeout. The elastic agent will consequently shutdown process A after receiving the death signal from process B. In this case, how can we analyze the reason why process A hangs? Can PyTorch provide a mechanism to get the stack of process A before killing it, or just provide a debug mode that dose not kill any process?

### Versions

PyTorch version: 2.1.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (aarch64)
GCC version: (GCC) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.22.0
Libc version: glibc-2.27

Python version: 3.8.18 (default, Sep 11 2023, 13:19:25)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.15.0-112-generic-aarch64-with-glibc2.26
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k @dzhulgakov @rohan-varma
Repository: svelte
Issue: Concerns about textarea @html example
Labels: documentation

**Please describe the example enhancement**
I'm sure this isn't the only example on svelte.dev that has this, but [this example](https://svelte.dev/examples/textarea-inputs) which happens to be one of the first results when searching for "textarea svelte":
```svelte
<script>
	import { marked } from 'marked';
	let text = `Some words are *italic*, some are **bold**`;
</script>

<textarea bind:value={text} />

{@html marked(text)}
```
This shows an example for enabling markdown using `marked`, but this of course disables text sanitization and opens up an extremely easy XSS attack, and while it is the developer's responsibility at the end of the day, it would be helpful to provide a small warning, perhaps as a comment, or even modify the example to sanitize `text`, as some developers are not aware of XSS attacks and the significance of disabling such protections for text.
It's not too easy to sanitize it either as you would likely have to import some HTML sanitization library, sanitize `text`, then pass it on to `marked` so the actual markdown HTML does not get sanitized, and eventually `@html`, which I would imagine would end up causing negligence on the developer's side and end up ignoring the blaring security flaw.

I'm not sure if this kind of feedback is accepted, and yes the example is local although I would imagine a lot of developers would adapt this code into their own apps for remote user-specified content, but I'd like to leave it anyways.
- [x] the example stays focused on a specific use case or technology
- [x] the example stays self-contained and easy to grasp
- [x] the example stays stable and does not require much maintenance