sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: worse results by using the MPS backend, compared to the CPU
Labels: needs reproduction,triaged,module: correctness (silent),module: mps

### 🐛 Describe the bug

I bought a M3 Max MacBook a few days before, which I bought for deep learning development, and eagerly to get my hands on it. 

Then I ran the model from this repository: https://github.com/advimman/lama, and compare the results from CPU backend and the MPS backend, found that the result by the MPS backend is significantly worse. This model is to remove some foreground or objects from the image.

And following the official guidance from Apple https://developer.apple.com/metal/pytorch/, I just replace the device from 
`torch.device("cpu")`
to
`torch.device("mps")`

this are the results:

the original image
![8399166846_f6fb4e4b8e_k](https://github.com/pytorch/pytorch/assets/37616995/f10c6077-a02f-403b-87b4-9ab92fe27278)
![16693_12](https://github.com/pytorch/pytorch/assets/37616995/67afbb59-529f-4a4d-88b9-6ff1727cfae0)

result from CPU backend:
![8399166846_f6fb4e4b8e_k_mask](https://github.com/pytorch/pytorch/assets/37616995/6afb14e2-c51e-498b-b42b-9a45d3f6f23e)
![16693_12_mask](https://github.com/pytorch/pytorch/assets/37616995/c90368b1-84c7-40c7-9f85-f62d13cdc363)

result from the MPS backend:
![8399166846_f6fb4e4b8e_k_mask](https://github.com/pytorch/pytorch/assets/37616995/8201b1db-91dc-4d8c-abed-281aa45768d2)
![16693_12_mask](https://github.com/pytorch/pytorch/assets/37616995/47e1b7cf-832a-41bf-ae5c-e89d325c1f64)


I think there must be a bug in the MPS implementation. For this kind of issues, I can't trust the results from the Apple GPU. And I also found some people on the internet found similar problems in the last two years in training and inference. I wonder how long will Apple takes to establish a CUDA-replaceble eco-system.







### Versions

torch version: 2.4.0.dev20240521

Hardware:  M3 Max 64G unified memory
Maxos sonoma 14.3

cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
Repository: electron
Issue: [Bug]: Electron net.fetch can't handle non-ASCII characters in headers
Labels: bug :beetle:,component/net,status/confirmed,has-repro-gist,30-x-y,31-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

30.0.6

### What operating system are you using?

Windows

### Operating System Version

Windows 10 22H2 19045.4291

### What arch are you using?

x64

### Last Known Working Electron version

Unknown

### Expected Behavior

Electron should encode unsupported characters in HTTP headers so that they do not cause uncaught errors

### Actual Behavior

Electron does not check HTTP headers, and because of this, Node.js throws unexpected errors. This can be worked around by encoding headers in `webRequest.onHeadersReceived`, but it won't work, for example, on a modified User Agent.

When `net.fetch` is replaced with the regular `fetch` from Node.js, this issue does not occur for HTTP requests (just like in web browsers). Unfortunately, in Node.js, it is not possible to set non-ASCII headers, and I cannot demonstrate this example.

I understand that using non-ASCII headers is against the HTTP standard, but sometimes servers send such headers (e.g., when a file being downloaded has a non-standard name and that name is placed in the header), and developers using Electron cannot cover all cases (such as a wrong User Agent).

![image](https://github.com/electron/electron/assets/22190585/a0dae26c-53e8-472f-95fa-678484d428b6)


### Testcase Gist URL

https://gist.github.com/shadaxv/742cd824de5a8dfc7893c40432ee4ce1

### Additional Information

There was a similar ticket, but it was closed, I am sending this as a new issue to better mark the details in the template

https://github.com/electron/electron/issues/39469

`webRequest.onHeadersReceived` workaround:
```javascript
// Electron's net.fetch does not support non-ASCII characters in the headers
for (const [key, value] of Object.entries(responseHeaders)) {
  // normalize and convert all non-ASCII characters to ASCII using Buffer
  responseHeaders[key] = value.map((entry) => {
    const normalized = entry.normalize("NFKD");
    const buffer = Buffer.from(normalized, "utf8");
    return buffer.toString("ascii");
  });
}
```
Repository: opencv
Issue: Support for lowpass/anti-alias enabled resizing operations to support preprocessing operations for models trained with torchvision
Labels: feature

### Describe the feature and motivation

Torchvision and the python PIL library implement resizing operations that use a lowpass/anti-alias filter (see https://pytorch.org/vision/stable/generated/torchvision.transforms.Resize.html and https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.resize). The "antialias" option is only supported for 'bilinear' and 'bicubic' interpolation. For torchvision those algorithms are the default with antialias enabled, meaning many computer vision models have been trained with these algorithms as a preprocessing step.

PIL and torchvision are very commonly used for computer vision models. Yet none of the interpolation options for opencv (https://docs.opencv.org/4.x/da/d54/group__imgproc__transform.html#ga5bb5a1fea74ea38e1a5445ca803ff121) for the resize operation in opencv get close to reproducing the result of those options. The difference for smaller images can be quite large, leading to large differences in model inference.

Because it's lacking these operations, I am unable to use OpenCV in my computer vision inference pipeline for models trained with these libraries. For now I've retrained my models, but it might be nice to have this ability in opencv for future models. Hence this feature request.

I would suggest that either:
* New InterpolationFlags are added for lowpass-enabled resizing
* Or an optional bool parameter lowpass or antialias is added to the resize method

Using a low pass filter separately gets closer, but not close enough to entirely reproduce the preprocessing of torchvision.

I'm not the only one having this issue:
* This issue has similar issues: https://github.com/opencv/opencv/issues/22134
* This blogpost has some errors, but does highlight the differences: https://zuru.tech/blog/the-dangers-behind-image-resizing
* I've discussed the same issue on the forum here, with a bit more detail: https://forum.opencv.org/t/anti-aliased-downscaling-in-opencv-for-ml-preprocessing-is-it-possible/17419



### Additional context

_No response_
Repository: PowerToys
Issue: offline AI
Labels: Needs-Triage

### Description of the new feature / enhancement

add offline AI so you can work without the Internet. AI will be able to generate images with different sizes, which can be specified separately. Solve problems, not only in mathematics, but also in chemistry, physics, and so on. 
Generate text, write stories, write code, and so on. Search for different questions on different platforms, for example on YouTube (if you have a connection).

### Scenario when this would be used?

When you need an assistant, and even when there is no Internet

### Supporting information

I described the whole idea earlier
Repository: material-ui
Issue: [material-ui][OutlinedInput] Theme options `ownerState` does not contain correct values
Labels: component: text field,package: material-ui

### Steps to reproduce

Link to live example: (required)

Steps:
1.
2.
3.


### Current behavior

I have an TextField with required set to true.
When styling the MuiOutlinedInput I want conditional styling when the element is required but the ownerstate.required is not set to true.

However, when im styling `MuiFormControl .MuiInputBase-root fieldset:first-of-type` the ownerstate does contain the right information.

### Expected behavior

I expect the MuiOutlinedInput to contain the correct ownerstates since this is the control where i actually set the "required" attribute.

### Context

Conditional styling in my theme options

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>


**Search keywords**: required ownerstate themeoptions
Repository: pytorch
Issue: Compile with non-default mode + triton kernel fails
Labels: triaged,oncall: pt2,module: dynamic shapes

### 🐛 Describe the bug

The examples in the triton+compile tutorial [here](https://pytorch.org/tutorials/recipes/torch_compile_user_defined_triton_kernel_tutorial.html) fail if a non-default mode is provided:
```python
import torch
from torch.utils._triton import has_triton

if not has_triton():
    print("Skipping because triton is not supported on this device.")
else:
    import triton
    from triton import language as tl

    @triton.autotune(
        configs=[
            triton.Config({"BLOCK_SIZE": 4}, num_stages=3, num_warps=8),
            triton.Config({"BLOCK_SIZE": 4}, num_stages=4, num_warps=4),
            triton.Config({"BLOCK_SIZE": 2}, num_stages=3, num_warps=8),
            triton.Config({"BLOCK_SIZE": 2}, num_stages=4, num_warps=4),
        ],
        key=[],
    )
    @triton.jit
    def add_kernel_autotuned(
        in_ptr0,
        in_ptr1,
        out_ptr,
        n_elements,
        BLOCK_SIZE: "tl.constexpr",
    ):
        pid = tl.program_id(axis=0)
        block_start = pid * BLOCK_SIZE
        offsets = block_start + tl.arange(0, BLOCK_SIZE)
        mask = offsets < n_elements
        x = tl.load(in_ptr0 + offsets, mask=mask)
        y = tl.load(in_ptr1 + offsets, mask=mask)
        output = x + y
        tl.store(out_ptr + offsets, output, mask=mask)

    @torch.compile(fullgraph=True, mode="reduce-overhead") # FAILS if mode is provided
    def add_fn(x, y):
        output = torch.zeros_like(x)
        n_elements = output.numel()
        grid = lambda meta: (triton.cdiv(n_elements, meta["BLOCK_SIZE"]),)
        add_kernel_autotuned[grid](x, y, output, n_elements)
        return output

    x = torch.randn(4, device="cuda")
    y = torch.randn(4, device="cuda")
    out = add_fn(x, y)
    print(f"Vector addition of\nX:\t{x}\nY:\t{y}\nis equal to\n{out}")
```

### Error logs

```shell
File "lib/python3.11/site-packages/torch/fx/experimental/symbolic_shapes.py", line 422, in _iterate_exprs
    raise AssertionError(f"cannot extract sympy expressions from {val} {type(val)}")
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AssertionError: cannot extract sympy expressions from {'out_ptr': FakeTensor(..., device='cuda:0', size=(4,))} <class 'torch.fx.immutable_collections.immutable_dict'>
```

### Minified repro

_No response_

### Versions

```shell
[conda] pytorch                   2.4.0.dev20240508 py3.11_cuda12.4_cudnn8.9.2_0    pytorch-nightly
[conda] pytorch-cuda              12.4                 hc786d27_6    pytorch-nightly
[conda] pytorch-mutex             1.0                        cuda    pytorch-nightly
[conda] torchtriton               3.0.0+45fff310c8           py311    pytorch-nightly
```

cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang
Repository: deno
Issue: vendoring file with equals sign in url causes deno publish to fail
Labels: suggestion,publish

Version: Deno 1.43.3

deno vendor create folders with = char, which is not a valid char to publish to jsr.

It's not a bug but I think there is room to improve DX in relation to publish to jsr

![image](https://github.com/denoland/deno/assets/3143445/a44e923d-b0f9-46a2-8c47-9bc3069daaed)
Repository: kubernetes
Issue: Pod deleted during image pull still starts
Labels: priority/backlog,sig/node,kind/feature,triage/accepted

### What happened?

A pod which is deleted during image pull continues the pull, and starts. It may even succeed if the SIGTERM handler exists with 0.

### What did you expect to happen?

Pods which are deleted long before running, for example, during image pull should not start.

### How can we reproduce it (as minimally and precisely as possible)?

0. Setup a watch for the pods: `kubectl get pods -w --output-watch-events -oyaml`
1. Create the following job using a large image:
```yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: indexed-job
spec:
  completions: 1
  parallelism: 1
  backoffLimit: 0
  completionMode: Indexed
  template:
    spec:
      restartPolicy: Never
      containers:
        - name: usybox
          image: nvidia/cuda:11.8.0-devel-ubuntu22.04
          command: ["bash"]
          args:
          - "-c"
          - |
            #!/bin/bash
            terminate() {
              echo "SIGTERM received, exiting with status 0"
              exit 0
            }
            trap 'terminate' SIGTERM
            while true; do
              sleep 1
            done
```

2. Delete the pod `kubectl delete pods/<pod-name>`
3. Observe the events for the pod. There will be update indicating the pod has `Running` phase, and then `Succeeded`.
Example timeline for testing:
1. `2024-05-20T10:36:13Z` - pod created, scheduled and started to pull the image; phase `Pending`, state `ContainerCreating`
2. `2024-05-20T10:36:37Z` - manual deletion, `deletionTimestamp: "2024-05-20T10:37:07Z"`
3. `2024-05-20T10:37:28Z` - pod is running; `phase=Running`
4. `2024-05-20T10:37:29Z` - pod is completed, `phase=Succeeded`

### Anything else we need to know?

This is closely related to https://github.com/kubernetes/kubernetes/issues/122905. If the pull is interrupted it should also address this issue, but maybe there is some easier fix just for this issue.

Currently the issue is mostly about surprise when a user is not expecting a deleted pod to start. Especially since the pod might be deleted long (tested about 1min, but potentially even longer) before it starts.

### Kubernetes version

<details>

```console
Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.1-gke.1589020
```

</details>


### Cloud provider

<details>
GKE, Kind
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: tauri
Issue: [bug] IOS Asset Validation error, missing storyboard?
Labels: type: bug,status: needs triage

### Describe the bug

When uploading the IPA packet generated using `yarn tauri ios build` using OSX app 'Transporter' I'm getting an error back that states:

```
Asset validation failed (90476)
Invalid bundle. Because your app supports Multitasking on iPad, you need to include the LaunchScreen launch storyboard file in your com.******censored*******.app bundle. Use UILaunchScreen instead if the app’s MinimumOSVersion is 14 or higher and you prefer to configure the launch screen without storyboards. For details, see: https://developer.apple.com/documentation/bundleresources/information_property_list/uilaunchstoryboardname (ID: dc66b1a2-1a54-4a07-9066-be20cce9423c)
```

I'm guessing the error is triggerede by the splashscreen as mentioned? I'll try going forward and use UILaunchScreen as suggested. Or maybe there is a storyboard missing from the IOS template?

### Reproduction

_No response_

### Expected behavior

The app should be able to upload using Transporter.

### Full `tauri info` output

```text
warning ../package.json: No license field
$ /Users/jln/src/kw-control-center/node_modules/.bin/tauri info

[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (2024-03-08)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.2
    - pnpm: 9.0.6
    - yarn: 1.22.21
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.18
    - tauri-build [RUST]: 2.0.0-beta.14
    - wry [RUST]: 0.39.4
    - tao [RUST]: 0.27.1
    - tauri-cli [RUST]: 2.0.0-beta.15
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.17

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist/spa
    - devUrl: http://localhost:9000/
    - framework: Vue.js (Quasar)
    - bundler: Vite

[-] iOS
    - Developer Teams: Pascal A/S (ID: BL76TU4HQ6)
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: tauri
Issue: [feat] Integrated browser engine configurable
Labels: type: feature request

### Describe the problem

In reality, I hope that applications can run across platforms and stably, requiring a unified operating environment. Currently, Tauri uses the built-in webview2 of the system, which may not be fully compatible when running on various platforms. Can we learn to use the built-in browser kernel of developers and package it directly into the application when building the application, so that it can run on different platforms using a custom browser kernel to ensure compatibility? Some people may not need this feature, so I hope this feature is configurable.

### Describe the solution you'd like

In reality, I hope that applications can run across platforms and stably, requiring a unified operating environment. Currently, Tauri uses the built-in webview2 of the system, which may not be fully compatible when running on various platforms. Can we learn to use the built-in browser kernel of developers and package it directly into the application when building the application, so that it can run on different platforms using a custom browser kernel to ensure compatibility? Some people may not need this feature, so I hope this feature is configurable.

### Alternatives considered

like electron , but it is configurable.

### Additional context

_No response_
Repository: angular
Issue: Allow c.markAllAsDirty() like c.markAllAsTouched() for AbstractControl class
Labels: area: forms

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

Hi!

Angular's AbstractControl provides [markAllAsTouched()](https://angular.io/api/forms/AbstractControl#markAllAsTouched).

Sometimes we would prefer showing error messages on dirty - not on touched - so it would be very useful to have that option built in into the core as well.

This feature request was originally proposed in an other issue more than 7 years ago: https://github.com/angular/angular/issues/11774#issuecomment-297286290

But for some strange reason it's still not available. Can we please add this?

❤️ Alex T.

### Proposed solution

Allow c.markAllAsDirty() like c.markAllAsTouched() for AbstractControl class.

### Alternatives considered

Using custom solutions as mentioned in https://github.com/angular/angular/issues/11774.
Repository: ollama
Issue: Error Loading Phi Medium
Labels: bug

### What is the issue?

 ollama run phi3:medium 
 downloads the model but then shows this error:
 Error: exception error loading model architecture: unknown model architecture: 'phi3'
 

### OS

macOS

### GPU

Apple

### CPU

Apple

### Ollama version

0.1.29
Repository: deno
Issue: Add `deno doc --html --watch`
Labels: docs,suggestion,--watch

Re-generate HTML output when file in the deps graph changes. Auto-refresh of browser page will be nice too
Repository: vscode
Issue: [19d] potential listener LEAK detected, having 175 listeners already. MOST frequent listener (1):
Labels: error-telemetry

```javascript
Error
at c.create in src/vs/base/common/event.ts:900:15
at $.q [as onMarkerChanged] in src/vs/base/common/event.ts:1095:34
at c in src/vs/base/common/observableInternal/utils.ts:183:28
at c.addObserver in src/vs/base/common/observableInternal/base.ts:264:9
at h.readObservable in src/vs/base/common/observableInternal/autorun.ts:271:14
at c.read in src/vs/base/common/observableInternal/base.ts:196:18
at c.isPresentAtPosition in src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts:224:9
at h._runFn in src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts:147:42
at h.k in src/vs/base/common/observableInternal/autorun.ts:196:10
at new h in src/vs/base/common/observableInternal/autorun.ts:164:8
at D in src/vs/base/common/observableInternal/autorun.ts:17:9
at a.value in out/vs/workbench/workbench.desktop.main.js:1239:52616
at g.y in src/vs/base/common/event.ts:1196:13
at g.z in src/vs/base/common/event.ts:1207:9
at g.fire in src/vs/base/common/event.ts:1231:9
at a.value in src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts:1710:38
at g.y in src/vs/base/common/event.ts:1196:13
at g.fire in src/vs/base/common/event.ts:1227:9
at I.s in src/vs/editor/common/viewModelEventDispatcher.ts:64:18
at I.endEmitViewEvents in src/vs/editor/common/viewModelEventDispatcher.ts:109:8
at p.S in src/vs/editor/common/viewModel/viewModelImpl.ts:1109:26
at p.restoreCursorState in src/vs/editor/common/viewModel/viewModelImpl.ts:1034:8
at x.restoreViewState in src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts:999:32
at M.setInput in src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts:139:14
at async s.S in src/vs/workbench/browser/parts/editor/editorPanes.ts:434:4
at async s.L in src/vs/workbench/browser/parts/editor/editorPanes.ts:254:34
at async s.openEditor in src/vs/workbench/browser/parts/editor/editorPanes.ts:131:11
at async in src/vs/workbench/browser/parts/editor/editorGroupView.ts:1299:49
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=405ce83a24f38fd70751b03438763a1503329fe0&bH=016f437e-214a-1d7d-fadd-ae71c87abc78)