sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Sparse-sparse matrix multiplication only works with torch.sparse.mm()
Labels: module: sparse,triaged,module: ux

## 🐛 Bug

Sparse-sparse matrix multiplication only works with `torch.sparse.mm()`, doesn't work with 
- `torch.mm()`
- `Tensor.mm()`


## To Reproduce

Steps to reproduce the behavior:



```python
>>> i = [[0, 2], [1, 0], [1, 2]]
>>> v = [3.0, 4.0, 5.0]
>>> s = torch.sparse_coo_tensor(list(zip(*i)), v, (2, 3))
>>> torch.mm(s, s.t())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: sparse tensors do not have strides
>>> s.mm(s.t())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: sparse tensors do not have strides
>>> torch.sparse.mm(s, s.t())
tensor(indices=tensor([[0, 0, 1, 1],
                       [1, 0, 0, 1]]),
       values=tensor([15.,  9., 15., 41.]),
       size=(2, 2), nnz=4, layout=torch.sparse_coo)
```

## Expected behavior

It should work with `torch.mm()` and `Tensor.mm()`? Also I don't find document about this sparse-sparse matrix multiplication feature. 

## Environment

```
PyTorch version: 1.9.0a0+git2f6a806
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: CentOS Stream 8 (x86_64)
GCC version: (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)
Clang version: Could not collect
CMake version: version 3.19.4

Python version: 3.8 (64-bit runtime)
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

Versions of relevant libraries:
[pip3] numpy==1.19.2
[pip3] torch==1.9.0a0+gitf4d5639
[conda] blas                      1.0                         mkl
[conda] mkl                       2020.2                      256
[conda] mkl-include               2020.2                      256
[conda] mkl-service               2.3.0            py38he904b0f_0
[conda] mkl_fft                   1.3.0            py38h54f3939_0
[conda] mkl_random                1.1.1            py38h0573a6f_0
[conda] numpy                     1.19.2           py38h54aff64_0
[conda] numpy-base                1.19.2           py38hfa32c7d_0
[conda] torch                     1.9.0a0+git197549d          pypi_0    pypi
```


## Additional context

<!-- Add any other context about the problem here. -->


cc @aocsa @nikitaved @pearu @mruberry
Repository: pytorch
Issue: Quantizable LSTMCell does not work correctly.
Labels: oncall: quantization,low priority,triaged

From https://discuss.pytorch.org/t/cannot-quantize-lstmcell/117212.
Quantizable LSTM Cell implementation is missing a from_observed method in
https://github.com/pytorch/pytorch/blob/master/torch/nn/quantizable/modules/rnn.py. This prevents convert from mapping from an observed module to a quantized module.

cc @jerryzh168 @jianyuh @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @raghuramank100
Repository: vscode
Issue: QuickPick.onDidChangeActive fires before QuickPick.onDidChangeValue on a value change
Labels: bug,quick-pick

I would expect that `QuickPick.onDidChangeValue` would fire before any other events when the value of the input changes.
Repository: pytorch
Issue: Deprecate torch.stft returning real-valued tensors and torch.istft accepting real-valued inputs
Labels: triaged,module: deprecation,module: fft

For the PyTorch 1.9 release we can:

- update torch.stft to always return a complex tensor, and make setting return_complex=False a runtime error. The return_complex kwarg can remain on torch.stft and moved to kwarg-only, but it should no longer be documented. This will let current torch.stft users continue to use the op without disruption.
- update torch.istft to stop accepting real-valued inputs

And this should complete the deprecation process.

cc @mruberry @peterbell10 @walterddr
Repository: pytorch
Issue: Update linspace and logspace to throw an error when steps is not provided
Labels: triaged,module: deprecation,module: tensor creation

torch.linspace() and torch.logspace() currently throw warnings when not given steps:

```
torch.linspace(1, 10)
: UserWarning: Not providing a value for linspace's steps is deprecated and will throw a runtime error in a future release. This warning will appear only once per process. (Triggered internally at  ../aten/src/ATen/native/RangeFactories.cpp:20.)

torch.logspace(1, 10)
UserWarning: Not providing a value for logspace's steps is deprecated and will throw a runtime error in a future release. This warning will appear only once per process. (Triggered internally at  ../aten/src/ATen/native/RangeFactories.cpp:51.)
```

and their documentation also warns that failing to provide steps is deprecated ([linspace docs](https://pytorch.org/docs/master/generated/torch.linspace.html?highlight=linspace#torch.linspace), [logspace docs](https://pytorch.org/docs/master/generated/torch.logspace.html?highlight=logspace#torch.logspace)).

We should update these operators to require steps be specified for PyTorch 1.9. 

cc @gchanan @mruberry
Repository: rust
Issue: [ER] Two ideas for stdlib sorting
Labels: T-libs,C-optimization

1) The first idea is to integrate in the stdlib sort a radix sort. It's mean to be used only in basic cases where it can generate or use standard Radixable trait for an algorithm like this one. The current stdlib algorithm is to be used as fall-back. The radix sorting could be quite useful because it covers many basic sorting cases:
https://crates.io/crates/voracious_radix_sort

2) Code like this generates about 740 asm instructions with about seven slice bound tests:
```rust
pub fn foo(p: &mut [u32]) {
    p.sort();
}
```
While this generates about 1300 lines of asm with about 16 bound tests/bound asserts:
```rust
pub fn foo(p: &mut [u32]) {
    p.sort_unstable();
}
```
Perhaps rearranging things a little inside the sorting there are ways to reduce that number of bound tests a bit (without introducing new unsafe code).
Repository: rust
Issue: Share drop glue too when -Zshare-generics is enabled
Labels: C-enhancement,A-codegen,I-compiletime,T-compiler,I-heavy,-Zpolymorphize

cc https://github.com/bevyengine/bevy/pull/1914
Repository: terminal
Issue: The unfocused background flashes briefly when switching between tabs
Labels: Issue-Bug,Area-UserInterface,Area-Settings,Product-Terminal,Priority-2

### Windows Terminal version (or Windows build number)

1.8+

### Other Software

_No response_

### Steps to reproduce

slap 

```json
            "unfocusedAppearance": {
                "background": "#888888"
            }

```

in a profile

### Expected Behavior

Maybe there's a way we can not switch to the unfocused appearance when the control is removed from the UI tree entirely? IIRC we were talking about doing a similar thing to prevent the DxRender from doing _anything_ when the tab is inactive

### Actual Behavior

Switching between tabs with the same profile briefly flashes the gray color as it fades to the active color. It doesn't look great :confu
Repository: flutter
Issue: [Camera] Don't force 16:9 aspect as preview size
Labels: c: new feature,p: camera,package,c: proposal,team-ecosystem,P2,triaged-ecosystem

Hi,

**On Android:**
I am trying to achieve a camera preview that is best for taking pictures, not videos (like the native camera app).
Currently it seems that preview size is only limited to 16:9 aspect ratio, as in `CameraUtils::getBestAvailableCamcorderProfileForResolutionPreset` the `ResolutionPreset` is translated only to `CamcorderProfile` values, which are all 16:9.
Having 16:9 previews automatically "crops" the image and the user can't enjoy the fully "zoomed-out" view (see attached images below).

Having an API like in CameraX could be very nice:
```kotlin
Preview.Builder()
  .setTargetAspectRatio(AspectRatio.RATIO_4_3)
  .build()
```

Is there an option to achieve that currently? a workaround? 
I tested by changing the method `CameraUtils::computeBestPreviewSize` to return `new Size(1024, 768)` and indeed I get the fully "zoomed-out" preview...

Here is the current preview I get:
![prev_16_9](https://user-images.githubusercontent.com/4539636/114624816-f0564300-9cb9-11eb-8dc2-0368f4b85d8e.png)


And here is the preview when I change preview size to `Size(1024, 768)`
![prev_4_3](https://user-images.githubusercontent.com/4539636/114624826-f51af700-9cb9-11eb-9230-bdb5fd76e7ec.png)



Thx!
Repository: react
Issue: eslint-plugin-react-hooks should flag uses of createRef in function components
Labels: Type: Discussion,Component: ESLint Rules

<!--
  Please provide a clear and concise description of what the bug is. Include
  screenshots if needed. Please test using the latest version of the relevant
  React packages to make sure your issue has not already been fixed.
-->

Using `createRef` in a function component is almost certainly a mistake. You probably want `useRef` instead. This can easily lead to confusing bugs. See, for example, [this popular Stack Overflow question][1].

Banning `createRef` outright would yield false positives on class components. I suggested adding a rule to flag this specifically in function components to eslint-plugin-react (https://github.com/yannickcr/eslint-plugin-react/issues/2966) but they suggested that I file an issue over here instead.

React version: react@16.13.1

## Steps To Reproduce

1. Set up eslint-plugin-react-hooks and create a function component that uses `React.createRef`.
2. No complaints.

<!--
  Your bug will get fixed much faster if we can run your code and it doesn't
  have dependencies other than React. Issues without reproduction steps or
  code examples may be immediately closed as not actionable.
-->

Link to code example: https://codesandbox.io/s/cool-volhard-9zj0s

```ts
export default function App() {
  const ref = React.createRef(0);
  // Change to this to make the example work as intended:
  // const ref = React.useRef(0);
  const [, update] = React.useState(0);

  const handleClick = () => {
    ref.current += 1;
    update((n) => n + 1);
  };
  React.useEffect(() => {
    ref.current = 0;
  }, [ref]);

  return (
    <div className="App" ref={ref}>
      <h1>Hello CodeSandbox</h1>
      <h2>Value is {ref.current}</h2>
      <button onClick={handleClick}>Click Me</button>
    </div>
  );
}
```

<!--
  Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
  repository on GitHub, or provide a minimal code example that reproduces the
  problem. You may provide a screenshot of the application if you think it is
  relevant to your bug report. Here are some tips for providing a minimal
  example: https://stackoverflow.com/help/mcve.
-->

## The current behavior

eslint-plugin-react-hooks does not report an issue.

## The expected behavior

eslint-plugin-react-hooks should report an issue, namely that the `createRef` should be `useRef`.

[1]: https://stackoverflow.com/questions/54620698/whats-the-difference-between-useref-and-createref/54620836#54620836
Repository: pytorch
Issue: Finish deprecating torch.range
Labels: triaged,module: deprecation

torch.range() is deprecated; [its documentation has a deprecation warning](https://pytorch.org/docs/master/generated/torch.range.html?highlight=range#torch.range) and attempting to use it throws a warning:

```
torch.range(1, 10)
: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end).
tensor([ 1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10.])
```

It's time to remove it.
Repository: pytorch
Issue: Cannot init, destroy, and then re-init process groups
Labels: oncall: distributed,triaged

## 🐛 Bug
Calling `dist.init_process_group` followed by `c10d.destroy_process_group` and then re-initing pg does not appear to work, hanging in `_store_based_barrier`. See the following repro:

```
@requires_nccl()
    @skip_if_lt_x_gpu(2)
    def test_init_then_reinit_pg(self):
        store = c10d.FileStore(self.file_name, self.world_size)
        # process_group = c10d.ProcessGroupNCCL(store, self.rank, self.world_size)
        print("initializing pg")
        dist.init_process_group(backend="nccl", world_size=self.world_size, rank=self.rank, store=store)
        print("Done init pg")
        c10d.destroy_process_group()
        import time ; time.sleep(5)
        dist.init_process_group(backend="nccl", world_size=self.world_size, rank=self.rank, store=store)
```

The recently added python tracebacks indicate the issue is in `_store_based_barrier`: P402636997.

Specifically, it looks like `destroy_process_group` resets `_group_count`. This means that when we call `init_process_group` a 2nd time with the same store, it queries for a group count of 1, and finds it already in the store, changing the behavior of the worker counting logic in `_store_based_barrier`.

A workaround for now is using a new store each time. However, I thought that we already wrap stores with `PrefixStore` as needed to avoid these sort of collision issues. 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: godot
Issue: Nintendo Switch Pro Controller USB inputs are erratic w/ Steam
Labels: bug,confirmed,topic:thirdparty,topic:input

**Godot version:**
3.3 rc8


**OS/device including version:**
Windows 10


**Issue description:**
Under specific configurations, godot interprets the controller as sending many random inputs.

I'm not pressing anything at all:
![pro_controller](https://user-images.githubusercontent.com/753186/114634477-9725e980-9c90-11eb-84b9-33761179e4e5.gif)

From my basic googling of the issue, it seems that there's a problem with Steam's "Switch Pro Configuration Support" where the DirectInput freaks out when Steam enables gyro on a Pro Controller over USB. I don't have a great source for this, but [this](https://steamcommunity.com/groups/SteamClientBeta/discussions/0/1696046342859785069/) discussion has a post from a Valve employee that describes what I just said.

While this itself isn't Godot's fault, it seems the problem does not effect apps that use XInput to read controller inputs. I'm a bit out of the loop, but I did think Godot supports XInput, so I'm wondering why this is messing up?

For the record, from [the discussion I linked above](https://steamcommunity.com/groups/SteamClientBeta/discussions/0/1696046342859785069/) adding the project exe as a non-steam game is a workaround. Seems like steam forces the game to use XInput in some way, as the controller is no longer reported as a "Nintendo Switch Pro Controller" but instead as an "XInput Gamepad"

Additionally I've heard about similar problems with DS4 controllers and Steam's "PlayStation Configuration Support" option, but I don't own one of those so I can't try it.

**Steps to reproduce:**
Steam must be running, with "Switch Pro Configuration Support" enabled in the Controller Settings menu.
A Nintendo Switch Controller must be plugged in via USB. You should be able to move the mouse with the right thumbstick if it detected it. The problem is NOT reproducible when using Bluetooth.

Launch any godot game with joypad inputs [the joypads demo project works well](https://github.com/godotengine/godot-demo-projects/tree/master/misc/joypads)


(To my knowledge it is irrelevant if the controller is plugged in before or after steam is started. And steam must be closed AND the controller unplugged to reset it)

**Minimal reproduction project:**
I've been using the [joypads demo project](https://github.com/godotengine/godot-demo-projects/tree/master/misc/joypads) to test
Repository: flutter
Issue: Consider merging the web and desktop plugin registrant
Labels: tool,platform-web,a: desktop,P3,a: plugins,team-tool,triaged-tool

https://github.com/flutter/flutter/pull/79669 adds the Dart plugin registrant. It's similar to the one used for web in the sense that it's all in Dart. The structure is different as well as the location in the build directory.
Repository: ant-design
Issue: Change Input clear icon visibility hidden to display none while hidden
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
https://codesandbox.io/s/jibenshiyong-antd4151-forked-0hjs2?file=/index.js

With allowClear, the input length is seem not enough, the placeholder shows ellipses. 
![image](https://user-images.githubusercontent.com/2955214/114654127-17456100-9d1c-11eb-9196-d29d8a0c2b2f.png)

But there are actually enough space to display full text. 
![image](https://user-images.githubusercontent.com/2955214/114654200-41971e80-9d1c-11eb-9d41-aad701767383.png)
 
Is that possible to change clear icon `visibility:hidden` to `display:none` ? 

| Environment | Info |
|---|---|
| antd | undefined |
| React | React |
| System | Mac |
| Browser | Chrome |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: deno
Issue: Deno crashes with error: Uncaught (in worker "") (in promise) Error: request or response body error: error reading a body from connection
Labels: bug,public API

I have a deno app running within a container that keeps crashing after some time with the following:

```
error: Uncaught (in worker "") (in promise) Error: request or response body error: error reading a body from connection: protocol error: unexpected internal error encountered
    at unwrapOpResult (deno:core/core.js:100:13)
    at async Object.pull (deno:op_crates/fetch/26_fetch.js:1437:28)
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
    at Worker.#poll (deno:runtime/js/11_workers.js:288:21)
```
As can be seen, no mention of application code in the trace, so it is difficult to troubleshoot what might be causing this. 

The application makes use of workers and it is first bundled up via `deno bundle` before deploying. I suspect the error is related to the workers as traces of this can be seen in the trace.

This was the case while running with version `1.8.2` and also when I upgraded to version `1.9.0`
Repository: TypeScript
Issue: From-first import statement completion
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

import, completion, reverse, inverse, from-first

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
This would be a completion feature for the language server, with no impact on the compiler or language syntax.


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

A smoother developer experience for completing imports when the symbol is unknown and the package is.

This is the opposite of the new symbol-first import completion feature proposed for TS 4.3.

## 📃 Motivating Example

The symbol-first import completion feature is interesting, but I think it somewhat misses a real-world context. Bottom line is that, as developers, we hardly ever actually spend time at the top of the file manually writing imports.

Whenever I know the symbol I want to import, I am usually writing it in-line in my code block, and TS Lang Server is able to complete the import based on its usage. This is 99% of the cases in which I am importing a symbol whose name I know. From this perspective, having completion for `import { myFunc }` is not so useful.

Given this, the only time I'm actually at the top of a file writing import statements is usually when I know the name of the package, but I don't know exactly what the symbol name is, or where to start. In this case I end up having to write `import { } from 'myPackage';` and then going back to the `{ }` and triggering completion.

It would be a small improvement, but being able to write `from 'myPackage'` and being presented with the list of symbols to select from would be much more relevant in my mind, because the only time we're up the top of the file writing imports is when we DON'T know what symbols we're looking for.

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->

I think the motivating example outlines this sufficiently.

The implementation seems simple. Simple enough at least that a snippet in VSCode or Webstorm ought to be able to match its behaviour.
Repository: flutter
Issue: DropDownButton Styling options need to be improved
Labels: framework,f: material design,a: quality,c: proposal,team-design,triaged-design

## Use case

A button as shown  in Image 1 to make with the DropdownButton widget is much more difficult than the DropdownButtonFormField widget as there is no InputDecoration option on the button widget, there is an underline which is a widget, which at the very least is confusing terminology. Further we have to hardcode the height of the container, and even then if the background is a solid color, its impossible with this system as the underline is rendered in front of the hint text. This can be observed in this example

```
DropdownButton(
	hint: Text(
	  'Click to add',
	),
	style: TextStyle(
	  fontWeight: FontWeight.w600,
	  fontSize: 12,
	  color: Color(0xFFDE5D00),
	),
	 underline: Container(
	  height: 15,
	  decoration: BoxDecoration(
		color: Color(0xFFFFFFFF),
		border: Border.all(
		  color: Colors.black,
		)
	  ),
	),
),
```
![image](https://user-images.githubusercontent.com/22373191/114676863-5e851f00-9d27-11eb-8b6f-031cf05d7a02.png)

![Image 1](https://user-images.githubusercontent.com/22373191/114675425-d8b4a400-9d25-11eb-8b72-6d27a602fd4b.png)
## Proposal

Remove the underline option in DropDownButton in favour of a style option which is of type either ButtonStyle, or InputDecoration . 

PS: I would like to work on this issue if possible