sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: building for mipsel, link fails on missing symbol __sync_fetch_and_add_8, which doesn't exist on mips and shouldn't be getting called
Labels: A-LLVM,I-ICE,O-MIPS,T-compiler,C-bug,A-code-coverage

I'm trying to build for mipsel-unknown-linux-gnu
x86_64 host, ubuntu 22.04
Freshly built from github source toolchain, with profiler = true in config.toml and mipsel-unknown-linux-gnu target as well as the host target. Built with x.py dist, using the stage 2 results as my build toolchain.

Building anything with RUSTFLAGS="-C instrument-coverage" set, leads to the following link error on several object files :

Single example:
```
src/index.crates.io-6f17d22bba15001f/hyper-0.14.26/src/common/buf.rs:33: undefined reference to `__sync_fetch_and_add_8'
```

Building the same code without the flag works fine. Resulting binary works fine.

Per the following GCC bug, MIPS 32 doesn't support 8 byte atomic operations:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56300

In the project/target/mipsel-unknown-linux-gnu folder, running 
```
grep -r __sync_fetch_and_add_8
```
Shows that nearly every file includes a call to this non-existent function. I assume it's coming from the profiler somehow. 

Executing the same command in my toolchain build/x86_64-unknown-linux-gnu/stage2

```
grep: lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-16-rust-1.72.0-nightly.so: binary file matches
grep: lib/libLLVM-16-rust-1.72.0-nightly.so: binary file matches
```

This is where I get stuck. The mipsel rust standard lib is under that directory, so my grep should catch any calls to __sync_fetch_and_add_8 contained in the standard lib. There don't appear to be any. The only cases I find are in libLLVM, which is built for x86_64. It's reasonable for them to be there, since x86_64 does support __sync_fetch_and_add_8.

You'll have to forgive my ignorance here, I'm still quite new to rust. I don't understand the intricacies of the build process well enough to figure out how a call to __sync_fetch_and_add_8 is getting pulled into object files targeting MIPS, when the only library instance of a call to there is in the x86_64 library. 

What I am fairly certain of though is that it shouldn't be getting pulled in.
Repository: storybook
Issue: [Bug]: Storybook 7.x storysource addon doesn't show whole story code
Labels: bug,help wanted,addon: storysource,sev:S3

### Describe the bug

I have a problem with the Storybook addon Storysource after migration from Storybook 6.x to Storybook 7.x. In Storybook 6.x I was able to see the whole story code, but now I am able only to see args content.

![image](https://github.com/storybookjs/storybook/assets/2056746/d64c5d0c-59fc-418e-a152-89fe2223b991)

### To Reproduce

here is repo: https://github.com/Podlipny/storybook-storysource-issue

just `npm i` and `npm storybook`, tab `code` should contain whole story code

### System

```shell
Storybook 7 and newer
```


### Additional context

_No response_
Repository: flutter
Issue: AnimatedList - Handle list changes internally via Myers algorithm
Labels: c: new feature,framework,f: scrolling,would be a good package,c: proposal,P3,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Noticed plenty of libraries handling the intricacies of AnimatedList in a compact internal manner, implicitly calculating the changes between two lists using the MyersDiff algorithm and animating between them. It gets complex fast when you have a Streambuilder that is updating AnimatedList! Would be nice to handle this natively by the Flutter library:

https://pub.dev/packages/great_list_view
https://pub.dev/packages/animated_list_plus

And old issue explaining what could be improved:
https://github.com/flutter/flutter/issues/26708

Even the "official" example has a pretty complex model for syncing the two lists, the external and the internal: https://api.flutter.dev/flutter/widgets/AnimatedList-class.html

### Proposal

Some libraries are already attempting to handle the issue. But a native Flutter solution could be nice.
Repository: go
Issue: proposal: os/exec: add LookPath equivalent where PATH can be specified
Labels: Proposal

`os/exec.LookPath` contains robust logic for looking up paths cross-platform. However, it is always based on the value of the `PATH` environment variable; there are cases where one might like to employ the same logic but using a `PATH` that has come from elsewhere. My current motivating example relates to [remote build execution](https://github.com/bazelbuild/remote-apis/blob/main/build/bazel/remote/execution/v2/remote_execution.proto#L565) where it may be based on an incoming RPC, I expect others to exist in the wild as well.

In terms of prior art, this seems a little similar to `os.Expand` and `os.ExpandEnv` which offer the same option of using the environment or not. We can't match the naming convention of those though so the best suggestion I have is `exec.LookPathFrom(file, path string) (string, error)`.

I anticipate the implementation of this being straightforward, and it shouldn't represent significant additional maintenance in future. I'm of course happy to raise the PR if this proposal is accepted.

### Alternatives

In the absence of this function, one could set the `PATH` variable to the desired value, use `LookPath`, then reset it back again. This is slightly more work but more importantly is mutating global process state, and is therefore not safe to use if multiple goroutines might execute the same code concurrently.

Possibly a more likely solution is that you'd write some code to do this yourself. That isn't so hard on the face of it, but looking at the actual implementation in `exec`, it seems unlikely that most implementations would be diligent enough to mimic all the cross-platform nuances or the various edge/error cases that are checked. It would of course also be nice to get updates or fixes to it as well (the command path security changes from 1.19 would be a good example of that).
Repository: pytorch
Issue: Discussion and Design  for Masked Loss Functions which can be used with PackedSequence training (but not exclusively)
Labels: module: loss,triaged,module: masked operators

### 🚀 The feature, motivation and pitch

Original idea for these come from [Github Gist] that helps reproduce [Issue 102911][packed seqs on mps] ([PackedSequences on MPS accelerator yields grad_y missing or crashes the kernel][packed seqs on mps])


See: [PR][Pull Request]

[packed seqs on mps]: https://github.com/pytorch/pytorch/issues/102911
[packed sequence failure]: https://github.com/pytorch/pytorch/issues/97552
[loss error on m1]: https://github.com/pytorch/pytorch/issues/96416
[grad_y missing fix]: https://github.com/pytorch/pytorch/pull/96601
[gru nan]: https://github.com/pytorch/pytorch/issues/94691
[Github Gist]: https://gist.github.com/dsm-72/1cea0601145a8b92155d8d08c90bf998
[Results]: https://github.com/pytorch/pytorch/issues/94691#issuecomment-1574365231
[Pull Request]: https://github.com/pytorch/pytorch/pull/102915#issuecomment-1576748710

### Alternatives

_No response_

### Additional context

[packed seqs on mps]: https://github.com/pytorch/pytorch/issues/102911

The [Issue 102911][packed seqs on mps] stated above is related to:
- [Issue 96416][loss error on m1] ([Loss.backward() error when using MPS on M1 #96416][loss error on m1]), 
- [Issue 94691][gru nan] ([Nan is output by GRU on mps #94691][gru nan]), 
- [Issue 97552][packed sequence failure] ([PackedSequence failure with MPS #97552][packed sequence failure]), and 
- [PR 96601][grad_y missing fix] ([[MPS] LSTM grad_y missing fix #96601][grad_y missing fix]).

cc @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev


### Description

When training it can be useful to either pad input **_or_** mask parts of the expected output to increase efficiency and / or robustness. The example above demonstrates this with a RNN for time series where each sequence may have variable length utilizes padded sequences and `PackedSequence`  to improve throughput. The use of padded output (since this was a Seq2Seq model the padded input is the output) or masked output motivates a loss function that can handle this, without having to adjust the dataset / dataloaders / training method.  

Such occurs enough to motivate even a base `MaskedLoss` class that can be used to, in a standardized way, quickly and easily generate other masked loss functions e.g. `MaskedMSELoss`, `MaskedL1Loss`, etc.

The [PR][Pull Request] offers an example of how one might achieve this.
Repository: storybook
Issue: [Bug]: TypeError: compiler.plugin is not a function
Labels: question / support,builder-webpack5

### Describe the bug

I try to upgrade storybook v6.5.16 to v7.0.8. 
I ran `npx sb@next upgrade --prerelease`  and auto migration tool,  then I also solved the sorting function changes that mentioned [here](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort)

I could run the storybook however; there was issue on console says `TypeError: compiler.plugin is not a function` 
As I googled it comes from webpack5? but as my understanding, I cannot directly modify the webpack5 config via storybook; Is there any way I can fix this issue? 

### To Reproduce

_No response_

### System

```shell
Environment Info:

  System:
    OS: macOS 13.4
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 9.6.7 - ~/Projects/hs-channel-selector-toolkit/node_modules/.bin/npm
  Browsers:
    Chrome: 114.0.5735.90
    Firefox: 90.0.2
    Safari: 16.5
  npmPackages:
    @storybook/addon-actions: ^6.5.16 => 7.0.18 
    @storybook/addon-essentials: ^6.5.16 => 7.0.18 
    @storybook/addon-interactions: ^6.5.16 => 7.0.18 
    @storybook/addon-links: ^6.5.16 => 7.0.18 
    @storybook/addon-storysource: ^6.5.16 => 7.0.18 
    @storybook/react: ^6.5.16 => 7.0.18 
    @storybook/testing-library: ^0.0.13 => 0.1.0
```


### Additional context

_No response_
Repository: react
Issue: [DevTools Bug]: Flame graph entries overlapping
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://web-enable-react-profil-1na9tm.herokuapp.com/

### Repro steps

1. Go to https://web-enable-react-profil-1na9tm.herokuapp.com/
2. Open profiler
3. Click "reload and start profiling"
4. After the reload completes, stop profiling
5. Step through the commits until you see this:
   <img width="1840" alt="image" src="https://github.com/facebook/react/assets/921609/7162b403-d940-4028-a20f-27d73d48e55c">

The flame graph entries are overlapping other entries.

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

4.27.8 (5/19/2023)

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
Repository: pytorch
Issue: raise `RuntimeError` faster when loading an object with a torch CUDA tensor on a CPU-only machine
Labels: module: nn,module: serialization,triaged,actionable

### 🚀 The feature, motivation and pitch

Currently when loading an object with a torch CUDA tensor on a CPU-only machine, torch will raise a `RuntimeError` like https://github.com/pytorch/pytorch/issues/16797 mentioned. A problem in this situation is that torch will spend time (maybe trying to load the tensor bytes) before raise that `RuntimeError`. This extra time is proportional to the size of the tensor. Hence when loading a huge tensor, the extra time may be noticeable for performance-critical applications.

To give a concrete example, I have the following codes:

```python
def _safe_torch_tensor_loads(bs: bytes) -> t.Any:
    import torch

    f = io.BytesIO(bs)
    if not torch.cuda.is_available():
        return torch.load(f, map_location="cpu")
    else:
        return torch.load(f)


class FixTorchUnpickler(pickle.Unpickler):
    def find_class(self, module: str, name: str) -> t.Callable[[bytes], t.Any]:
        if module == "torch.storage" and name == "_load_from_bytes":
            return _safe_torch_tensor_loads
        else:
            return super().find_class(module, name)


def _fix_torch_loads(bs: bytes) -> t.Any:
    f = io.BytesIO(bs)
    unpickler = FixTorchUnpickler(f)
    return unpickler.load()


def loads_or_fix_torch(bs: bytes):
    try:
        return pickle.loads(bs)
    except RuntimeError:
        return _fix_torch_loads(bs)
```

where `_fix_torch_loads` will directly loads a object containing cuda tensors even on a CPU-only machine and `loads_or_fix_torch` will first try to load the object and only use `_fix_torch_loads` when it met the `RuntimeError`. In my benchmark (I actually have a benchmark repo [here](https://github.com/larme/pytorch_unpickler_benchmark)), `loads_or_fix_torch` will be 60%-70% slower than `_fix_torch_loads` for different sizes of objects. For a large enough tensor  (like (25000, 25000) fp32 tensor), the difference could be 500-600ms. My application is distributed model inference serving so 500-600ms is quite a lot from end user's point of view.

I'd like to help improving this situation but I need some input from more experienced pytorch developer. I tried to dive in `torch.serialization` and `torch.storage` but they are a little bit complex so if some pointer will be helpful!

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: next.js
Issue: Scrolling to ID with Link not working when routing to a new page
Labels: Navigation

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Code sandbox:

 Operating System:
      Platform: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 18.14.2
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.4.4
      eslint-config-next: 13.4.4
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/sleepy-burnell-8z4jcs?file=%2Fapp%2Fpage.tsx%3A6%2C27

### To Reproduce

Start with a bare `create-next-app`, using the app routing.

Add some links that link to another page, ie /legal/page.tsx, in that page we have the id to the sections.

`<div id="acessibility" className="">`

Back in `app/page.tsx`, I'll use the linking example from [the docs: ](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#scrolling-to-an-id)

`<Link href="/#hashid" scroll={false}>` which for this example becomes `<Link href="/legal#accessibility" scroll={false}>`

When clicking in the root page, it goes to the page, but there is no scrolling happening.


### Describe the Bug

When trying to scroll to an id in another page, it does not scroll.

### Expected Behavior

When linking to a section in another page, it should scroll to that section.

### Which browser are you using? (if relevant)

Chrome 113

### How are you deploying your application? (if relevant)

Not yet
Repository: flutter
Issue: [go_router] avoid exposing goBranch from StatefulNavigationShell
Labels: package,P3,p: go_router,team-go_router,triaged-go_router

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

StatefulNavigationShell is a widget that is built in StatefulShellRoute. It has a goBranch method on the widget itself

https://pub.dev/documentation/go_router/latest/go_router/StatefulNavigationShell/goBranch.html

This is unsafe as a widget class can be reused multiple time in a screen. Although it is not an issue now, it can be a foot gun if someone refactor it in the future without knowing this method exists.

### Proposal

We should find a new way to expose this API.
Repository: vscode
Issue: Search Editor peek support for notebook search
Labels: bug,confirmed,search-editor

1. Open the search editor and search for something in an open notebook
2. Double-click on the name of the file in the result.
3. Doesn't show preview :bug:

<img width="732" alt="image" src="https://github.com/microsoft/vscode/assets/31675041/641871b6-a030-4597-84aa-d8d28638fead">
Repository: vscode
Issue: [Accessibility]: Make syntax highlight accessible to screen reader users via a speech scheme
Labels: feature-request,accessibility,grammar

CC @meganrogge and @isidorn

Syntax highlight remains inaccessible to screen reader users. I propose using a speech scheme to address this issue. Speech scheme is a technique using and switching between different speech synthesizer voices for visual formattings, such as colors, fonts, sizes, etc.

Just like sighted people see different colors for syntax types, screen readers would be able to hear different voice per syntax highlight type.

As far as I know, there is no straight way to communicate with screen readers to force them to switch voices. However, the following solutions are available:

1. Using `lang` attribute. The HTML `lang` attribute is recognized via screen readers and supported screen reader voice engines, such as JAWS/NVDA Vocalizer and iOS/Mac OSX can detect and automatically switch between different voices (e.g., en-US, en-GB, etc.)

2. Using server-side voice engines as an option for syntax highlight. Just like VSCode LiveShare extension, you can consider using API to send a server-side voice engines to control all the details. However, screen reader users need to suspend their screen reader speech while using this option that might be inconvenient.

To come up with a more robust solution in the long run, however, I think VSCode team needs to work with some popular screen reader vendors.

## System Info

Version: 1.79.0-insider (system setup)
Commit: 666396ddec7708df2b986dcc178863faaa67c14d
Date: 2023-06-05T11:30:50.018Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Repository: vscode
Issue: feat: add standard icon association for localization/language files
Labels: feature-request,icons-product

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Similar to how most image formats (WEBP, AVIF, PNG, JPG, GIF, etc) have an icon association to depict that they are images, could there please be a conventional icon for localization files?

By default, this icon would be associated with formats like:

* XLIFF (`*.xlf`)
* TMX (`*.tmx`)
* Fluent (`*.ftl`)
* PO (`*.pot` / `*.po`)
* etc

Some extensions may choose to reuse the icon for custom formats. Other broader file formats (like `*.json`) that extensions know to be a language file in the context of the libraries/stack used may use the icon as well.

### Related

* Originally discussed in https://github.com/projectfluent/fluent/issues/356
Repository: pytorch
Issue: Preserve weight_g/weight_v accessors on new weight_norm
Labels: module: nn,triaged,module: nn.utils.parametrize

### 🐛 Describe the bug

Parametrizations don't let you control what the original parameters are called; they're always original0, original1, etc. For weight_norm, this new naming is a bit obtuse; the original naming of g/v was better. Not sure if this is actually worth fixing, holler if you think it is.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @lezcano 

### Versions

main
Repository: godot
Issue: [Godot4.1.dev4 mono] An error occurs when assigning a value to the [export] script node in the [tool] class
Labels: bug,topic:editor,topic:dotnet

### Godot version

4.1.dev4 mono

### System information

windows10

### Issue description

[Export] an attribute of type script in the class marked [Tool]. Attempting an assignment in the editor results in an error


> modules/mono/glue/runtime_interop.cpp:1325 - System.InvalidCastException: Unable to cast object of type 'Godot.Sprite2D' to type 'Icon'.
>      at Main.SetGodotClassPropertyValue(godot_string_name& name, godot_variant& value) in D:\GameProject\Godot4.1.dev4_bug\Godot.SourceGenerators\Godot.SourceGenerators.ScriptPropertiesGenerator\Main_ScriptProperties.generated.cs:line 13
>      at Godot.Bridge.CSharpInstanceBridge.Set(IntPtr godotObjectGCHandle, godot_string_name* name, godot_variant* value) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/CSharpInstanceBridge.cs:line 57


This bug only exists in mono_4.1.dev4, not in 4.1.dev3 and 4.0.stable

### Steps to reproduce

1. Create scripts Main.cs and Icon.cs, and add [Tool] and [Export] icon to Main.cs.
```cshap
using Godot;
using System;

[Tool]
public partial class Main : Node2D
{
    [Export()]
    public Icon Icon;
}
```
 ```cshap
using Godot;
using System;

public partial class Icon : Sprite2D
{
}
```

2. Create a scenario Main.tscn. Mount the Main.cs script on the root node and the Icon.cs script on the child node.
![image](https://github.com/godotengine/godot/assets/63633253/ea203761-1428-452a-bee0-78304266e40c)

3. Compile the project and drop the Icon node into the Icon property exported from the Main node. The editor will report an error
![bug](https://github.com/godotengine/godot/assets/63633253/d0cc1091-bf48-4b37-93c5-ffc883993a66)

Note: Be sure to add [Tool], otherwise it will not be repeated

### Minimal reproduction project

[Godot4.1.dev4_bug.zip](https://github.com/godotengine/godot/files/11656098/Godot4.1.dev4_bug.zip)
Repository: transformers
Issue: Add scGPT Model
Labels: New model

### Model description

scGPT is a single celled foundation model, based off the GPT architecture. The model is shown to have captured meaningful biological insights into cells and genes. The authors state the model can be fine tuned to downstream tasks included, cell-type annotation, genetic perturbation etc.

I'd like to add scGPT to HuggingFace Transformers.

### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

The paper [scGPT: Towards Building a Foundation Model for Single-Cell
2 Multi-omics Using Generative AI](https://www.biorxiv.org/content/10.1101/2023.04.30.538439v1.full.pdf) by [Haotian Cui](https://www.researchgate.net/scientific-contributions/Haotian-Cui-2193100667),  [Chloe Wang](https://www.linkedin.com/in/chloe-xueqi-wang-979712158/?originalSubdomain=ca) , [Hassaan Maan](https://hsmaan.com/), [Bo Wang](https://bowang87.github.io/)

Github link: [scGPT by subercui](https://github.com/bowang-lab/scGPT)

Model Checkpoint: [Google Drive](https://drive.google.com/drive/folders/1kkug5C7NjvXIwQGGaGoqXTk_Lb_pDrBU)
- From this checkpoint I can generate the model weights