sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Merge editor behavior is confusing and inconsistent
Labels: under-discussion,merge-editor

Type: <b>Bug</b>

1. Change a piece of code, commit, and push 
2. Repeat step 1 with the same file in a different clone of the repo 
3. Try to pull the branch, merge conflicts!
4. Adjust the file manually to fix the conflict 
5. Try to open the merge editor so you can complete the merge 
6. The editor has no idea what to do! It's remembered that there was a conflict and shows the changes correctly, so it should be good?
7. Click Complete Merge and it will say there are still unresolved conflicts 
8. Using the merge editor, undo your changes 
9. Do the exact same thing you did in a few keypresses by clicking the different choices to merge the changes so it looks *exactly the same as it did before* 
10. Click Complete Merge and it works this time 🤷‍♀️ 

In my case it was a `docker-compose.yaml` where one had added an `environment` key and the other had added the `environment` key with some values.

VS Code version: Code 1.84.0 (d037ac076cee195194f93ce6fe2bdfe2969cc82d, 2023-11-01T11:28:21.782Z)
OS version: Linux x64 6.2.0-36-generic
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz (8 x 1365)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|2, 2, 1|
|Memory (System)|15.33GB (5.94GB free)|
|Process Argv|--unity-launch --crash-reporter-id bdfb417b-b97a-4942-b4c1-1de1c731840b|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|pantheon|
|XDG_CURRENT_DESKTOP|Unity|
|XDG_SESSION_DESKTOP|pantheon|
|XDG_SESSION_TYPE|x11|
</details>
<!-- generated by issue reporter -->
Repository: go
Issue: proposal: sync: add Mutex.Do
Labels: Proposal

I propose the following helper method being added to `Mutex`:
```go
// Do runs f under the protection of the mutex.
func (m *Mutex) Do(f func()) {
    m.Lock()
    defer m.Unlock()
    f()
}
```

### Rationale

I was investigating a sluggish program and the result was because `defer m.Unlock()` is function scoped.

Consider the following snippet:
```go
func (s *Server) doSomething() {
    s.mu.Lock()
    defer s.mu.Unlock()

    ... // access some critical resource protected by mu

    ... // hundreds of lines of logic that doesn't need protection by mu
}
```

Initially when `doSomething` was written it was concise and short such that `s.mu.Lock()` and the corresponding `defer s.mu.Unlock()` concisely protected the body of the function. However, as usually goes with software engineering, this function grew in complexity such that logic was added that doesn't care about the resource protected by `s.mu`. We are now unnecessarily holding the mutex for much longer than necessary (since `defer s.mu.Unlock()` doesn't run until the function returns). This problem gets worse over time as the unrelated logic grows since the `s.mu` operations get push father away (in terms of code locality) hiding it's existence and the runtime complexity of the unrelated logic grows as well.

With a `Do` method, the scope of the critical region becomes clear:
```go
func (s *Server) doSomething() {
    s.mu.Do(func() {
        ... // access some critical resource protected by mu
    })

    ... // hundreds of lines of logic that doesn't need protection by mu
}
```
Repository: pytorch
Issue: Torchbench Training Failing Models Tracker
Labels: triaged,oncall: pt2

### 🐛 Describe the bug

Note: i'm not duplicating issues across backends. A failure with inductor will also occur with cudagraphs and dynamic, and a cudagraphs failure will occur with cudagraphs dynamic.

Default Inductor backend:

- [ ] vision_maskrcnn: eager two runs differ. this is a failure with the dashboard. 

Cudagraphs

- [x] dlrm: sparsity has fundamental incompatibility with cudagraphs (at least in training, could potentially work in inference). we should be skipping here. (@eellison) (no longer failing??)

Inductor Dynamic: deferring until https://github.com/pytorch/pytorch/issues/113063

- [ ] demucs
`2023-10-27T09:50:53.4971595Z ERROR:common:Constraints violated (L['streams'].size()[0])! For more information, run with TORCH_LOGS=dynamic.
2023-10-27T09:50:53.4975118Z   - Not all values of RelaxedUnspecConstraint(L['streams'].size()[0]) are valid because L['streams'].size()[0] was inferred to be a constant (4).`
- [x] hf_Whisper - could not repro. look into it further
- [ ] speech_transformer - `AssertionError: nothing in example_inputs had a dim with 32`  benchmarking script issue.
- [x] timm_efficientdet - could not repro failure. 

Max autotune 
 - [x] Moco (following all look like similar issues - @shunting314 doing initial investigation) `2023-10-29T10:15:51.4480270Z SingleProcess AUTOTUNE takes 4.6186 seconds
2023-10-29T10:16:01.3670831Z ERROR:common:CUDA error: an illegal memory access was encountered
2023-10-29T10:16:01.3673431Z CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
2023-10-29T10:16:01.3674868Z For debugging consider passing CUDA_LAUNCH_BLOCKING=1.`
- [x] resnet152 `2023-11-05T10:44:03.8415416Z ERROR:common:CUDA error: misaligned address
2023-11-05T10:44:03.8416523Z CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. (shunting314)
2023-11-05T10:44:03.8417688Z For debugging consider passing CUDA_LAUNCH_BLOCKING=1.`
- [x] resnet50 `misaligned address` (couldn't repro locally, let's see if next max autotune run fixes) (shunting314)
- [x] mobilenet_v3_large `'FusedSchedulerNode' object has no attribute 'node'`





### Versions

master

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519
Repository: pytorch
Issue: Torchbench inference failures
Labels: triaged,oncall: pt2

### 🐛 Describe the bug

Inductor default 

- [x] Dalle2_Pytorch https://github.com/pytorch/pytorch/issues/104797 - @jon-chuang
- [x] basic_gnn_gcn/basic_gnn_sage/basic_gnn_gin : @oulgen 
```2023-11-01T20:17:20.0437025Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_inductor/ir.py", line 1578, in as_storage_and_layout
2023-11-01T20:17:20.0438103Z     raise NotImplementedError
2023-11-01T20:17:20.0438810Z torch._inductor.exc.LoweringException: NotImplementedError: 
2023-11-01T20:17:20.0439501Z   target: aten.select.int
2023-11-01T20:17:20.0439936Z   args[0]: TensorBox(StorageBox(
2023-11-01T20:17:20.0441167Z     ComputedBuffer(name='buf3', layout=FlexibleLayout('cuda', torch.int64, size=[2, i14 + 10000], stride=[i14 + 10000, 1]), data=Pointwise(
2023-11-01T20:17:20.0442302Z       'cuda',
```
- [x] detectron2_fcos_r_50_f (@davidberard98 / @mengluy) (#113078)
```
2023-11-01T19:43:31.4217121Z ERROR:common:backend='inductor' raised:
2023-11-01T19:43:31.4219214Z RuntimeError: Attempting to broadcast a dimension of length 1000 at -1! Mismatching argument at index 1 had torch.Size([4, 1000]); but expected shape should be broadcastable to [1000, 4]
2023-11-01T19:43:31.4221452Z 
2023-11-01T19:43:31.4222487Z While executing %deltas_1 : [num_users=5] = call_function[target=operator.mul](args = (%deltas, %stack_1), kwargs = {})
2023-11-01T19:43:31.4223665Z Original traceback:
2023-11-01T19:43:31.4225259Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/detectron2/modeling/meta_arch/dense_detector.py", line 228, in resume_in__decode_per_level_predictions
2023-11-01T19:43:31.4226765Z     pred_boxes = self.box2box_transform.apply_deltas(
2023-11-01T19:43:31.4228162Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/detectron2/modeling/box_regression.py", line 295, in apply_deltas
2023-11-01T19:43:31.4229354Z     deltas = deltas * strides
```
- [ ] timm_efficientdet - at least locally, OOMs, needs to lower batch size - @eellison 

cudagraphs dynamic

Deferring the dynamic failures until https://github.com/pytorch/pytorch/issues/113063

- [ ] hf_BigBird `Not all values of RelaxedUnspecConstraint(L['inputs'][0].size()[0]) are valid because L['inputs'][0].size()[0] was inferred to be a constant (4).`
- [ ] hf_T5_generate `Not all values of RelaxedUnspecConstraint(L['input_ids'].size()[0]) are valid because L['input_ids'].size()[0] was inferred to be a constant (4).`
- [ ] llama - `Not all values of RelaxedUnspecConstraint(L['inputs'][0].size()[0]) are valid because L['inputs'][0].size()[0] was inferred to be a constant (32).`

cudagraphs freezing - To do, assigning to @eellison 
 
- [ ] shufflenet
- [ ] mnasnet

max autotune - no additional failures 





### Versions

master

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519
Repository: go
Issue: errors: ErrUnsupported should document expected side effects
Labels: Documentation,NeedsInvestigation

I'm struggling to figure out how to correctly use `errors.ErrUnsupported`.

In the proposal, @rsc [gave this example](https://github.com/golang/go/issues/41198#issuecomment-694577557):
```go
func (w) WriteString(s string) (int, error) {
    if u, ok := w.u.(io.StringWriter); ok {
        return u.WriteString(s)
    }
    return 0, ErrTBD
}
```
where `ErrTBD` is presumably what became `ErrUnsupported`.

Let's say hypothetically, we wanted to make `io.WriteString` make use of `errors.ErrUnsupported`, what would that look like?
```go
func WriteString(w Writer, s string) (n int, err error) {
	if sw, ok := w.(StringWriter); ok {
		switch n, err := sw.WriteString(s); {
		case err == nil:
			return n, nil
		case !errors.Is(err, errors.ErrUnsupported)):
			return n, err
		}
		// otherwise err is errors.ErrUnsupported, fallback on other logic
	}
	return w.Write([]byte(s))
}
```

However, the only way this is possibly correct is if returning `errors.ErrUnsupported` also indicates that the operation had no side-effects and could thus be retried in an alternative way. As of right now, there is no such documented guarantee.

If we do document that `errors.ErrUnsupported` is side-effect free, then it also means that this is error prune (pun intended) where returning the error up the call stack increases the probability that there are indeed side-effects from other operations.

\cc @ianlancetaylor @bcmills
Repository: godot
Issue: Non-typed array as Array[T] returns false unless explicitly cast to Array[T].
Labels: discussion,topic:gdscript

### Godot version

4.1.3

### System information

Windows 10 - Godot.4.1.3.stable

### Issue description

in most cases `is Array[T]` evaluates to `false` unless it is cast to `Array[T]`. But in some cases, it would still evaluate to `false`. For example, when it is specified as an `Array` in the arguments for a function.



### Steps to reproduce

```
func foo(array: Array): return array as Array[String] is Array[String]
```

```
print(["foo"] is Array[String]) # false
print(["foo"] as Array[String] is Array[String]) # true
print(foo(["foo"])) # false
print(foo(["foo"] as Array[String]))# true
print((func(array: Array) -> bool: return array as Array[String] is Array[String]).call(['foo'])) # false
print((func(array: Array) -> bool: return array is Array[String]).call(['foo'] as Array[String])) # true
```

### Minimal reproduction project

N/A
Repository: opencv
Issue: Missing HAVE_OPENMP in cvconfig.h
Labels: bug,category: core,category: build/install

### System Information

OpenCV 4.8.1

### Detailed description

I was trying to enable OpenMP on OpenCV using CMake and noticed that the #cmakedefine HAVE_OPENMP is missing in the cvconfig.h.in file.
Here's the patch I applied in my code.

```diff
diff --git a/cmake/templates/cvconfig.h.in b/cmake/templates/cvconfig.h.in
index d6c7875411..1188b2b159 100644
--- a/cmake/templates/cvconfig.h.in
+++ b/cmake/templates/cvconfig.h.in
@@ -124,6 +124,9 @@
 /* Ste||ar Group High Performance ParallelX */
 #cmakedefine HAVE_HPX
 
+/* OpenMP */
+#cmakedefine HAVE_OPENMP
+
 /* TIFF codec */
 #cmakedefine HAVE_TIFF
 

```

### Steps to reproduce

Enable OpenMP backend

### Issue submission checklist

- [X] I report the issue, it's not a question
- [ ] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: flutter
Issue: Devicelab task: android_stack_size_test fails
Labels: P2,infra: device lab,team-android,triaged-android,from: manual-qa

### 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)

### Steps to reproduce

1. Clone the Flutter packages repository: git clone [GitHub - flutter/flutter: Flutter makes it easy and fast to build beautiful apps for mobile and beyond](https://github.com/flutter/flutter) 
2. Navigate to the devicelab directory: cd dev/devicelab
3. Get the Flutter dependencies: flutter pub get
4. Update utils.dart file adding the following lines:

`newEnvironment['FLUTTER_XCODE_DEVELOPMENT_TEAM']='FLUTTER_XCODE_DEVELOPMENT_TEAM';`

`newEnvironment['ANDROID_SDK_ROOT']='ANDROID_SDK_ROOT';`

5. Connect your physical devices (Android)
6. Run the test using the following command: 

`dart bin/run.dart -t android_stack_size_test`

### Expected results

Running all tests should succeed.

### Actual results

The test case `android_stack_size_test` fails in:

- Samsung Galaxy S8 Android 9
- Samsung Galaxy A52 Android 13
- Google Pixel 6 Android 14

### Code sample

<details><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>


</details>


### Logs

<details><summary>Logs</summary>

```console
DeviceException: Cannot find a suitable Android device
```

[android_stack_size_test.txt](https://github.com/flutter/flutter/files/13254456/android_stack_size_test.txt)


</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel master, 3.16.0-22.0.pre.23, on macOS 14.0 23A344 darwin-arm64 (Rosetta), locale en-UY)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2.4)
[✓] VS Code (version 1.84.0)
```

</details>
Repository: pytorch
Issue: Tracking: Dynamo Tracing Improvements
Labels: triaged,oncall: pt2,module: dynamo

### 🚀 The feature, motivation and pitch

- [ ] Tracing while restoring from checkpoint - Solution: allow graph breaking over _regions_, not just single instruction, and emit `resume_at` at the end of the region
    - [ ] Graph break in Try Except (blocker: cannot restore block stack) https://github.com/pytorch/pytorch/issues/112865
        - inline all instructions until entire block stack is exited (or at least until the _problematic part_ of the block stack is exited), create `resume_at` there
    - [ ] Graph break in loop https://github.com/pytorch/pytorch/issues/112824
        - detect end of natural loop, inline all instructions till end of natural loop, create `resume_at` at end of natural loop (dominator node  of natural loop).
    -  [ ] Optimization: - skip `resume_at` while no `torch.*` in the bytecode. https://github.com/pytorch/pytorch/issues/94652
    - The difficulty with this is knowing the stack and locals at the time of calling resume_at.
- [ ] Graph breaking while inlining - we currently restore to base-level tx before compiling https://github.com/pytorch/pytorch/issues/111003
    - Requires proper restoration of stacks at all levels, including ferrying the graph outs from the base level back to the top-level function call (which can then be consumed as locals). 
- [ ] Cache calls to inline, guard, and reuse recorded graphs - https://github.com/pytorch/pytorch/issues/112303

Undiagnosed (bug?):
- [ ] Graph breaking in if-statement doesn't continue tracing https://github.com/pytorch/pytorch/issues/111918


### Abstractions and Infra

There is also an interesting duality here between "regions" and "functions":
1. if we can convert all `push_block_stack` and natural loops into inlined functions/closures, then we can correctly delineate where they exit. 
2. Conversely, we want to treat inlined functions as though they were all part of a flat "region" - such that one does not need to retrace the function call stack.
3. If we can "hoist" loop bodies into closures i.e. inline functions, we can apply the same inline function cacheing optimizations to speed up tracing loops

This suggests it would be worth investing in more infra to convert between code regions and closures/functions.

cc @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @wconstab @jansel @Chillee @Fidget-Spinner
Repository: flutter
Issue: [shared_preferences] Update platform implementation package examples to account for prefixing
Labels: p: shared_preferences,package,team-ecosystem,P3,triaged-ecosystem

As noted in https://github.com/flutter/flutter/issues/137854#issuecomment-1793043243, the example app's code is no longer correct in our implementation packages (probably since we federated in the first place; we probably just adjusted the API calls and forgot about the prefix stuff, and never noticed since we don't use those examples). We should update them all to use the getter that allows bypassing the prefix now that we have that as an option, as a relatively simple way of making the code work correctly.
Repository: pytorch
Issue: Support for Bazel workspace function or Bazel module
Labels: module: build,triaged,module: bazel

### 🚀 The feature, motivation and pitch

Right now, it seems like it is very difficult (see [this bug filled with issues](https://github.com/pytorch/pytorch/issues/35316)) to add PyTorch as an external dependency on a Bazel project. This is likely because of two related reasons, each with their solutions: 
1. Bazel does not recursively load WORKSPACE files of dependencies, which forces a lot of shortcomings ([see the list from Bazel](https://bazel.build/external/overview#workspace-shortcomings)). Other repos have provided functions that users can call in WORKSPACE files that try and get around this ([see this feature request](https://github.com/google/benchmark/issues/1510)).
2. Bazel has started to transition to [modular support](https://bazel.build/external/module) to remedy this problem, but this requires external dependencies to be registered in some registry (most commonly the [Bazel Central Registry](https://bazel.build/external/registry#bazel_central_registry)). As of now, PyTorch does not have such support for this.

It would be really great if PyTorch address one of the two problems listed here. 



### Alternatives

Either to provide callable functions that make it easier to set up workspaces from parent repos, or add support for Bazel modules. 

### Additional context

_No response_

cc @malfet @seemethere
Repository: godot
Issue: WebGL shader compilation errors are not logged
Labels: bug,platform:web,topic:porting,needs testing

This would be helpful in general, and go a ways to help debug #65696


              > Perhaps we are still blocked on needing better instrumentation? Is there a bug open for that?

There's no specific issue open for it; I suggest opening a separate issue to track this.

It looks like there are two components to this:

- GLSL errors are reported by the GLSL shader compiler (which itself is driver-specific), but WebGL fails to report any (look at the above screenshots, it tries to output an empty string below `Vertex shader compilation failed:`).
  - It looks like we can [call `glGetShaderInfoLog()` in WebGL](https://stackoverflow.com/questions/36601815/shaders-are-not-compiling), like in desktop OpenGL. However, this doesn't work currently (this is what Emscripten does for us) so there is likely another issue at hand. In theory, there should be no need to add web-specific code here.
- Logging format is inconsistent with RenderingDevice-based rendering methods (Forward+/Mobile). To resolve this, https://github.com/godotengine/godot/pull/37579 and https://github.com/godotengine/godot/pull/50537 need to be redone for the Compatibility rendering method. (I just checked and this particular issue occurs on desktop too when using Compatibility.)

> Does the Godot steering committee plan to support Web as a first class compilation target for 4.x?

There's no steering committee to speak of. :slightly_smiling_face: 

In open source, people work on what they want to work on, so there's no ETA for resolving this issue. We intend to keep supporting the web export, but we have relatively few contributors available to work on it. The web platform is also prone to a lot of third-party issues that contributors generally struggle dealing with, because they require specific hardware/software configurations (namely, macOS/iOS-only issues).

_Originally posted by @Calinou in https://github.com/godotengine/godot/issues/65696#issuecomment-1793064506_
Repository: material-ui
Issue: [joy-ui] Add the App Bar component
Labels: new feature,waiting for 👍,package: joy-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

The AppBar component (also known as Navbar and/or Header) is a structural component in many applications and websites, offering convenient props around positioning, scrolling, and spacing.

### Examples 🌈

- [Material UI](https://mui.com/material-ui/react-app-bar/)
- [Base Web](https://baseweb.design/components/header-navigation/)
- [Nordhealth's Nord](https://nordhealth.design/components/header/)

### Motivation 🔦

This issue is motivated by the internal objective to make Joy UI reach component number parity with Material UI as well as to offer components we commonly use when building templates or applications ourselves.
Repository: material-ui
Issue: [joy-ui] Add the Bottom Navigation component
Labels: new feature,waiting for 👍,package: joy-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

The Bottom Navigation component (also known as tab bar) is a sibling component to the App Bar (https://github.com/mui/material-ui/issues/39736) and is frequently used as the primary navigation pattern for mobile designs. It should provide convenient props around spacing, positioning, and scrolling behavior.

### Examples 🌈

- [Material UI](https://mui.com/material-ui/react-bottom-navigation/)
- [Base Web](https://baseweb.design/components/bottom-navigation/)

### Motivation 🔦

This issue is motivated by the internal objective to make Joy UI reach component number parity with Material UI as well as to offer components we commonly use when building templates or applications ourselves.
Repository: ollama
Issue: TPU backend support
Labels: feature request

Would love to see Ollama run on a TPU not just GPU.  Has this been done by anyone already?