sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: 4.2 .NET / scene keeps losing exported references between commits from different users
Labels: bug,topic:editor,topic:dotnet

### Tested versions

- Reproducible in 4.2.stable .NET and 4.2.1.stable .NET

### System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 31.0.15.3623) - AMD Ryzen 5 3600 6-Core Processor (12 Threads) - issue also appeared between two other PCs (one on W10 and other on W11)

### Issue description

A .NET Godot project is synchronized via Git on GitHub.

One user (**User A**) has pushed their changes including exported references to an existing scene:

![image](https://github.com/godotengine/godot/assets/4069479/7b28a67d-cb61-4ddc-925a-a2cebd23c210)

![image](https://github.com/godotengine/godot/assets/4069479/f0549130-7038-409d-9c42-499111bb590c)

Another user (**User B**) pulls the new set of changes and tries to launch them in editor (it does not matter if the project was already open and reloaded, or launched after the pull), and sees missing references after performing a .NET rebuild:

![image](https://github.com/godotengine/godot/assets/4069479/0ba7e9d5-7f70-4134-943d-f51c140455bf)

At this point in time the version control does not display any changes:

![image](https://github.com/godotengine/godot/assets/4069479/693ed1d1-21e9-4939-94a1-4a269c748177)

After User B saves the scene in the editor, the changes appear in the VCS, cancelling out the work that User A performed:

![image](https://github.com/godotengine/godot/assets/4069479/2cfa750d-08e8-47d3-a1fb-2c1ae9574191)

### Steps to reproduce

1. Clone the following repository: https://github.com/Spierek/GDRefLoss
2. Checkout the very first commit (`887e11c`)
3. Open the project in Godot and build the .NET project (Alt+B)
4. Open the `scn_game.tscn` scene and verify the references on the `RefHolder` node: 
![image](https://github.com/godotengine/godot/assets/4069479/e4579a4e-9e96-4ce0-9632-63f9dd89425a)

5. Go back to the version control system and pull latest changes (commit `06f5ac4`).
6. Go back to Godot and reload the scene:
![image](https://github.com/godotengine/godot/assets/4069479/cc64fce7-07d0-498f-befd-3a4157e86dcf)

7. After rebuilding the .NET project verify the references on the `RefHolder` node:
![image](https://github.com/godotengine/godot/assets/4069479/0b62c1db-5e1d-4e42-8258-bc9234267a8d)

8. Save the scene and check if the version control system is trying to remove changes pulled from commit `06f5ac4`:
![image](https://github.com/godotengine/godot/assets/4069479/07a48d3c-4bd6-4b1a-b5d2-f20139de716f)

9. Discard changes in the VCS and verify the state of the `RefHolder` again:
![image](https://github.com/godotengine/godot/assets/4069479/60d6d6bf-8538-4476-8f59-0fb67e302c1a)

### Minimal reproduction project (MRP)

Clone the following repository - https://github.com/Spierek/GDRefLoss - and follow the reproduction steps outlined in the other section.
Repository: next.js
Issue: Head elements order differs when component is updated
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/nextjs-head-order-bug-d6wn3n

### To Reproduce

(context: pages dir)
1. Add a (default) title in `_app` via `next/head` component
2. Add an override title somewhere in your page via `next/head` component
3. Make sure the page title doesn't rerender the component (e.g. wrap it in `React.memo`)
4. Rerender `_app` component (say, add a counter with a button to increment)
5. Witness title being overriden by a page on an initial render - and rerendered to a default one on `_app` component rerender.

### Current vs. Expected behavior

I expect head elements order depend on nesting order, not on rerender order.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 3.6.2
  pnpm: N/A
Relevant Packages:
  next: 14.0.3
  eslint-config-next: 14.0.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.6
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Metadata (metadata, generateMetadata, next/head)

### Additional context

My investigation led to `side-effect.tsx` file [lines](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/side-effect.tsx#L40-L45) which add / remove mounted instances of head on their mount / unmount.
Whenever they need to decide what precedence titles do get - their unwrap it in a array (which is not determenistic, I guess) and reduce it to a single (latest) title value.

What happens in my case is that both default head and component head got added - and title is rendered as expected (page one), then `useEffect` applies after `_app` rerender, `_app` `mountedInstance` is removed and then added again to the set. This makes set extracted in a different order and title being changed.

I'm not sure what the fix should be, but some kind of indexing of those `mountedInstances` would help.
Repository: transformers
Issue: Add time progress bar to track the group_by_length computation for bigger datasets on Trainer
Labels: Feature request

### Feature request

When setting the flag `group_by_length=True` on the TrainingArguments, there is no user feedback of the operations running in the background, namely getting the list of lengths for all the samples and running the grouping algorithm. This can be a frustrating problem when dealing with large datasets (Millions of samples) on slow IO devices, since it appears that the Trainer is hanging and does not start!

More precisely, In my current setup, I found out that the following lines take almost 2h to finish. (Due to my slow IO (reading from a NFS from an old machine))

https://github.com/huggingface/transformers/blob/c817c17dbe264329b9f9d227b48ce70edd9e3204/src/transformers/trainer_pt_utils.py#L585

NOTE 1): using `.select_columns(model_input_name)` and then iterating would not be faster? Assuming that the dataset has more feature like "attention_mask" for instance. 

I believe that more feedback could possibly be given to the user, like the time that would take to finish. (Also store the dataset length under .cache).

NOTE 2): After realising this issue, I also noticed the `length_column_name` flag. Maybe raising a warning to let the users know that on larger datasets they should precompute the length. By doing so, the time went from 2h to (15-20)min.

### Motivation

I was training a model on a LM task. My dataset has 22M samples with average length of +/- 512. When I run the model with `group_by_length=True` I thought that something was wrong because the training was not starting (I was actually writing an bug about my problem, because I thought it was an issue with the Trainer). After further inspection, I notice that the main culprit was the computation of the length that is really slow on my current setup. 

### Your contribution

If you feel like this is an issue that is worth to address, I am willing to do PR under your orientation.
Repository: go
Issue: proposal: encoding/xml: access to ns short codes
Labels: Proposal

### Proposal Details

I would like access to the namespace short codes to long form mappings used during an unmarshaling.   This is useful for processing custom element and attribute values that reference the short codes like xpaths in IETF RFC6241 NETCONF

Example:
```xml
<x xmlns:z="zee">
  <y xpath="z:banana/foo/z:apple"></y>
</x>
```

Here I need to parse `xpath` and lookup that `z`'s full namespace is `zee`

Fix: to encoding/xml/xml.go
```go
// LookupNs will return the full namespace string give a short code. This will
// only be useful from implementations of Unmarshaler while the namespaces
// are still in scope
func (d *Decoder) LookupNs(shortcode string) string {
	return d.ns[shortcode]
}
```
 
Example:
```go
func TestXpath(t *testing.T) {
	x := struct {
		Y *Y `xml:"y"`
	}{}
	orig := `<x xmlns:z="zee">
	  <y xpath="z:banana/foo/z:apple"></y>
	</x>`
	d := xml.NewDecoder(strings.NewReader(orig))
	if err := d.Decode(&x); err != nil {
		t.Fail()
	}
	if x.Y.XPathLookup != "z=zee" {
		t.Error(x.Y.XPathLookup)
	}
}

type Y struct {
	XPath       string
	XPathLookup string
}

func (y *Y) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
	copy := struct {
		XPath string
	}{}
	if err := d.DecodeElement(&copy, &start); err != nil {
		return err
	}
	y.XPath = copy.XPath
	y.XPathLookup = fmt.Sprintf("z=%s", d.LookupNs("z"))
	return nil
}
```
Repository: transformers
Issue: Can i convert open-clip trained models (.pt) using code “src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py” ？
Labels: New model

### Model description

openclip：https://github.com/mlfoundations/open_clip

i use openclip  to train model and get "epoch_400.pt". 
**and i want to convert this "epoch_400.pt" to hf, so i run:**
python src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py     --pytorch_dump_folder_path "./openclip_syf_hf"     --checkpoint_path "/openclip_output/2023_12_07-15_24_24-model_ViT-B-32-lr_0.0005-b_256-j_8-p_amp/checkpoints/epoch_400.pt"     --config_path "/open_clip-main/src/open_clip/model_configs/ViT-B-32.json"

**but get bug:**

Traceback (most recent call last):
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/clip/clip.py", line 130, in load
    model = torch.jit.load(opened_file, map_location=device if jit else "cpu").eval()
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/torch/jit/_serialization.py", line 164, in load
    cpp_module = torch._C.import_ir_module_from_buffer(
RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py", line 150, in <module>
    convert_clip_checkpoint(args.checkpoint_path, args.pytorch_dump_folder_path, args.config_path)
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py", line 120, in convert_clip_checkpoint
    pt_model, _ = load(checkpoint_path, device="cpu", jit=False)
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/clip/clip.py", line 137, in load
    state_dict = torch.load(opened_file, map_location="cpu")
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/torch/serialization.py", line 795, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/anaconda3/envs/transformer/lib/python3.8/site-packages/torch/serialization.py", line 1002, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

**so i am wondering if i can convert open-clip trained models (.pt) using code “src/transformers/models/clip/convert_clip_original_pytorch_to_hf.py” ？**

### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

_No response_
Repository: godot
Issue: weird artefact to shapekeys
Labels: topic:editor,needs testing,topic:3d

### Tested versions

4.2.1

### System information

windows 11

### Issue description

![Scree](https://github.com/godotengine/godot/assets/70328320/115f7818-5a3f-45c3-9e04-fa1290c3bf88)


### Steps to reproduce

[test5multiple_shapes.zip](https://github.com/godotengine/godot/files/13686763/test5multiple_shapes.zip)


### Minimal reproduction project (MRP)

As seen in the ss there is a weird artefact. I attached the GLTF file as zip. All this happens in the editor. It flickers and sometimes it appears normal. 
Not a big bug or anything.
Repository: vscode
Issue: Notebooks scroll annoyingly 
Labels: under-discussion,notebook

* open .vscode/notebooks/my-work.github-issues
* have many bugs, show them all (expand)
* add a label to narrow down on a few bugs
* execute
* :bug: the end of the output seems to be revealed, the cell isn't revealed back again

https://github.com/microsoft/vscode/assets/1794099/f559765d-7f3d-4169-aba3-04a2ac03ef38
Repository: PowerToys
Issue: Tool to automatically convert image to PNG with transparent removed background
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

Right-click operation of an image. Possibly merged into the image resize tool. Automatically deletes the white/black of background and converts to transparent background PNG. Should also support bulk operations. It can make errors- doesn't need to be perfect. I know some images are harder than others - so if you want it perfect, this tool wouldn't be for you.

### Scenario when this would be used?

A lot of images I grab online have a white background that are super easy for tools like paint 3d to "magic select" and remove the background to convert into a transparent image. However, If i have a number of images to do this to it takes a long time. 

![bb3fdbc52e85019_lg](https://github.com/microsoft/PowerToys/assets/153931827/5d7ee37a-672d-4741-9917-c3700d1c5373)


### Supporting information

See my attached image for an easy example.
Repository: storybook
Issue: [Bug]: Storybook destroys injector when using createCustomElement and document.createElement
Labels: bug,has workaround,angular,sev:S2

### Describe the bug

When creating a custom element, then switching to another story and creating another custom element, storybook destroys the injector and angular throws an error.


### To Reproduce

Clone repository from:

https://github.com/fullstackdeveloperbilbao/storybook-injector-error.git

After cloning run:
- npm install
- npm run storybook
- On FIRST story click _Add item_ button.
- Switch to SECOND story.
- On SECOND story click _Add item_ button.

The error should be displayed.

### System

```bash
System:
    OS: macOS 14.2
    CPU: (8) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm <----- active
  Browsers:
    Chrome: 120.0.6099.109
    Safari: 17.2
  npmPackages:
    @storybook/addon-essentials: ^7.6.4 => 7.6.4 
    @storybook/addon-interactions: ^7.6.4 => 7.6.4 
    @storybook/addon-links: ^7.6.4 => 7.6.4 
    @storybook/angular: ^7.6.4 => 7.6.4 
    @storybook/blocks: ^7.6.4 => 7.6.4 
    @storybook/test: ^7.6.4 => 7.6.4 
    storybook: ^7.6.4 => 7.6.4
```


### Additional context

_No response_
Repository: godot
Issue: Right-click on wide error message doesn't spawn context menu under mouse
Labels: bug,topic:editor,needs testing,topic:gui

### Tested versions

Reproducible in Godot v4.2.1.stable.mono, haven't checked other versions

### System information

Godot v4.2.1.stable.mono - macOS 14.2.0 - Vulkan (Mobile) - integrated Apple M3 Max - Apple M3 Max (14 Threads)

### Issue description

Video of this behavior:

https://github.com/godotengine/godot/assets/5611323/c6a9b108-1879-422a-9687-2e716802559f

The context menu spawns all the way to the left instead of under the mouse. Expected behavior is under the mouse.

### Steps to reproduce

Find yourself a long error and right click it!

### Minimal reproduction project (MRP)

N/A
Repository: transformers
Issue: Expose `gradient_as_bucket_view` as training argument for `DDP`
Labels: Feature request

### Feature request

As the title says, add `gradient_as_bucket_view` as the training argument (default False)

### Motivation

I have been experimenting with qlora fine-tuning LLMs on multiple A10 GPUs and I am leveraging DDP. I was going through the torch docs and https://pytorch.org/docs/2.1/generated/torch.nn.parallel.DistributedDataParallel.html and it seems the `gradient_as_bucket_view` argument can save a little bit of memory. It would be great to have it added as accelerate's DDP plugin already supports it.

I am already experimenting with it to test it out
```python
class HFTrainer(Trainer):
    def _wrap_model(self, model, training=True, dataloader=None):
        outputs = super()._wrap_model(model, training, dataloader)
        if self.args.parallel_mode == ParallelMode.DISTRIBUTED and self.accelerator.ddp_handler:
            self.accelerator.ddp_handler.gradient_as_bucket_view = True

        return outputs
```



### Your contribution

Let me know, I can also work on a PR for this as the change is relatively small
Repository: godot
Issue: Area2D body_entered signal is emitted too late
Labels: discussion,topic:physics,needs testing,topic:2d

### Tested versions

Reproducible in: v4.2.1.stable.official [b09f793f5]

### System information

Windows 10 - v4.2.1.stable.official [b09f793f5]

### Issue description

Area2D body_entered signal seem to execute the callback 1 physics tick too late. Here is a visual representation, where the player is a CharacterBody2D, and the coin is an Area2D. The Area2D callback is set to increase the score by 1 and make the coin invisible and queue_free()

![fd521bf49d9a2b73321ffdbcc6a45bbefbee1f46](https://github.com/godotengine/godot/assets/63565319/e5b967b8-90c6-4702-afa1-d499fb5b3f4b)

This visual overlap is undesired, the Area2D (coin) is set to become invisible (visible = false) in the body_entered callback, however it is still visible for the first frame where it overlaps with the player.

This also happens in the official pong demo, where the ball can be seen overlap the paddles if the speed of the ball increases.

If maybe this is not considered a bug and it's just the way the engine was designed, there should be an easy alternative to make an Area2D with immediate body_entered callbacks. There's a running thread on the forums on this issue: https://forum.godotengine.org/t/why-are-area2d-collisions-triggered-1-frame-late/37354

### Steps to reproduce

Create a CharacterBody2D and another Area2D. Make the Area2D emit the body_entered signal, and on the callback set it so the Area2D becomes invisible or whatever. You'll see that the CharacterBody2D actually overlaps the Area2D for 1 frame. 

### Minimal reproduction project (MRP)

[MRCollisionExample.zip](https://github.com/godotengine/godot/files/13687068/MRCollisionExample.zip)
In this MRP just press right arrow key to move the CharacterBody2D to the right. When it reaches the Area2D, the callback is set to teleport the CharacterBody2D back to the start, however, they can be seen overlapping for a frame, like this:
![ebeaf25a703e804c3bc0b49825080a7c27c5ed3d_2_690x456](https://github.com/godotengine/godot/assets/63565319/c77f904c-4d24-4bf0-95ec-40994fe42744)


This also happens in the Godot pong official demo: https://godotengine.org/asset-library/asset/121
If you increase the ball speed, it will be seen overlaping the paddles, which is a highly undesired visual glitch.
Repository: godot
Issue: Cmd-W shortcut not working in Editor
Labels: discussion,platform:macos,topic:editor

### Tested versions

- reproducible in v4.2.rc2.official [1ba920fad]

### System information

macOS Ventura 13.3

### Issue description

Using cmd-W to close finder windows is standard in any app on macOS, Godot is the only app I have ever seen that does not support this. Hopefully quite easy to implement.

### Steps to reproduce

When any window in Godot is open (including the main editor window) press command-W on the keyboard.

Expected behaviour:
The currently active window close (just like pressing the red close icon)

Actual behaviour:
Nothing happens.



### Minimal reproduction project (MRP)

General Editor issue
Repository: flutter
Issue: Consolidate calls out to gradlew under flutter/dev/
Labels: team,P2,c: tech-debt,c: flake,team-tool,triaged-tool

`gradlew` is invoked in around [10 different places](https://github.com/search?q=repo%3Aflutter%2Fflutter+path%3A%2F%5Edev%5C%2F%2F+gradlew&type=code) under `dev/`.

When the Flutter CLI invokes gradlew, it does so with [many guardrails](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle_errors.dart#L20) in place to e.g. retry on network failures.

The invocations under `dev/` should have the same guardrails so that our tests on CI can be less flaky.
Repository: godot
Issue: Bad Performance on Web Editor
Labels: bug,platform:web,topic:editor,needs testing,regression,performance

### Tested versions

- Reproducible in v4.2, v4.2.1
- Not Reproducible in v4.2beta builds and below

### System information

ChromeOS - Godot v4.2.1.stable

### Issue description

The editor runs much slower on web and now running projects can crash lower end computers.

### Steps to reproduce

- Make any project (the performance usually crashes in 3D)
-  Try to run it.

### Minimal reproduction project (MRP)

N/A
Repository: flutter
Issue: [in_app_purchase] Standardize error handling
Labels: p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

### Use case

The `in_app_purchase` plugin has some some issues when it comes to error handling. Some are documentation issues, others are problems in the code.

There is no good way to catch errors universally for the `completePurchase()` method in `InAppPurchase`. On iOS, it throws a `PlatformException` (or a `MissingPluginException` since it just calls `invokeMethod` on a `MethodChannel`) and on Android it returns a `Future<BillingResultWrapper>` (though the return type for the platform-independent method is a `Future<void>`). The documentation for said method says it returns a `PurchaseException`, when that doesn't even exist (the closest thing I can find is a `InAppPurchaseException`.

With regards to the `restorePurchases()` method, it doesn't even document that it can throw an exception (which I think is against the Effective Dart style guide?). On Android, it can throw an `InAppPurchaseException` and on iOS it can throw an `SKError`.

### Proposal

My proposal is to ensure that all methods are appropriately documented with the exceptions they can throw, namely `InAppPurchaseException`. I also think there is a good opportunity here to make more specific errors and have `InAppPurchaseException` become a sealed class instead of having to handle platform-specific error codes.
Repository: flutter
Issue: `activateSystemCursor` should include a view ID
Labels: framework,a: mouse,P2,a: multi window,team-framework,triaged-framework

At least on the web, the cursor can be set at whatever scope we choose (e.g. entire window, flutter view element, etc). So in order for us to correctly scope the cursor, we would need the `viewId` information within the `activateSystemCursor` message.