sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [tools] Consider adding getter methods to `Config` that cast values for better type-safety
Labels: tool,P3,c: tech-debt,team-tool,triaged-tool

Discovered while implementing https://github.com/flutter/flutter/pull/128264 in [this comment](https://github.com/flutter/flutter/pull/128264#discussion_r1218544300).

Perhaps we could add methods similar to these ones from `FlutterCommand`:

https://github.com/flutter/flutter/blob/cd18c8c02f3f2bdee61c19ca440d8849e6b9f24b/packages/flutter_tools/lib/src/runner/flutter_command.dart#L1640-L1665
Repository: kubernetes
Issue: Server-Side Apply should return a proper http status when validation fails
Labels: priority/important-soon,lifecycle/rotten,wg/api-expression,needs-triage

Server-Side Apply has different constraints for updating the managed fields and applying than typical objects, and sometimes the discrepency can cause problem.

When trying to update the `managedFields`, if the object doesn't validate, then the whole `managedFields` list is removed, the error is ignored as to continue with the normal process. But then such an object can't ever be applied, since it can't be converted into the type of objects that server-side apply uses.

Right now, when this happens, the server-side apply request fails with a generic 500. We're trying decide what code should be returned in that case (solving the problem of applying such an object is a separate issue), so that the client can possibly try a different way. Here's the problem though: there is fundamentally nothing wrong with the client request, so 4xx doesn't really fit, and yet, the client should take an action since there isn't much we can do server-side, so a 5xx doesn't really fit either.

cc @thockin @alculquicondor @aojea @jpbetz
Repository: flutter
Issue: Support multiple views for pointer events in flutter_test
Labels: a: tests,framework,P2,team-framework,triaged-framework
Repository: pytorch
Issue: MPS bug: padding_idx in nn.Embedding does not prevent gradient accumulation 
Labels: triaged,module: correctness (silent),module: mps

### The `padding_idx` in `nn.Embedding` does not prevent gradient accumulation when run on MPS

Expected behaviour:
```python
import torch

embedding = torch.nn.Embedding(5, 3, padding_idx=0)
input_ids = torch.LongTensor([[0, 1, 1, 2]]) # padding_token, token_1, token_1, token_2
loss = torch.sum(embedding(input_ids))
loss.backward()
# expect to see zeros for the padding token, 2 for token_1, 1 for token_2, and 0 for other tokens
expected = torch.tensor([0, 2, 1, 0, 0]).repeat(3, 1).T
assert torch.all(torch.eq(embedding.weight.grad, expected)), embedding.weight.grad  # all good
```

On MPS the gradient accumulates for the padding_idx:
```python

embedding = torch.nn.Embedding(5, 3, padding_idx=0).to('mps')
input_ids = torch.LongTensor([[0, 1, 1, 2]]).to('mps') # padding_token, token_1, token_1, token_2
loss = torch.sum(embedding(input_ids))
loss.backward()
# expect to see zeros for the padding token, 2 for token_1, 1 for token_2, and 0 for other tokens
expected = torch.tensor([0, 2, 1, 0, 0]).repeat(3, 1).T.to('mps')
assert torch.all(torch.eq(embedding.weight.grad, expected)), embedding.weight.grad  # fails
```
```python
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[10], line 7
      5 # expect to see zeros for the padding token, 2 for token_1, 1 for token_2, and 0 for other tokens
      6 expected = torch.tensor([0, 2, 1, 0, 0]).repeat(3, 1).T.to('mps')
----> 7 assert torch.all(torch.eq(embedding.weight.grad, expected)), embedding.weight.grad

AssertionError: tensor([[1., 1., 1.],
        [2., 2., 2.],
        [1., 1., 1.],
        [0., 0., 0.],
        [0., 0., 0.]], device='mps:0')
```
This would lead to the padding vector being updated unexpectedly during training on MPS. 

### Versions

Collecting environment information...
PyTorch version: 2.0.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 13.3.1 (arm64)
GCC version: Could not collect
Clang version: 14.0.3 (clang-1403.0.22.14.1)
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:12:31) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-13.3.1-arm64-i386-64bit
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

CPU:
Apple M1 Max

Versions of relevant libraries:
[pip3] flake8==4.0.1
[pip3] numpy==1.22.4
[pip3] torch==2.0.1
[conda] numpy                     1.22.4          py310h0a343b5_0    conda-forge
[conda] pytorch                   2.0.1                  py3.10_0    pytorch

cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen @razarmehr @abhudev
Repository: flutter
Issue: Update `chip.dart` to use set of `MaterialState`
Labels: framework,f: material design,P2,c: tech-debt,team-design,triaged-design

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

Currently, two classes in the framework use `MaterialStateMixin`
1. `material/chip.dart` 
2. `material/button.dart` (to be deprecated widget)

While working on https://github.com/flutter/flutter/issues/115827, I noticed this.
Every other class in the framework uses a set of `MaterialState`, which is updated for different states within the widget.

### Proposal

My proposal is, either to make `chip.dart` consistent with the rest of the framework to maintain material states by removing `MaterialStateMixin` and using a set of material state
or 
continue using `MaterialStateMixin` and consider why `MaterialStateMixin` is needed.
Repository: storybook
Issue: [Bug]: Storybook launches in the wrong browser
Labels: bug,help wanted,cli,sev:S4

### Describe the bug

On MacOS when my default browser is set to chrome, running `start-storybook` causes the storybook instance to launch in brave instead of chrome if both browsers are open.

### To Reproduce

Open an instance of brave and chrome with chrome as your default browser. Run `start-storybook` and the storybook tab will be opened in brave instead of chrome.

### System

```shell
Environment Info:

  System:
    OS: macOS 13.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 3.5.0 - ~/codebase/sf-ui-web/node_modules/.bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.90
    Safari: 16.5
```


### Additional context

_No response_
Repository: storybook
Issue: [Bug]: Typescript optional function is not default to undefined in story
Labels: bug,block: source

### Describe the bug

When I create a component and set a property to optional function and then try to test the story I see storybook create a mock function and sent it to component as default

For example
```
interface Props{
   onChange?: () => void
}
```

And here is code generated from storybook

`<Component onChange={() => {}} />`

Even in example that generate by default, in Button component `onClick` is optional but storybook still ignore it and add it by default even when `argTypes` and `args` are empty

Im not sure What i should to reproduce as this issue exist in the default example in Button component



### To Reproduce

https://stackblitz.com/github/storybookjs/sandboxes/tree/next/react-vite/default-ts/after-storybook?file=src%2Fstories%2FButton.stories.ts&preset=node

### System

_No response_

### Additional context

_No response_
Repository: TypeScript
Issue: Typedef of object with generic property fails since 5.1
Labels: Needs Investigation

# Bug Report

### 🔎 Search Terms

generic typedef object

### 🕗 Version & Regression Information

- This changed between versions 5.0.4 and 5.1.3

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=5.1.3&filetype=js#code/PQKhAIChwgBAXAngBwKYBNUDNwG8DyARgFaoDG8AvuPtHMgE4D2aDSeAggwwIaIA8AFQB81HnXAJUAW2QAbHvFThBdYJCA)

### 💻 Code

```js
/** 
 * @typedef {Object} O
 * @property {Array<T>} a Array of T
 * @template T
 */
```

### 🙁 Actual behavior

Templated properties produce an error since upgrading TS to 5.1.3

### 🙂 Expected behavior

Generic properties should work as in 5.0.4

This still works, but it should be functionally equivalent to the typedef above. Though the syntax with `@property` is preferable as each property can be documented with a description.
```js
/** 
 * @typedef {{a: Array<T>}} O
 * @template T
 */
```
Repository: flutter
Issue: IconButton tooltip should appear on keyboard focus
Labels: framework,a: accessibility,f: focus,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-design,triaged-design

### 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

This is mostly focused on Flutter-web use-cases and thus references the ARIA spec.

1. Run the first `IconButton` example with a tooltip: https://api.flutter.dev/flutter/material/IconButton-class.html.
2. Hover the mouse. The tooltip appears.
3. Move the mouse away and tab-focus into the button. No tooltip appears.

### Expected results

While it's true that browser-native tooltips do not appear on button focus, [the ARIA spec for Web accessibility requires tooltips to appear on keyboard focus and hide when `Escape` is pressed](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tooltip_role). This helps sighted users with physical impairments who cannot use the mouse be able to know what an icon button does.

### Actual results

The tooltip doesn't appear on `IconButton` focus.
Repository: flutter
Issue: Smart scheduling dependent targets
Labels: team-infra,P2,triaged-infra,:hourglass_flowing_sand:

Flutter infra team has been spending quarters effort to scale running tasks. One big milestone is separating tasks to subbuilds to improve efficiency and enhance reusability.

- Engine targets are now being migrated to engine_v2, which separates different logics into their own self-contained steps: build, test, generator, archive. [flutter.dev/go/engine-build-definition-language](flutter.dev/go/engine-build-definition-language)
- Framework devicelab targets are now being migrated to build+test models [go/devicelab-build-test](http://go/devicelab-build-test)

The current scheduling workflow however is bearing with several issues:
- it needs an orchestrator build to schedule all subbuilds
- any single subbuild fails will cause the whole orchestrator build failure
- the latter subbuild can only be triggered after all artifacts are finished building, though may need only one of them

This bug tracks a smart graph scheduling logic for these dependent targets to save resources and validation time.
Repository: go
Issue: x/telemetry: tests fail for openbsd
Labels: NeedsInvestigation,telemetry

This is a placeholder to note that in the telemetry package, two tests are skipped if runtime.GOOS is openbsd.
Repository: go
Issue: x/net: data race in trace package
Labels: NeedsInvestigation

From https://github.com/golang/net/blob/10cf388024ca83e11a073bb365ccda2b2806d103/trace/events.go#L61-L66:

```go
	data.Families = make([]string, 0, len(families))
	famMu.RLock()
	for name := range families {
		data.Families = append(data.Families, name)
	}
	famMu.RUnlock()
```

Shouldn't `len(families)` be done with the mutex held? It's a package-level field that seem to be protected by the mutex.
Repository: pytorch
Issue: [Pytorch 2.0] torch::nn::Dropout output is incorrect on Windows  
Labels: module: binaries,module: windows,module: cpp,triaged,module: regression

### 🐛 Describe the bug

Reproduce steps:
1. refer to https://pytorch.org/cppdocs/installing.html
2. download pytorch 2.0.1 windows libtorch package from https://pytorch.org/
3. update the example-app.cpp
```cpp
#include <torch/torch.h>
#include <iostream>
int main() {
	auto m = torch::nn::Dropout(torch::nn::DropoutOptions().p(0.42));
	std::cout << "module : " << std::endl << m << std::endl << std::endl;
	std::cin.get();
}
```
4. build and run
```
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch ..
cmake --build . --config Release
Release\example-app.exe
```
5. the p in the output is incorrect
  if libtorch is libtorch-win-shared-with-deps-2.0.1+cu117, the p is a random value.
    ```
    module :
    torch::nn::Dropout(p=8.749e+99, inplace=false)
    ```
    if libtorch is libtorch-win-shared-with-deps-2.0.1+cpu, the p is zero
    `torch::nn::Dropout(p=0, inplace=false)`


The result is correct on Linux or Libtorch1.13 on Windows.
```
module :
torch::nn::Dropout(p=0.42, inplace=true)
```

### Versions

Stable(2.0.1) LibTorch
The output isn't correct with CPU or CUDA binaries.


cc @seemethere @malfet @peterjc123 @skyline75489 @nbcsm @vladimir-aubrecht @iremyux @Blackhex @cristianPanaite @jbschlosser @ezyang @gchanan @zou3519
Repository: terminal
Issue: Network Injected Azure Cloud Shell Not Supported
Labels: Issue-Bug,Product-Terminal,Area-AzureShell,Priority-3

### Windows Terminal version

1.17.11461.0

### Windows build number

10.0.22621.0

### Other Software

_No response_

### Steps to reproduce

1. Configure Cloud Shell with Azure Virtual Network injection according to [the documentation](https://learn.microsoft.com/en-us/azure/cloud-shell/private-vnet). **IMPORTANT:** Deploy the virtual network in a Cloud Shell [primary region](https://learn.microsoft.com/en-us/azure/cloud-shell/persisting-shell-storage#supported-storage-regions) to avoid failures, e.g. East US, West US, or South Central US as it seems secondary region support isn't guaranteed for the virtual network injection scenario in other regions.
2. Open an Azure Cloud Shell tab and perform device code login.
3. [Optional] Select a tenant from the list displayed by Terminal if appropriate for your account.
4. Elect whether to save connection settings.
5. Observe outputs.

### Expected Behavior

A terminal prompt.

### Actual Behavior

After logging in, selecting a tenant from my account list, and confirming saving connection settings, the terminal immediately displays:

>Requesting a cloud shell instance...
>Succeeded.
>Requesting a terminal (this might take a while)...
>
>[process exited with code 1 (0x00000001)]
>You can now close this terminal with Ctrl+D, or press Enter to restart.
Repository: react
Issue: Bug: there is no renderToReadableStream function in react-dom@18.2.0 in Node.js
Labels: Status: Unconfirmed

I try to use `renderToReadableStream` function from `react-dom/server` in Node.js but there is no such function in package.

React version: 18.2.0
Node.js version 16.15.0 or 18.16.0

## Steps To Reproduce

1. create `index.mjs` file
2. insert code:
   ```js
   import { renderToString, renderToReadableStream } from "react-dom/server";

   console.log({ renderToString, renderToReadableStream });
   ```
3. run `node index.mjs` in terminal

Link to code example:

[StackBlitz](https://stackblitz.com/edit/node-yn12fy?file=index.mjs)

## The current behavior

Error in terminal:
```sh
file:///Users/user/Projects/node-fetch-api-server/index.mjs:1
import { renderToString, renderToReadableStream } from "react-dom/server";
                         ^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'renderToReadableStream' not found. The requested module 'react-dom/server' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'react-dom/server';
const { renderToString, renderToReadableStream } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Node.js v18.16.0
```

## The expected behavior

Node.js suupports web streams in experimental mode.

The package `react-dom/server` must have a function `renderToReadableStream` according to the documentation:
https://react.dev/reference/react-dom/server/renderToReadableStream
Repository: rust
Issue: The ref to *const implicit conversion has become a footgun with e.g. Rc::from_raw
Labels: C-discussion,T-opsem

The following code does nothing in practice (no strong reference added to the Rc) with 1.70 or earlier versions compiled against LLVM 16.

```rust
use std::rc::Rc;
use std::mem;

pub struct Foo;

pub unsafe extern "C" fn addref(f: &Foo) {
    let raw = Rc::from_raw(f);
    mem::forget(Rc::clone(&raw));
    mem::forget(raw);
}
```

The corresponding (release) IR, per the playground:
```
define void @_ZN10playground6addref17h4ebcfc6cc7bb1438E(ptr noalias noundef nonnull readonly align 1 %f) unnamed_addr #0 personality ptr @rust_eh_personality {
start:
  %0 = getelementptr inbounds i8, ptr %f, i64 -16
  %self.val.i = load i64, ptr %0, align 8, !noundef !2
  %_3.i = icmp ne i64 %self.val.i, 0
  tail call void @llvm.assume(i1 %_3.i)
  %_10.i = icmp eq i64 %self.val.i, -1
  br i1 %_10.i, label %bb4.i, label %bb6

bb4.i:                                            ; preds = %start
  tail call void @llvm.trap()
  unreachable

bb6:                                              ; preds = %start
  ret void
}
```

Changing the ref to a *const "fixes" the problem.

```rust
use std::rc::Rc;
use std::mem;

pub struct Foo;

pub unsafe extern "C" fn addref(f: *const Foo) {
    let raw = Rc::from_raw(f);
    mem::forget(Rc::clone(&raw));
    mem::forget(raw);
}
```

IR looks like this:
```
define void @_ZN10playground6addref17h3157527175b7319bE(ptr noundef %f) unnamed_addr #0 personality ptr @rust_eh_personality {
start:
  %0 = getelementptr inbounds i8, ptr %f, i64 -16
  %self.val.i = load i64, ptr %0, align 8, !noundef !2
  %_3.i = icmp ne i64 %self.val.i, 0
  tail call void @llvm.assume(i1 %_3.i)
  %strong1.i = add i64 %self.val.i, 1
  store i64 %strong1.i, ptr %0, align 8
  %_10.i = icmp eq i64 %strong1.i, 0
  br i1 %_10.i, label %bb4.i, label %bb6

bb4.i:                                            ; preds = %start
  tail call void @llvm.trap()
  unreachable

bb6:                                              ; preds = %start
  ret void
}
```

Here, the Rc is updated with a new strong reference.

This is another footgun that comes from https://github.com/llvm/llvm-project/commit/01859da84bad95fd51d6a03b08b60c660e642a4f, along with #111229.
Repository: flutter
Issue: Add support for visionOS
Labels: c: new feature,tool,engine,customer: crowd,c: proposal,P3,would require significant investment,team-engine,triaged-engine

### Use case

The apple vision pro was released yesterday. It would be nice to have support for that. Even though most apps will be supported out of the box. This ticket can track the evolution of vision pro for Flutter

### Proposal

This should just work out of the box.
Repository: tensorflow
Issue: Inference model error when xla enabled with error message "OP_REQUIRES failed at xla_ops.cc:462 : NOT_FOUND: could not find registered platform with id: 0x7f7537df9c24"
Labels: stat:awaiting tensorflower,type:bug,comp:runtime,comp:xla,TF 2.9

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

tf2.9.2

### Custom Code

Yes

### OS Platform and Distribution

Linux Ubuntu 16.04

### Mobile device

_No response_

### Python version

Python 3.10.6

### Bazel version

5.3.2

### GCC/Compiler version

gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

### CUDA/cuDNN version

11.6

### GPU model and memory

_No response_

### Current Behaviour?

A bug happened!

### Standalone code to reproduce the issue

```shell
inference model error in c++ running with xla enabled. when xla disabled, all works fine.

run with option:
export XLA_FLAGS="--xla_dump_to=/tmp/generated --xla_hlo_profile"
export TF_XLA_FLAGS="--tf_xla_auto_jit=2 --tf_xla_cpu_global_jit"
```


### Relevant log output

```shell
2023-06-06 13:54:27.650731: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at xla_ops.cc:462 : NOT_FOUND: could not find registered platform with id: 0x7f7537df9c2
```
</details>
Repository: pytorch
Issue: Unexpected failure in LLVM JIT when running TorchScript model in C++
Labels: oncall: jit

### 🐛 Describe the bug

I have a [TorchScript model](https://github.com/pytorch/pytorch/files/11661294/model.zip) that I exported from Python and loaded in C++ via the following snippet (network is member of a class)
```c++
network = torch::jit::load(request_msg.torch_script_path);
network.eval();
```

The model is a standard feedforward model with [1024, 512, 256, 256] linear units and ELU activations and producing 4 output values with a final linear layer. When I try to execute the loaded model via 
```c++
std::vector<c10::IValue> inputs;
inputs.emplace_back(torch::zeros({1, 275}, torch::kFloat32));
auto network_effort_internal = network.forward(inputs);
```
I get the following error on the second time I try to call the network
```
terminate called after throwing an instance of 'c10::Error'
  what():  valOrErr INTERNAL ASSERT FAILED at "../torch/csrc/jit/tensorexpr/llvm_jit.h":33, please report a bug to PyTorch. Unexpected failure in LLVM JIT: Unable to find target for this triple (no targets are registered)
```
Interestingly, I can prevent the error from appearing by cloning the network prior to each call
```
network = network.clone();
```
which is however not a solution since this can be a rather costly operation compared to the execution of the model. This error has also[ been mentioned in the PyTorch discussion forum](https://discuss.pytorch.org/t/calling-forward-on-torchscript-model-multiple-times-leads-to-error/154990), however has not seen much discussion so far.


### Versions

I am using libtorch in Version 2.0.1. The model has been exported from PyTorch 1.11.0 but I also checked with Python version 2.0.1 with no change in behavior.

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: PowerToys
Issue: FancyZones continuously accesses file system, eg, settings.json etc
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.70.1

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

* Start Process Monitor.
* Filter for File System Activity
* Filter for "Process = PowerToys.FancyZones.exe"

Expected:
* Application does not constantly interact with file system

Actual:
* Application keeps issuing file requests for settings.json, constom-layouts.json, applied-layoutys.json, etc

![image](https://github.com/microsoft/PowerToys/assets/28550406/f972c269-72fa-48c2-8cb9-9442fce1fc98)




### ✔️ Expected Behavior

Application does not constantly interact with file system. If state needs to be updated when a file changes, then it should register and listen for a file-change notification.


### ❌ Actual Behavior

Constantly makes file system requests.

### Other Software

Win10x64.