sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: `__torch_dispatch__` can result in returning `None` for an op that should return Tensors.
Labels: triaged,module: pybind,module: __torch_dispatch__

```
class LoggingTensor(torch.Tensor):
    elem: torch.Tensor

    __slots__ = ['elem']

    @staticmethod
    def __new__(cls, elem, *args, **kwargs):
        # The wrapping tensor (LoggingTensor) shouldn't hold any
        # memory for the class in question, but it should still
        # advertise the same device as before
        r = torch.Tensor._make_wrapper_subclass(
            cls, elem.size(),
            # TODO: clone strides and storage aliasing
            dtype=elem.dtype, layout=elem.layout,
            device=elem.device, requires_grad=elem.requires_grad
        )
        # ...the real tensor is held as an element on the tensor.
        r.elem = elem
        return r

    def __repr__(self):
        return f"LoggingTensor({self.elem})"

    @classmethod
    def __torch_dispatch__(cls, func, types, args=(), kwargs=None):
        def unwrap(e):
            return e.elem if isinstance(e, LoggingTensor) else e

        def wrap(e):
            return LoggingTensor(e) if isinstance(e, torch.Tensor) else e

        # no_dispatch is only needed if you use enable_python_mode.
        # It prevents infinite recursion.
        with no_dispatch():
            rs = tree_map(wrap, func(*tree_map(unwrap, args), **tree_map(unwrap, kwargs)))
        return rs

mod = nn.Conv2d(3, 3, 3)
def f(x):
    out = nn.functional.conv2d(x, mod.weight.data, None)
    out.sum().backward()
    return x
inp = torch.randn(3, 3, 250, 250, requires_grad=True)
f(LoggingTensor(inp))
```

This currently errors, with an opaque error about not being able to convert a Python type to C++.

This is what happens:

The cause of this issue is this mkldnn_convolution_backward operator (https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/native_functions.yaml#L2915), which calls this implementation (https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/mkldnn/Conv.cpp#L210), which doesn't initialize the latter two tensors (thus, making them non-defined). 

Then, at some point, THPVariable_Wrap (https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/python_variable.cpp#L163) gets called on the tensor, and we return None back into Python-land. Specifically, at this point (https://github.com/pytorch/pytorch/blob/c508433617687130bb45a0aad95ae454de425fc9/test/test_python_dispatch.py#L53), rs is a tuple of (Tensor, None, None).

Then, we return this tuple back into cpp-world, and presumably, since the function signature says it returns 3 tensors, it tries to cast the None back into a Tensor.

This error also shows up with say, `native_batch_norm_backward`.

cc @albanD
Repository: vscode
Issue: Improve UX when showing raw cell output
Labels: ux,polish,notebook-diff

Testing https://github.com/microsoft/vscode/issues/134142

For me, there's two issues:

1. The expanded cell is taller than my viewport. So I have nested scrollbars and need to use both of them if I want to see the top and bottom of the cell. It should be at most ~90% of the editor height
2. When the cell expands, I need to manually scroll it into view, which can be difficult due to nesting unless I'm dragging the outer scrollbar manually. The diff should scroll such that the raw output is at the top of the viewport as soon as the user hits "switch output rendering"
Repository: flutter
Issue: Provide a pre-fetching API for the default font manager on all platforms
Labels: c: new feature,platform-ios,engine,platform-mac,platform-fuchsia,platform-windows,e: embedder,a: typography,a: desktop,P3,perf: startup,team-engine,triaged-engine

See https://github.com/flutter/engine/pull/28978#issuecomment-932487895 for context

Android currently has this, and it measurably improves startup time there. Some platforms may benefit more or less from this depending on their implementation in Skia, but we should just make it generally available and then move the font manager initialization check to the first access of the font collection when someone goes to render a paragraph.
Repository: rust
Issue: Trait impls on type alias aren't documented on their underlying type
Labels: T-rustdoc,A-trait-system,C-bug

```rust
pub struct A;
pub type B = A;

pub trait T {}
impl T for B {}
```

![image](https://user-images.githubusercontent.com/28781354/135693149-7145d31c-7482-42cf-a998-19be18c600db.png)
![image](https://user-images.githubusercontent.com/28781354/135693161-bec5c112-46b1-4904-b582-4663548e74a8.png)
![image](https://user-images.githubusercontent.com/28781354/135693169-41955792-3218-48d7-b1d2-0d4069730c1f.png)

This effects json and html

@rustbot modify labels: +C-Bug +T-rustdoc +A-rustdoc-json
Repository: vscode
Issue: Language detection server retains 5Mb if not cleaned up
Labels: bug,perf,languages-guessing

Had a chat with @TylerLeonhardt on ML code in VS Code and hypothesized that the model might hold on to memory if not cleaned up.

Tested on vscode.dev, there is some evidence. In my simple testing, detection did cause a spike to 20Mb but it usually recovered back to 4-7mb, mostly retained in ArrayBuffer/UInt8Array:

<img src=https://user-images.githubusercontent.com/8599/135696634-963f731d-23d5-4c39-8710-c86aca197c63.png width=600>

Given that it is only needed in special cases and that the memory is nicely contained in a worker that can be quickly stopped and started back up, it would be worth doing some lifecycle management. In Firefox, loading the worker takes about 80ms, while running the model takes 400ms.
Repository: terminal
Issue: when using VT mouse mode, click + drag mouse to top of screen scrolls terminal history
Labels: Area-Input,Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-2

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

1.11.2421.0

### Other Software

wsl vim (using sgr mouse mode)

### Steps to reproduce

launch vim with mouse mode enable
click and drag the mouse to top of screen

### Expected Behavior

vim receives mouse events

### Actual Behavior

vim receives mouse events and terminal history scrolls upward

https://user-images.githubusercontent.com/43626415/135701637-10ac56f1-890b-4cd1-b569-7137d2b1abea.mp4
Repository: pytorch
Issue: [LTC] Investigate why max_pool2d_with_indices needs explicit eager fallback
Labels: triaged,lazy,module: lazy

Investigate why max_pool2d_with_indices needs explicit eager fallback.
Repository: godot
Issue: Godot matching bracket checker does not ignore brackets in comments
Labels: bug,topic:editor,confirmed,usability

### Godot version

v3.3.3.stable.mono.official.b973f997f

### System information

Windows 10, GLES3, GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2

### Issue description

Shader bracket checker still runs the check on brackets in comments, which can make developing difficult
![image](https://user-images.githubusercontent.com/70374466/135713489-2bdf16e1-25e5-49da-be8b-64c81689d21d.png)
![image](https://user-images.githubusercontent.com/70374466/135713492-60df52a4-6823-466f-9b66-036d2233439b.png)


### Steps to reproduce

Put unmatching amount of brackets in a comment between matching brackets

### Minimal reproduction project

[Shader Brackets.zip](https://github.com/godotengine/godot/files/7271328/Shader.Brackets.zip)
Repository: rust
Issue: Tracking issue for future-incompatibility lint `deref_into_dyn_supertrait`
Labels: A-lints,T-lang,T-compiler,C-future-incompatibility,C-tracking-issue,S-tracking-needs-summary,A-trait-objects

## What is this lint about
We're planning to add the dyn upcasting coercion language feature (see https://github.com/rust-lang/dyn-upcasting-coercion-initiative). Unfortunately this new coercion rule will take priority over certain other coercion rules, which will mean some behavior change. See #89190 for initial bug report.

## How to fix this warning/error
Ensure your own `Deref` implementation is consistent with the `trait_upcasting` feature brings and `allow` this lint. Or avoid this code pattern altogether.

## Current status
Implementation: #89461
Repository: TypeScript
Issue: The start of a JSDoc comment completions should include options for @type-ing the closest name
Labels: Suggestion,In Discussion,Domain: Completion Lists,Domain: JSDoc

# Suggestion

Today when the autocomplete is at the `|`:

```ts
/**|
const a = []
```

We offer `/** */` as a snippet to quickly get you writing JSDoc comments. What if _in addition_ to the blank example, we included examples of `/** @type` also.

For the above example, the completion list would be:

- `/** */`
- `/** @type { any[] } */`

Which you can then use to start filling out a more complete type from. 

Looks like there's a lot of code in  [`src/services/jsDoc.ts`](https://github.com/microsoft/TypeScript/blob/main/src/services/jsDoc.ts) which could be re-applied when making these completions.

## 🔍 Search Terms

jsdoc type completions autocomplete @type 

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: transformers
Issue: How to tokenize big dataset 
Labels: Feature request

Based on examples, I am trying to train a tokenizer and a model for T5.
I use Google Colab pro,
when I tried to run the following code:

```
import datasets

from t5_tokenizer_model import SentencePieceUnigramTokenizer


vocab_size = 32_000
input_sentence_size = None # change to 100_000 works

# Initialize a dataset
dataset = datasets.load_dataset("oscar", name="unshuffled_deduplicated_fa", split="train")

tokenizer = SentencePieceUnigramTokenizer(unk_token="<unk>", eos_token="
", pad_token="<pad>")

print("len dataset:", len(dataset))

# Build an iterator over this dataset
def batch_iterator(input_sentence_size=None):
    if input_sentence_size is None:
        input_sentence_size = len(dataset)
    batch_length = 100
    for i in range(0, input_sentence_size, batch_length):
        yield dataset[i: i + batch_length]["text"]


# Train tokenizer
tokenizer.train_from_iterator(
    iterator=batch_iterator(input_sentence_size=input_sentence_size),
    vocab_size=vocab_size,
    show_progress=True,
)

# Save files to disk
tokenizer.save("/content/drive/MyDrive/Pouramini/tokenizer.json")
```
It get stuck in `train_from_iterator` because the size of dataset is large (`input_sentence_size` is around 8M sentences)
How can I divide the dataset and run the code on each block and then merge them to a tokenizer output?
Repository: vscode
Issue: Git - git setting `core.excludesFile` is ignored if placed inside an include.path of ~/.gitconfig
Labels: bug,git

I have multiple per-machine gitconfig files with sections like this:

```
[include]                                                                                                                                                                                                               
           path = ~/.local/lib/private-scripts/common.gitconfig 
```

and inside `common.gitconfig` I have this section:
```
[core]                                                                                                                                                                                                                  
           excludesFile = ~/.gitignore
```

This core.excludesFile setting is ignored by vscode. The setting does take effect if I copy the "core.excludesFile" section into ~/.gitconfig itself. All of this only happens with search.useGlobalIgnoreFiles=true.

The setting is also ignored in `git config --global core.excludesFile` but does appear in `git config --include --global core.excludesFile` and takes effect for commands like `git status`.

I think vscode should always process includes when handling user settings, reading settings with the equivalent of `git config --include --global`.
Repository: go
Issue: x/crypto/acme/autocert: allow easy use of certificate alternate chains
Labels: NeedsInvestigation,FeatureRequest

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17.1 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes (using golang.org/x/crypto v0.0.0-20210921155107-089bfa567519)

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ahochhaus/.cache/go-build"
GOENV="/home/ahochhaus/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ahochhaus/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ahochhaus/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/ahochhaus/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/ahochhaus/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17.1"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1798779825=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

The new acme `Client.ListCertAlternates` [API](https://github.com/golang/crypto/commit/089bfa5675191fd96a44247682f76ebca03d7916) from @jameshartig and @FiloSottile is great when directly using an acme client. However, most users likely use autocert instead and no easy method to select an alternative / preferred chain is provided.

### What did you expect to see?

An easy way to select the preferred certificate chain in autocert.

### What did you see instead?

The need to use the acme library directly to select an alternate cert chain.
Repository: rust
Issue: Performance pitfall and regression around closures in Rust 2021
Labels: I-slow,P-medium,A-closures,C-bug,A-edition-2021

In Rust 2021 the borrow checker got extended to see through borrow paths when writing closures. I've been wondering how this is implemented, but it seems like it's basically just syntax sugar for individual manual borrows that get moved in. This however leads to worse codegen than when a move closure would've been possible. So you might end up with code that performs worse by accident:

[Godbolt](https://rust.godbolt.org/z/WzoGG1b6n)

```rust
pub struct Foo {
    x: f32,
    y: f32,
    z: f32,
}

pub fn with_move(bar: &mut Foo) -> impl Fn() -> f32 + '_ {
    move || bar.x + bar.y + bar.z
}

pub fn without_move(bar: &mut Foo) -> impl Fn() -> f32 + '_ {
    || bar.x + bar.y + bar.z
}
```

```asm
example::with_move:
        mov     rax, rdi
        ret

example::without_move:
        mov     rax, rdi
        lea     rcx, [rsi + 4]
        mov     qword ptr [rdi], rsi
        add     rsi, 8
        mov     qword ptr [rdi + 8], rcx
        mov     qword ptr [rdi + 16], rsi
        ret
```
Repository: godot
Issue: In exported games, a FileDialog in Resource mode cannot open resources in subfolders
Labels: bug,topic:core,confirmed

### Godot version

v3.3.4.stable.official [faf3f883d]

### System information

Windows 10

### Issue description

After exporting a project, opening a FileDialog to select resources only lets you select resources in the root directory. Attempting to select a resource outside the root directory does not close the dialog, and does not emit the `file_selected` signal.

If you open a resource in the root directory, the dialog works properly.

If the dialog is set to `File System` instead of `Resources`, the dialog works properly.

If the game is launched directly from the Godot editor instead of being exported, the dialog works properly.

I am unsure whether this bug only affects Windows exports, or whether it affects other platforms as well.

### Steps to reproduce

**Reproducing the bug by yourself:**

Create a FileDialog. Ensure the `Access` is set to `Resources`, and that there are resources in a subdirectory which it can access.

Export the project for Windows. Open your FileDialog and attempt to access a resource from a subdirectory. Double-click the resource or click the "Open" button to select it. It is expected that the dialog should close and emit the `file_selected` signal. However, the dialog does not respond and no signal is fired.

**Reproducing the bug with the attached minimal reproduction project:**

Export the project for windows. Click the "Open Resource Dialog" button and attempt to access a resource from the "dir" subdirectory. It is expected that the dialog should close and emit the `file_selected` signal. However, the dialog does not respond and no signal is fired.

If you close the dialog, you can experiment by accessing files in the root directory, or by launching a FileDialog which access files, instead of resources. Both of these cases will work OK. The FileDialog closes and the file path is printed to the screen.

### Minimal reproduction project

[Dialogs.zip](https://github.com/godotengine/godot/files/7271950/Dialogs.zip)

![image](https://user-images.githubusercontent.com/5902413/135727463-6318e289-3e10-461d-8857-f7e5fbeddfc8.png)
Repository: flutter
Issue: Proposal to add advanced selection backgrounds for list tiles inside navigation drawers 
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

## Use case

Looking at Google's apps with specific brand theming ...

![Screenshot](https://user-images.githubusercontent.com/22963120/135729995-c3a073f4-9c57-42d8-82af-cf7642ae977e.png)

... alongside [the Material documentation](https://material.io/components/navigation-drawer) it reveals that developers are expected to be able to change the "selection effect" on list tiles inside navigation drawers.

ListTile offers a `shape` property but:

1. It doesn't apply to `selected`/`selectedTileColor`
2. It's impossible to add margin around the selection like shown on Material docs

## Proposal

More theming values on `ListTile`/`ListTileTheme`, that specify the selection background, shape and margin (padding inside the actual list tile).

## Things to note

Considering this effect is only expected in navigation drawers -- extra precaution and implementation has to be done (conditions of when to show this selection effect specific to drawers).

If it's already implemented then I'd change this into a documentation issue since it wasn't obvious enough to find it apparently.
Repository: godot
Issue: Audio delay on HTML5 builds when loading big scenes
Labels: bug,platform:web,topic:audio

### Godot version

3.3.3, 3.3.4

### System information

Windows 10, HTML5, Firefox or Chromium, GLES2 or GLES3

### Issue description

Whenever I load a heavy scene that takes more than a frame to load, the game's audio becomes desynchronized. On the title screen the menu sounds will play right when the key is pressed, after loading the level select scene, there is a noticeable delay in all sound effects after input.

### Steps to reproduce

Load a big scene that takes longer than a frame, and play audio from an input key.

### Minimal reproduction project

[HTML5AudioDelay.zip](https://github.com/godotengine/godot/files/7272345/HTML5AudioDelay.zip)

Run this project in HTML5
Repository: vscode
Issue: Restore all windows when closing them all at once
Labels: help wanted,feature-request,linux,windows,workbench-window

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.60.2
- OS Version: Ubuntu 21.04 / Gnome

Steps to Reproduce:

1. Open two windows (optional : open folder/files, do some modifications and save them), then click on "Quit 2 Windows" to quit VS Code : 

![Screenshot](https://user-images.githubusercontent.com/63376748/135734365-3eaa9542-6288-41de-a8ae-7bde9c48bf71.png)

2. Open VS Code again : only the last active window is reopened (no matter what value is set in `window.restoreWindows`)

However, if VS Code is closed by another mean (like `pkill code`), on the second launch all windows are correctly restored. 
What is causing this behaviour, and how to fix it ?
Repository: flutter
Issue: [Proposal] Align prefixIcon with input text
Labels: a: text input,framework,f: material design,c: proposal,team-design,triaged-design

Currently the `prefix` property of `InputDecoration` correctly aligns the prefix with the text while the `prefixIcon` property does not.




See example below:

```
import 'package:flutter/material.dart';

const Color darkBlue = Color.fromARGB(255, 18, 32, 47);

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(
        scaffoldBackgroundColor: darkBlue,
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Padding(
            padding: const EdgeInsets.all(8),
            child: TextFormField(
              decoration: const InputDecoration(
                
                hintText: 'Your Phone number',
                // flag
                prefixIcon: Text('AlignMe'),
                prefix: Text('IAmAligned '),
               

                // adding or removing one of those changes the alignment
                alignLabelWithHint: true,
                label: Text('Phone'),
//                 border: OutlineInputBorder(),
              )
            ),
          ),
        ),
      ),
    );
  }
}

```

The use case is one requested for one of my package to always see the dial code even when unfocussed here: https://cedvdb.github.io/phone_form_field/#/