sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: `tensordot` not working for dtype int32 and lower when there is only 1 element in the given axis
Labels: triaged,module: linear algebra,actionable,bug

### 🐛 Describe the bug

`tensordot` seems to be failing when there is only one element in the given axis and dtype is `int32` or lower. This happens when providing explicit lists of dimensions for `a` and `b`. 

```
import torch

x = torch.randint(1, 10, ([1, 2, 3]), dtype=torch.int32)
axis = 0
torch.tensordot(x, x, dims=([axis], [axis]))
```

with the following error:

`RuntimeError: expected scalar type Long but found Int`

But it works completely fine with `int64` and float dtypes. It also works fine for `int32` but only when there are multiple elements in the given axis. For instance, the following works fine:
```
x = torch.randint(1, 10, ([2, 2, 3]), dtype=torch.int32)
axis = 0
torch.tensordot(x, x, dims=([axis], [axis]))
```


### Versions

```
PyTorch version: 1.12.1+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.22.6
Libc version: glibc-2.26

Python version: 3.7.13 (default, Apr 24 2022, 01:04:09)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
Is CUDA available: True
CUDA runtime version: 11.1.105
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.6
[pip3] torch==1.12.1+cu113
[pip3] torchaudio==0.12.1+cu113
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.13.1
[pip3] torchvision==0.13.1+cu113
[conda] Could not collect
```

cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: node
Issue: Explain order/precedence for exports-field subpath patterns
Labels: doc

### Affected URL(s)

https://nodejs.org/api/packages.html#subpath-patterns

### Description of the problem

The current documentation for subpath patterns gives this example for preventing export of a private path:

```js
// ./node_modules/es-module-package/package.json
{
  "exports": {
    "./features/*.js": "./src/features/*.js",
    "./features/private-internal/*": null
  }
}


//// Consuming code

import featureInternal from 'es-module-package/features/private-internal/m.js';
// Throws: ERR_PACKAGE_PATH_NOT_EXPORTED

```

This is somewhat confusing in the context of the following section about conditional exports, which says that

> Within the ["exports"](https://nodejs.org/api/packages.html#exports) object, key order is significant. During condition matching, earlier entries have higher priority and take precedence over later entries. The general rule is that conditions should be from most specific to least specific in object order.

The documented behavior suggests that conditional matching stops when it finds the first matching entry, while subpath pattern matching reads all paths and somehow chooses one.  Does `null` value (preventing export) override any other matches?  What if two paths match and don't have a null value?  Should null-value patterns always be specified last?  If not, is there a suggested or canonical ordering?  The docs should explain this, possibly with more subath-pattern examples.
Repository: rust
Issue: fatal: detected dubious ownership in repository at '/checkout'
Labels: T-infra

Running `sudo src/ci/docker/run.sh x86_64-gnu` on Fedora 35, I get the following error:
```
Building rustbuild
    Finished dev [unoptimized] target(s) in 0.03s
fatal: detected dubious ownership in repository at '/checkout'
To add an exception for this directory, call:

	git config --global --add safe.directory /checkout
thread 'main' panicked at 'command did not execute successfully: "git" "rev-list" "--author=bors@rust-lang.org" "-n1" "--first-parent" "HEAD" "--" "/checkout/src/llvm-project" "/checkout/src/bootstrap/download-ci-llvm-stamp" "/checkout/src/version"
expected success, got: exit status: 128', native.rs:132:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:00
```
Not sure why this started happening now, it used to work fine...
Repository: vscode
Issue: Guarantee that TextDocument.version doesn't skip versions
Labels: under-discussion,editor-api

Currently https://code.visualstudio.com/api/references/vscode-api#TextDocument version is said to "strictly increase":

> The version number of this document (it will strictly increase after each change, including undo/redo).

As it stands today, it increases by 1 each time (doesn't skip versions) but this logic is not guaranteed in the API description. Can we please state this as a requirement so that we could rely on it in extensions e.g. diff tracking systems? Many thanks.
Repository: go
Issue: cmd/vet: false positive for MOVOU
Labels: NeedsInvestigation,Analysis

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version (latest)
go version devel go1.20-e8894bd8fc Mon Sep 5 11:30:31 2022 +0800 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

YES

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
Not related.
</pre></details>

### What did you do?
`$ go vet`

```
#include "textflag.h"

// func foo() [2]uint64
TEXT ·foo(SB),NOSPLIT,$0-16
    MOVOU X1, ret+0(FP)
    RET
```

### What did you expect to see?

Nothing happens.

### What did you see instead?

`./x.s:5:1: [amd64] foo: invalid MOVOU of ret+0(FP); [2]uint64 is 16-byte value`

The size of MOVOU is 16 bytes (https://www.felixcloutier.com/x86/movdqu:vmovdqu8:vmovdqu16:vmovdqu32:vmovdqu64), it is the same as the [2]uint64.
So I guess it may be a false positive?
asmdecl code: https://github.com/golang/tools/blob/master/go/analysis/passes/asmdecl/asmdecl.go#L822
Repository: TypeScript
Issue: Control Flow Analysis of Aliased Conditions and Discriminants breaks on else statement if condition not strictly boolean
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
Control Flow Analysis of Aliased Conditions and Discriminants

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information
4.4+

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about control flow analysis

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.4.4#code/MYGwhgzhAECC0G8C+AoUkYCFGvVaAwjiigCYCm6ATudMAPYB2EALtC+awFxzQA+0bAIIBuEg2ZsAlhFgB5KtgC80ABQdW0KZLCNg5egDNefARuk69B45gCUYspXA1ohgK56WUptADm5FgBlegBbcgARMBYwVW0ABzcWHngBOx5kNCZNfxZI6OgVdU4LVl19IxMzYq1LcptbaAAyRr8A4LC8mPN7EiljWNkFO0QUaHZikWgAeinyAA84yjYUwWgAWmg4jE4UJGhyEAhaBFHx1kmZ+cXgNiINragd1BQ+tRzOhpOx8wvZhaWTKt7tsILt9odjqcftM-tdbutXGApIddkA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
class A {}
class B {}
class C {}

declare const test: A | B | C;

const isAOrB = (test instanceof A || test instanceof B);

declare function getSomeData(input: A | B): {}
const getData = (test instanceof A || test instanceof B) && getSomeData(test);

if (isAOrB) {
  test; //expect A | B - passes
} else {
  test; //expect C - passes
}

if (getData) {
  test; //expect A | B - passes
} else {
  test; //expect C - fails
}
```

### 🙁 Actual behavior

the else statement loses it's narrowing because getData is not strictly a boolean it seems. 

<!-- What happened, and why it was wrong -->

### 🙂 Expected behavior

the if/else of getData should behave the same as the if/else of isAOrB

<!-- What you expected to happen instead, and why -->
Repository: storybook
Issue: Documentation: page scrolls up
Labels: bug,needs triage

**Describe the bug**
When going to any(?) documentation page, like [this one](https://storybook.js.org/docs/vue/essentials/controls) it will scroll up without me telling it to.

**To Reproduce**
1. Go to https://storybook.js.org/docs/vue/essentials/controls
2. Scroll down to where you like
3. I don't know what now. Maybe switch to another application or another tab.

It might be scrolled up while deactivating the browser or tab. It also might not, but please refrain from going "cannot reproduce" and closing the issue. It really does exist, but is rather intermittent.

I imagine this is especially disorienting to someone who has trouble reading.

**System**
Firefox latest version, on Windows.
Repository: rust
Issue: Semantics of control flow operators (return, continue, `?`) in async blocks is severely underdocumented 
Labels: A-docs

As a novice Rust programmer, I was quite surprised that the following works: 

```rust
#[tokio::main]
async fn main() {
    let f = async { return 92 };
    assert_eq!(f.await, 92);
}
```

I don't remeber reading that in any kind of docs, and looking at the 

* async book https://rust-lang.github.io/async-book/01_getting_started/04_async_await_primer.html
* async keyword https://doc.rust-lang.org/stable/std/keyword.async.html
* return keyword https://doc.rust-lang.org/stable/std/keyword.return.html

didn't show up any example of the syntax. 

This is documented in the reference (https://github.com/rust-lang/reference/pull/1262), but without an example.
Repository: material-ui
Issue: [Rating] For keyboard users on Safari browser, Unable to see effects and outline on focus / active stars
Labels: bug 🐛,component: rating,browser: Safari

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Only for Keyboard Users, I am trying to access the rating component on the safari browser but cannot see focus/active effects on stars.

![safari](https://user-images.githubusercontent.com/53289809/188597592-b136ca6b-c6ca-4a6f-a74c-0f3836cb27b4.png)


### Expected behavior 🤔

There is a focus indicator and active effects which are visible on the chrome browser.

![chrome](https://user-images.githubusercontent.com/53289809/188597698-a4173f86-c0e0-4860-bf7d-7da7f493df81.png)


### Steps to reproduce 🕹

Steps:

1. Open Rating component on Mac OS + Safari browser
2. Press the Tab key until reached the Rating component
3. Use arrow keys to change ratings
4. No visible outline and UI effects on active and focus star


### Context 🔦

I was using this component and this issue comes into the picture while accessibility testing.
I can see this on the latest mui version also.

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
    System:
    OS: macOS 12.5.1
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 8.18.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.6.1
  npmPackages:
    @types/react: 16.9.15 => 16.9.15 
    react: 16.12.0 => 16.12.0 
    react-dom: 16.12.0 => 16.12.0 
    typescript: 4.2 => 4.2.4 


```
</details>
Repository: pytorch
Issue: Minimal example for torch.optim.SparseAdam
Labels: module: sparse,module: docs,triaged

### 📚 The doc issue

Hey, 
it is a bit confusing for me and my group for which cases [SparseAdam](https://pytorch.org/docs/stable/generated/torch.optim.SparseAdam.html) can be used: 

There is a lone saying
```
Implements lazy version of Adam algorithm suitable for sparse tensors.
```
but it is unclear wether the parameters are allowed to be sparse (With sparse parameters, it throws the error 
```
ValueError: Sparse params at indices [0]: SparseAdam requires dense parameter tensors
```

Could you provide more details and a minimal example? 
Thank you

### Suggest a potential alternative/fix

Give a minimal example of how to use this optimizer.

cc @nikitaved @pearu @cpuhrsch @amjames @bhosmer @svekars @holly1238
Repository: rust
Issue: Consider uploading RA LSIF data to sourcegraph, from bors builds.
Labels: T-infra

Sourcegraph [supports what they call "Precise code navigation"](https://docs.sourcegraph.com/code_navigation/explanations/precise_code_navigation) using data from tools such as `rust-analyzer`, and there's even convenience tools like https://github.com/sourcegraph/lsif-rust-action for uploading such data from CI.

I don't personally use sourcegraph yet, and have been relying a lot on the GitHub CodeSearch (still in private beta, I believe), but having a publicly available service *with better source code understanding* seems really good and I'll try to remember it for the future.

I was looking around and found that at least one of the `rust-lang` repos happens to have it:
https://sourcegraph.com/github.com/rust-lang/rustc-demangle@2811a1ad6f7c8bead2ef3671e4fdc10de1553e96/-/blob/src/v0.rs?L65

You can see how well hovering and clicking around works, it's a lot of fun frankly.

<hr/>

For `rust-lang/rust` it would likely be harder than that `sourcegraph/lsif-rust-action` helper (at the very least custom `rust-analyzer` configuration might be needed), but it might still be doable enough that we could maybe try it and see what happens (as long as no "paid plan" is required, I don't know the full details on the sourcegraph side).

cc @bjorn3 (who mentioned the LSIF support, which got me looking at sourcegraph)
cc @rust-lang/infra
Repository: pytorch
Issue: OpInfo tests should compare gpu to cpu implementations
Labels: module: tests,triaged,topic: not user facing

I believe that currently we do not have any OpInfo based tests that compare the results of gpu to cpu implementations.
Seems like this would be very useful to have, and shouldn't be too hard to implement.
You could just take the intersection of cpu and gpu dtypes for each OpInfo and compare outputs.


(FYI, I came across a discrepancy between gpu and cpu implementations (of `nn.functional.grid_sample`) which made me think of this. )



cc @mruberry
Repository: neovim
Issue: cmdheight=0: 'showcmd', search count
Labels: enhancement,statusline

### Feature already in Vim?

NO

NVIM v0.8.0-dev-1024-ga220650fd6

### Feature description

Recently, I've found that if we `set cmdheight=0`, these two options will be hidden and cannot use statusline to reshow.

> [ 73/87 ] and 24
![image](https://user-images.githubusercontent.com/97107165/188440671-945e2404-7959-46fc-8d77-3741102b3d41.png)

And it seems statusline does not have any config options `%f %c etc` that can reshow these two options.

This is very inconvenient when we need to know how much char I have selected in visual mode and how many search results in `cmdheight=0`

btw: if the search result can be dynamic like `[ 1/11 ] [ 2/11 ] [ 3/11 ] ...`, it would be better :D

best wishes.
Repository: pytorch
Issue: list of tensors can't be converted to a torch tensor while list of lists gets easily converted to a pytorch tensor
Labels: triaged,module: numpy

### 🐛 Describe the bug

```
import torch
import numpy as np
a = [torch.tensor([1,2]),torch.tensor([0.4,0.5]),torch.tensor([1,4])]
torch.tensor(np.array(a))
```
This is going to give type error
![image](https://user-images.githubusercontent.com/95900977/188446921-f81bd5d4-861b-4ee6-8bd3-94a19dd5647f.png)

While this works correctly
```
a = [[1,2],[0.4,0.5],[1,4]]
torch.tensor(np.array(a))
``` 
![image](https://user-images.githubusercontent.com/95900977/188447134-e351c793-85b5-4f3a-bb88-25892c40d6d1.png)






### Versions

PyTorch version: 1.12.1+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.22.6
Libc version: glibc-2.26

Python version: 3.7.13 (default, Apr 24 2022, 01:04:09)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
Is CUDA available: True
CUDA runtime version: 11.1.105
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.6
[pip3] torch==1.12.1+cu113
[pip3] torchaudio==0.12.1+cu113
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.13.1
[pip3] torchvision==0.13.1+cu113
[conda] Could not collect

cc @mruberry @rgommers
Repository: storybook
Issue: Setup function in Vue story is not even called
Labels: bug,needs triage

**Describe the bug**
I'm adding a `setup` function to a story for a Vue component, to transform a prop before it gets sent to the component. Trouble is, the setup function isn't even being called at all. Never mind if what I'm doing in it, is correct. If it isn't being called, surely it will never work.

**To Reproduce**
```javascript
const Story = (args, { argTypes }) => ({
  props: Object.keys(argTypes),
  components: { Alert },
  template: '<alert :alert="alert" :dialog="dialog" :messages="messagesArray" :snackbar="snackbar" :timeout="timeout" :type="type" />',
  setup() {
    console.log('setup');
    return {
      args: {
        ...args,
        messagesArray: [args.message],
      },
    };
  },
});
```

Here I would expect a `messagesArray` to become available in the template, so that I can populate `:messages` with it. But that `console.log` over there, proves that the `setup` function is never called. Not even after an F5 refresh.

This page, [Dealing with complex values](https://storybook.js.org/docs/vue/essentials/controls#dealing-with-complex-values), tells me this is the way to do it. Maybe something is still missing, that triggers `setup` to be called at all. And maybe this function is otherwise undocumented - at least I don't see it appearing in any reference material with a proper technical description of what it is, and when exactly and under which conditions it is going to be called.

So this is either a problem in Storybook, where that setup function should be called at some point, but isn't, or something in the documentation is missing. Or I'm doing it wrong, but honestly I've checked and doublechecked and triplechecked.

**System**
Please paste the results of `npx sb@next info` here.

```
Need to install the following packages:
  sb@6.5.0-rc.1
Ok to proceed? (y) n
npm ERR! canceled

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\<snip>\2022-09-05T12_42_07_270Z-debug-0.log
```
Sorry, I'm not installing an old beta version.
Repository: storybook
Issue: Using backticks for default value in source file will get rendered wrong
Labels: bug,block: argstable,argtypes

If using backticks for default values in the source file they will get rendered with backticks and double quotes instead of just one of them.

With backticks
![image](https://user-images.githubusercontent.com/12169404/188454998-2620fba4-494b-478b-9c2a-18237036b213.png)


With double quotes
![image](https://user-images.githubusercontent.com/12169404/188454588-608df5f6-987a-45bf-89d5-a918440048c0.png)

Component file for minimal reproduction (React 17)
```ts
import { Alert as MuiAlert} from '@mui/material'
import {ComponentProps, VoidFunctionComponent} from 'react'

export const Infobox : VoidFunctionComponent<
	 {
		children?: ComponentProps<typeof MuiAlert>[`children`]
		severity?: ComponentProps<typeof MuiAlert>[`severity`]
	}
> = ({
	// eslint-disable-next-line quotes
	severity = `info`,
	...props
}) => (
	<MuiAlert
		{...props}
		severity={severity}
	/>
)
```
Repository: TypeScript
Issue: Suggestion isn't included in quick fixes 
Labels: Suggestion,Help Wanted,Effort: Moderate,Domain: Quick Fixes,Experience Enhancement

# Bug Report
Maybe this is by design, but I still find it a bit awkward. The issue is that the suggestion that appears when hovering over a TS error in VS Code (I could also reproduce it in VS, so it seems like a `tsserver` behavior and not an IDE thing) isn't included as a quick fix. See the code below for an example.

### 🔎 Search Terms
- `default`
- `export`

### 💻 Code
Say I have `file1.ts` with the following contents:
```
const foo = 0;

export default foo;
```
And I have the following in `file2.ts`:
```
import { foo } from './file1';
```
Because `file1.ts` has no named exports, the code in the second file has an error. When I hover over the squiggle, VS Code displays:
![image](https://user-images.githubusercontent.com/62502207/188490498-d1b435dd-bd12-4384-85ec-88c22bfc33f7.png)
Despite the dialog mentioning exactly the fix that I would like to apply, that fix isn't included as a possible refactoring:
![image](https://user-images.githubusercontent.com/62502207/188490696-3d439418-868b-4f53-90a2-8fed3f79474b.png)

<!-- What you expected to happen instead, and why -->
My expectation is that the suggestion mentioned in the hover dialog is included as a quick fix.