sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: test_to (__main__.TestTorch) fails with multiple gpus
Labels: module: multi-gpu,triaged,actionable

### 🐛 Describe the bug

The code below: 
https://github.com/pytorch/pytorch/blob/664bb4de490198f1d68b16b21407090daa995ba8/test/test_torch.py#L7645

sets the device as device 1 if multiple gpus are found. It compares against a tensor on device 0 and fails. This test is part of the single gpu tests, and should not be using distributed setup.

```
======================================================================
FAIL: test_to (__main__.TestTorch)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_torch.py", line 7662, in test_to
    self._test_to_with_layout(torch.sparse_csr)
  File "test_torch.py", line 7654, in _test_to_with_layout
    self.assertEqual(b.device, a.to(cuda, non_blocking=non_blocking).device)
  File "/opt/conda/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 2258, in assertEqual
    msg=msg,
  File "/opt/conda/lib/python3.7/site-packages/torch/testing/_comparison.py", line 1086, in assert_equal
    raise error_metas[0].to_error()
AssertionError: Object comparison failed: device(type='cuda', index=1) != device(type='cuda', index=0)
```

### Versions

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 14.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-5.1.1 22114 5cba46feb6af367b1cafaa183ec42dbfb8207b14)
CMake version: version 3.22.1
Libc version: glibc-2.17

Python version: 3.7.13 (default, Mar 29 2022, 02:18:16)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-99-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] mypy==0.812
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.20.3
[pip3] torch==1.12.0a0+git0bf2bb0
[conda] mkl                       2022.0.1           h06a4308_117
[conda] mkl-include               2022.0.1           h06a4308_117
[conda] numpy                     1.20.3                   pypi_0    pypi
[conda] torch                     1.12.0a0+git0bf2bb0          pypi_0    pypi
Repository: storybook
Issue: Automigration: React
Labels: feature request,cli

To address `can't resolve 'react/package.json' issues, add the following automigration:

1. Try to resolve `react` and `react-dom`
2. If the resolution fails, offer to install for the user:

> We noticed that you don't have `react` or `react-dom` installed. Due to changes in modern package managers (e.g. npm8) we now recommend that you install these as dev dependencies in your project.

Example issues: https://github.com/storybookjs/storybook/issues/17448 https://github.com/storybookjs/storybook/issues/18266
Repository: storybook
Issue: Lit decorators require babel configuration that breaks storybook MDX parsing.
Labels: bug,configuration babel / webpack,mdx,web-components

**Describe the bug**
I am using storybook with a lit web component project. In order to use lit decorators, I have to add a couple of configurations in according to [this lit documentation](https://lit.dev/docs/components/decorators/#using-decorators-with-typescript-and-babel).

babel.config.json:
```bash
{
  "assumptions": {
    "setPublicClassFields": true
  },
  "plugins":[
    ["@babel/plugin-transform-typescript", {"allowDeclareFields": true}],
    ["@babel/plugin-proposal-decorators", {"decoratorsBeforeExport": true}],
    ["@babel/plugin-proposal-class-properties"]
  ]
}
```

main.js:

```bash
module.exports = {
  "stories": [
    "../src/**/*.stories.mdx",
    "../src/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    {
      name: '@storybook/addon-docs',
      options: { configureJSX: true },
    },
  ],
  "framework": "@storybook/web-components",
  "core": {
    "builder": "@storybook/builder-webpack5"
  }
}
```

tsconfig.json:
```bash
{
  "compilerOptions": {
    "target": "es2017",
    "module": "es2015",
    "moduleResolution": "node",
    "lib": ["es2017", "dom", "dom.iterable"],
    "declaration": true,
    "sourceMap": true,
    "inlineSources": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "noImplicitAny": false,
    "outDir": "./",
    "importHelpers": true,
    "useDefineForClassFields": false,
    "types": ["mdx"]
  },
  "include": ["**/*.ts", "**/*.mdx"],
  "exclude": ["node_modules"]
}
```

**To Reproduce**
Create a web component project add lit2 and run storybook init with webpack5 and -t web_components. 
`npm run storybook`

**System**
Environment Info:

  System:
    OS: macOS 12.2
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 16.15.0 - /usr/local/bin/node
    npm: 8.5.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 101.0.4951.64
    Firefox: 100.0.2
    Safari: 15.3
  npmPackages:
    @storybook/addon-actions: ^6.5.5 => 6.5.5 
    @storybook/addon-essentials: ^6.5.5 => 6.5.5 
    @storybook/addon-links: ^6.5.5 => 6.5.5 
    @storybook/builder-webpack5: ^6.5.5 => 6.5.5 
    @storybook/manager-webpack5: ^6.5.5 => 6.5.5 
    @storybook/web-components: ^6.5.5 => 6.5.5 
  npmGlobalPackages:
    @storybook/cli: 6.5.0

**Additional context**
Here is the error with babel config as described above 
```bash
ModuleBuildError: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: src/stories/Introduction.stories.mdx: Unexpected token, expected "," (28:20)

  26 |   ...props
  27 | }) {
> 28 |   return <MDXLayout {...layoutProps} {...props} components={components} mdxType="MDXLayout">
     |                     ^
  29 |
  30 |     <Meta title="Example/Introduction" mdxType="Meta" />
  31 |     <style>
```
Repository: flutter
Issue: [Android compiling] Use the same linting rules as those in g3
Labels: platform-android,engine,P2,c: tech-debt,team-android,triaged-android

One of my PR that could be built and run on my local machine was blocked by g3, and had to be reverted. The error turns out to be a linting rule that requires the suffix for `long long` to be `L` instead of `l`  (see [here](https://github.com/flutter/engine/pull/33567/commits/c7294657a309ddb7276c8d9e32274f0e47951bcf) for my fix to reland it). 

We should keep our linting rule up to date with the ones in g3, or at least add this rule in to prevent this kind of reverts further happening.
Repository: opencv
Issue: Accuracy concerns about calibrateCamera
Labels: feature,category: calib3d

I have a project that requires some really good accuracy when measuring an object. The object measures about 1000 mm with a desired accuracy  below 0.1 % at 1000 mm.

For that, I'm testing first the accuracy of calibrateCamera with synthetic data and I have some strange results. I have several questions

1)
In the online documentation, there is no constraint on the number of pictures required for this function. In the code, it seems the only constraint is about getting at least one picture. Does the function can work with only 5 pictures when data are perfect and get a result very accurate ? 

I have simulated a calibration pattern taken with five different point of views. The given intrinsics is actually the correct solution.
I'm ending with a slightly different focal. I have an error of 0.015 %. I was expecting something smaller. The error may come from the estimation of the position of each camera and then transfer back on the focal.

I have also used the same example but with  a starting guess focal with an error of 3%. I'm ending up with 0.49 % of error.
If I'm using a second time the function with the previous solution, the error decreases again. It seems by calling several times the function, the final accuracy is about function  0.012%.

My first guess about this strange behaviour may be related to the number of iterations in the term criteria. So I have changed the iteration numbers from 30 to 1000 but it did not change anything.

I'm testing with 3% of error on the focal and also 3% on the principal point of the camera, I'm ending up with an error of 3.3 % on the focal. Several calls needs to be done to have a valid result.

2) In my real project, I have a large calibration pattern bigger than the camera can see. So I have also simulated this case.
If I'm taking the a small part starting from then first point (0, 0) I have some result. If I'm using a different part of the pattern the result is different. 
If I'm translating the 3d points of the calibration pattern in order to have the centre of the bounding box at (0.0, 0.0, 0.0) I'm ending with a better solution.
It seems that the function lacks some of data normalisation to improve the final result.

- OpenCV => 4.5
- Operating System / Platform => macOS 10.13
- Compiler =>Xcode 10
Repository: material-ui
Issue: Components rendered by React 18 ReactDOMServer don't have CSS classes reflecting their `sx` prop
Labels: external dependency,package: system

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Components rendered with ReactDOMServer are given a unique CSS class for the style changes in their `sx` prop, but this CSS class does not actually get created, so the rendered component is unstyled. Excecption: if the component shares an `sx` prop with another component that is rendered normally, the CSS is added and rendered correctly.

### Expected behavior 🤔

Components rendered with ReactDOMServer should have styles that match the `sx` prop applied.

### Steps to reproduce 🕹

I have created a minimal reproduction on CodeSandbox: https://codesandbox.io/s/nervous-benz-354utb?file=/src/Demo.tsx

### Context 🔦

I am working with some non-React JS libraries (in this case, Leaflet) that renders raw HTML strings. If I want to render a component within the context of this library, I must first render the component as a string on the client side (with `ReactDOMServer.renderToString()` and pass this string to the library. Unfortunately, styling via the `sx` prop is not possible with this method.

I believe this issue is a duplicate of #30865. This issue does not happen on React 17.

### Your environment 🌎

_No response_
Repository: PowerToys
Issue: Keyboard manager does not disable hotkeys when they are "rolled"
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Status-In progress,Priority-2,Status-Reproducible

### Microsoft PowerToys version

v.058.0

### Running as admin

- [X] Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

1. set up a remap to win + E and set that to disable on all apps
2. set up a remap to win + V and set that to disable on all apps

A quick definition of how I'm using the term "rolled". While holding down lwin, Hold E then hold V,
When doing the lwin + E OR lwin + V shortcut it correctly clears the hotkey. However if you "roll" the hotkey by holding down lwin + E + V you can see it no longer overriding it with left click oemclear anymore.

In the attached video you can see that at around 4 seconds the clipboard history fires off (lwin + v) and right after the explorer fires off (lwin+E)

The keyboard overlay on the left side also shows the key press sequences and the vs code window has a summary of what I'm trying to demonstrate.


https://user-images.githubusercontent.com/13132548/170129123-7314910c-3b1a-4740-bbd1-f93655376925.mp4

### ✔️ Expected Behavior

I had expected it to not allow those hotkeys through when rolled. OR to allow definitions of LWIN+E+V to be defined so that it can also be set to disabled. The second ask might be a weird one because it's not often that people chord two or more keys after holding down a modifier.

### ❌ Actual Behavior

fires off the disabled hotkeys when you roll two keys together even though these are keys set to disabled.

### Other Software

_No response_
Repository: pytorch
Issue: DISABLED test_complex_half_reference_testing_as_strided_scatter_cuda_complex32 (__main__.TestCommonCUDA)
Labels: module: rocm,triaged,skipped

Platforms:  rocm

This test was disabled because it is failing on master ([recent examples](http://torch-ci.com/failure/test_complex_half_reference_testing_as_strided_scatter_cuda_complex32%2C%20TestCommonCUDA)).

cc @jeffdaily @sunway513 @jithunnair-amd @ROCmSupport @KyleCZH
Repository: pytorch
Issue: Performance with MPS on AMD GPUs are worse than CPU
Labels: module: performance,triaged,module: mps

### 🐛 Describe the bug

I tried running some experiments on the RX5300M 4GB GPU and everything seems to work correctly. The problem is that the performance are worse than the ones on the CPU of the same Mac.

To reproduce, just clone the tests in this repo `https://github.com/lucadiliello/pytorch-apple-silicon-benchmarks` and run either
```bash
python tests/transformers_sequence_classification.py --device mps --pre_trained_name bert-base-cased --mode inference --steps 100 --sequence_length 128 --batch_size 16
```
or
```bash
python tests/transformers_sequence_classification.py --device cpu --pre_trained_name bert-base-cased --mode inference --steps 100 --sequence_length 128 --batch_size 16
```

While the CPU took `143s`, with the MPS backend the test completed in `228s`. I'm sure the GPU was being because I constantly monitored the usage with `Activity Monitor`.

### Versions

PyTorch version: 1.13.0.dev20220524
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.3.1 (x86_64)
GCC version: Could not collect
Clang version: 13.1.6 (clang-1316.0.21.2.5)
CMake version: Could not collect
Libc version: N/A

Python version: 3.8.12 (default, Oct 12 2021, 06:23:56)  [Clang 10.0.0 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
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

Versions of relevant libraries:
[pip3] numpy==1.22.4
[pip3] torch==1.13.0.dev20220524
[pip3] torchaudio==0.12.0.dev20220524
[pip3] torchvision==0.13.0.dev20220524
[conda] numpy                     1.22.4                   pypi_0    pypi
[conda] torch                     1.13.0.dev20220524          pypi_0    pypi
[conda] torchaudio                0.12.0.dev20220524          pypi_0    pypi
[conda] torchvision               0.13.0.dev20220524          pypi_0    pypi

cc @VitalyFedyunin @ngimel
Repository: yt-dlp
Issue: Adultswim Streams Support Suggestion
Labels: site-request

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2022.05.18** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that none of provided URLs [violate any copyrights](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Example URLs

https://www.adultswim.com/streams/rick-and-morty
https://www.adultswim.com/streams/last-stream-on-the-left-channel

### Description

The streams provided on the website are freely watchable, and are powered by the m3u8 format. I have made a [custom script](https://github.com/yt-dlp/yt-dlp/files/8766337/recordAdultSwim.py.txt) to download those videos one by one, with correct episode labels and would like to adapt it to yt-dlp, so people can forego that slow browser player and watch these old episodes offline.

So before making a pull request I'd like to ask of you whether you'd regard this idea as acceptable.
Repository: flutter
Issue: [Selection] Reimplement SelectableText with SelectionArea
Labels: framework,P3,c: tech-debt,f: selection,team-framework,triaged-framework

SelectableText is currently a read only EditableText which has several issues, such as the selection is bounded in a single selectable text, and it may be costly in terms of memory usage.

The idea is reimplement SelectableText with SelectionArea + text, but we should make sure they are feature on par before we do that.

several issue with SelectionArea:

https://github.com/flutter/flutter/issues/111370
https://github.com/flutter/flutter/issues/111021 （fixed）
https://github.com/flutter/flutter/issues/110594 (won't fix)
https://github.com/flutter/flutter/issues/104703 (fixed)
https://github.com/flutter/flutter/issues/104603 (fixed)
https://github.com/flutter/flutter/issues/104594
https://github.com/flutter/flutter/issues/126652 (fixed)
Repository: flutter
Issue: Copy text in `SelectionArea` is not like copying text from HTML
Labels: framework,has reproducible steps,P2,f: selection,found in release: 3.3,has partial patch,found in release: 3.4,team-framework,triaged-framework

## Description
When selecting text in HTML across multiple elements, the text is copied like this:

https://user-images.githubusercontent.com/24459435/170137235-42dd66b0-fbb7-4b7e-8836-ab0ba68349f2.mov

(I used the [flutter.dev](https://flutter.dev) website)

But with Flutter it's different. It just copy the text in one line:

https://user-images.githubusercontent.com/24459435/170137245-f68bae2a-7449-4738-b567-649ac6705a83.mov

I don't know if it's not the goal of the Flutter to have the same behavior for copying text like in HTML, but from my point of view using the same behavior as HTML would make sense because users expect similar behavior. Especially for Flutter Web.

cc: @chunhtai
Repository: flutter
Issue: `SelectionArea` does not copy the text sometimes
Labels: framework,has reproducible steps,P2,found in release: 3.1,f: selection,team-framework,triaged-framework

I can confirm the comment by @justinmc: 

> Copy didn't work for me sometimes
> 
>In the example, if I click and drag to select some of the text but I start the gesture near the edge of the window outside of the Text widgets, then ctrl-c doesn't copy the selected text. The correct text is selected, and right clicking and using the menu to copy does work, but not ctrl-c.

https://github.com/flutter/flutter/pull/95226#pullrequestreview-976138900

Here is my screen recording. 

https://user-images.githubusercontent.com/24459435/170139136-91b3d7e4-a9b0-4f96-a3f0-e0a2f3b66326.mov

I used CRTL + C to copy my text but it didn't work. I removed the `ElevatedButton`, used hot restart and it worked again. Adding the `ElevatedButton`, used hot restart and it worked again 🤔 

I used the commit `577d6240dbcdbd3cd00e9b4a8c4564e70279f014` as Flutter SDK (the latest commit of @chunhtai branch `inherited-selection`).

<details>
<summary>My app</summary>

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This example shows how to make a screen selectable..

import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // You need to add the "SelectionArea" to make the text selectable.
      home: SelectionArea(
        child: Scaffold(
          body: Padding(
            padding: const EdgeInsets.all(16),
            child: Center(
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: <Widget>[
                  Text(
                    'Fast',
                    style: Theme.of(context).textTheme.titleLarge,
                  ),
                  const Text(
                    'Flutter code compiles to ARM or Intel machine code as well as JavaScript, for fast performance on any device.',
                  ),
                  ElevatedButton(
                    onPressed: () {},
                    child: const Text('Try it in DartPad'),
                  )
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>

@chunhtai Unfortunately, I don't have more information because I couldn't reproduce it anymore. But when I know more, I will post it here :)
Repository: godot
Issue: Gradient2D Texture crashes Android Application
Labels: bug,topic:core,crash,topic:gui

### Godot version

3.5.rc2 

### System information

HUAWEI Y9 2019 kirin710 arm64-v8a 

### Issue description

The android application crashes when using a Gradient 2D In a TextureRect node. The order and visibility don't matter, just place a TextureRect node anywhere on the Scene tree, export it to android and the application won't start.

![image](https://user-images.githubusercontent.com/73260374/170140786-00f32e4e-a329-49d1-81af-89a5674033be.png)



### Steps to reproduce

1. Create a 2D scene (preferably).
2. Create a TextureRect node.
3. In properties, select Gradient2D.
4. Export to android.
5. Crash.

### Minimal reproduction project

_No response_
Repository: rust
Issue: Suggest to add a semicolon for generic functions
Labels: A-diagnostics,T-compiler,A-suggestion-diagnostics,D-papercut,D-terse

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=2c08f9bdc96b83e64fe82f6ec8cd0813

```rust
fn foo(_f: impl Fn()) {}

fn bar<T>(v: T) -> T { v }

fn main() {
    foo(|| { bar(1) });
}
```

The current output is:

```
error[E0308]: mismatched types
 --> src/main.rs:6:18
  |
6 |     foo(|| { bar(1) });
  |              --- ^ expected `()`, found integer
  |              |
  |              arguments to this function are incorrect
  |
note: function defined here
 --> src/main.rs:3:4
  |
3 | fn bar<T>(v: T) -> T { v }
  |    ^^^    ----
```

<!-- The following is not always necessary. -->
Ideally rustc should suggest inserting a semicolon, like [it does if `bar()` isn't generic](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=87f1dfd04fc50a75ff656619eb95d61a).

I understand this is hard because inference flows backward and thus we don't get to understand that `T` is `i32` and there should be a semicolon but we think that `T` is `()` and `v` is of the wrong type. Maybe this is even impossible: feel free to close if this is the case. But if there is something we can do, it may be nice to try.

@rustbot label +A-suggestion-diagnostics