sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Force PyTorch to clear CUDA cache
Labels: module: cuda,triaged

### 🚀 The feature, motivation and pitch

Especially during hyperparameter optimization, exceptions like OOM can occur.
I'm looking for a way to restore and recover from OOM exceptions and would like to propose an additional `force` parameter for `torch.cuda.empty_cache()`, that forces PyTorch to release all cache, even if due to a memory leak some elements remain.
Optionally a function like `torch.cuda.reset()` would obviously work as well.

Current suggestions with `gc.collect` and `torch.cuda.empty_cache()` are not reliable enough to restore the initial state.

### Alternatives

Completely restart Python kernel releases all CUDA memory, but does not work on HPO.

### Additional context

Suggestions how to properly track down memory leaks and solve my core problem are appreciated. 

cc @ngimel
Repository: go
Issue: go/ast,go/parser: Decl field of type parameter identifier is nil for methods (but not for functions)
Labels: NeedsFix

<pre>
$ go version
go version devel go1.18-902dc38212 Tue Feb 1 16:52:46 2022 +0000 linux/amd64
</pre>

See: https://gotipplay.golang.org/p/QhA7oB1-h54
For `F`, a generic funciton, the identifier `T` has a Decl field referring to the field in the type parameter list of `F`.
But for `M`, a method for a generic type`, the identifier `T` has a nil Decl field instead.

Is this intentional? Seems inconsistent.

cc @findleyr
Repository: angular
Issue: feat(router): Add `Route.metatags` and `Route.pageDescription` to Route definitions
Labels: feature,area: router,feature: under consideration

### Which @angular/* package(s) are relevant/releated to the feature request?

@angular/router 

### Description

As a follow up to #7630 it would be nice to also add both `metatags` and `pageDescription` to the router's definition API in order to streamline how developers define routes.

We can also explore what other data is commonly defined and managed with custom strategies in the `Route.data` property to see how else we could simplify Route definitions especially for new developers.

### Proposed solution

```
const routes : Routes = {
  path: '', 
  title: 'Angular Home Page', 
  metatags: ['home', 'angular'],
  pageDescription: 'Home page for Angular documentation',
  children: [
    {path: 'about', title: 'About Angular', metatags: ['info', 'about'], pageDescription: 'About page for Angular documentation',},
    {path: 'docs/:param', title: TitleResolver, metatags: MetatagResolver, pageDescription: PageDescriptionResolver}
  ]
};
```

### Alternatives considered

Currently this is individually managed and already possible with the `Route.data` additional attributes, which works but is more work for the developer and does not enforce best practices.
Repository: PowerToys
Issue: [File Preview]: Investigate Shikijs instead of Monaco
Labels: Idea-Enhancement,Needs-Spec,Product-File Explorer

### Description of the new feature / enhancement

Monaco is feature packed, but when the code preview is read-only you don't get to use all it's feature, and thus all you have is a big bulky and slow preview. Shikijs (https://github.com/shikijs/shiki) is designed for read-only code previews, so, I think it's better. 

### Scenario when this would be used?

Only use Shikijs for read-only code previews.

### Supporting information

Interestingly, I don't have any evidence to back up my claim. But, just looking at the bundle size of both projects, Shiki seems better, https://bundlejs.com/?q=monaco-editor ![](https://deno.bundlejs.com/badge?q=monaco-editor)  vs.   https://bundlejs.com/?q=shiki ![](https://deno.bundlejs.com/badge?q=shiki)
Repository: transformers
Issue: New and better T5 checkpoints from scaling transformers paper
Labels: New model

# 🌟 New model addition

## Model description
This paper explores different ways of scaling T5:
Scaling Efficiently: Insights from Pre-training and Finetuning Transformers
https://arxiv.org/abs/2109.10686

They found new checkpoints (DeepNarrow) that perform significantly better than the previous models on downstream applications.

Here is a table from the paper that compares the old Base, Large, XL and XXL models to the new ones:

<img width="551" alt="image" src="https://user-images.githubusercontent.com/37597043/152038969-de1fa56e-991d-493b-b94c-96cbc42d69be.png">

The checkpoints were released today here:
https://github.com/google-research/google-research/tree/master/scaling_transformers

<!-- Important information -->

## Open source status

* [x] the model implementation is available: the current T5 implementation in transformers
* [x] the model weights are available: https://github.com/google-research/google-research/tree/master/scaling_transformers
* [x] who are the authors: Yi Tay, Mostafa Dehghani, Jinfeng Rao, William Fedus, Samira Abnar, Hyung Won Chung, Sharan Narang, Dani Yogatama, Ashish Vaswani, Donald Metzler
Repository: pytorch
Issue: Add support for `complex` `mean` to the `normal` operator
Labels: module: distributions,feature,triaged,module: complex

### 🚀 The feature, motivation and pitch

See the discussion [here](https://github.com/pytorch/pytorch/pull/70087#discussion_r771201462).

`mean` can be both a complex scalar (via `Scalar`) and a complex `Tensor`.

This requires changing the overloads in `native_functions.yaml`, refactoring C++ code, and changing tests in `test_nn.py`.

I've already started working on this, but decided to split this out into a separate branch just to keep things moving. So I'll do this sometime soon.

### Alternatives

_No response_

### Additional context

_No response_

cc @fritzo @neerajprad @alicanb @nikitaved @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano
Repository: pytorch
Issue: Also allow dicts as type of `params=` field in param groups of optimizers
Labels: module: optimizer,triaged,enhancement

### 🚀 The feature, motivation and pitch

Preserving param names is useful for correlating them with params in other models (e.g. in teacher-student setups). The most natural way for this is dict (list of (name, param) tuples is also fine, but personally I prefer dicts). Another possible format is unpacking it into two lists: `params` and `params_names`, but this is less convenient to construct since a bit more boiler plate is needed at construction time or making helpers such as `param_group = lambda params_dict, **kwargs: dict(params = list(params_dict.values()), params_names = list(params_dict.keys()), **kwargs)` that unpacks a param dict into two lists.

To support this, some plumbing code in optimizers would need to be updated to understand dicts. Or it could normalize dicts into params/params_names lists as I do above. Similar normalization is happening already when a list of params is converted to a dict-like param group

Related: https://github.com/pytorch/pytorch/issues/71683

### Alternatives

_No response_

### Additional context

_No response_

cc @vincentqb @jbschlosser @albanD
Repository: go
Issue: proposal: bufio: add Reader.Buffer
Labels: Proposal,Proposal-Hold

The `Reader` type is initialized with a buffer size. Once set, there is no API to adjust this.

This can make it challenging when parsing a file with a combination of `Peek` and `Discard` calls.
One such pattern is something like:
```go
var r *bufio.Reader = ...
for {
    buf, err := r.Peek(headerSize)
    if err != nil {
        return err
    }
    r.Discard(len(buf))
    hdr := parseHeader(buf)

    buf, err := r.Peek(hdr.Size)
    if err != nil {
        return err
    }
    r.Discard(len(buf))
    processData(buf)
}
```

The code above works just fine, but fails unexpectedly when the payload size exceeds the internal buffer of `Reader`.

The current workaround is to check for `ErrBufferFull`, allocate a separate buffer, and read the expected number of bytes into that buffer. The workaround looks like:
```diff
  var r *bufio.Reader = ...
  for {
      ...

      buf, err := r.Peek(hdr.Size)
-     if err != nil {
-         return err
-     }
-     r.Discard(len(buf))
+     switch {
+     case err == nil:
+         r.Discard(len(buf))
+     case err == bufio.ErrBufferFull:
+         buf = make([]byte, hdr.Size)
+         if _, err := io.ReadFull(r, buf); err != nil {
+             return err
+         }
+     default:
+         return err
+     }
      processData(buf)
  }
```
It is unfortunate that I need to allocate a relatively large buffer in order to read large records and that I'm not able to reuse that buffer for subsequent `Reader` operations.

I propose the addition of `Reader.Buffer`, with similar semantics as [`Scanner.Buffer`](https://pkg.go.dev/bufio@go1.17.6#Scanner.Buffer):
> Buffer sets the buffer to use when reading and the maximum size of buffer that may be allocated during reading. The maximum Peek or ReadSlice size is the larger of max and cap(buf). If max <= cap(buf), Reader will use this buffer only and do no allocation.
>
> Buffer panics if it is called after scanning has started.

Using this new API, the code above would look like:
```diff
  var r *bufio.Reader = ...
+ r.Buffer(nil, 64<<20) // we never expect records to exceed 64MiB
  for {
      ...
  }
```

\cc @josharian
Repository: material-ui
Issue: [SpeedDial] cannot traverse using NVDA screen reader
Labels: accessibility,component: speed dial

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Using NVDA (free screen reader for windows), traverse using keyboard to SpeedDial button then try to traverse items. You cannot access any of the speedDial action items

### Expected behavior 🤔

SpeedDial should be usable via keyboard when using popular screen readers such as NVDA.
NOTE: this DOES work without screenreader and it does work with Mac VoiceOver.  

### Steps to reproduce 🕹

Steps:

1. Go to "Basic speed dial" demo: [https://mui.com/components/speed-dial/#basic-speed-dial](url)
2. Enable NVDA.  You can download it here: [https://www.nvaccess.org/download/](url)
3.  Set the focus to top left, tab to speedDial (the menu opens, revealing items
4. Click up arrow: items are not focused
5. try clicking anything else like right/left/down arrow, tab etc, nothing enables you to focus the speedDial items


### Context 🔦

These are "critical" errors as cited by our a11y auditors. Anyone using windows/chrome/NVDA will not be able to access these items. 

### Your environment 🌎

Using the MUI demo page with latest mui version 5.4.0
Repository: flutter
Issue: Automatic BackButton on AppBar disappears if there is an endDrawer open
Labels: framework,f: material design,P2,team-design,triaged-design

see e.g. https://stackoverflow.com/questions/66485355/flutter-2-0-appbar-back-button-disappeared-if-contains-enddrawer

Looks like our fix for https://github.com/flutter/flutter/pull/63272 was a little too heavy-handed and we need a more nuanced approach.
Repository: TypeScript
Issue: Ambient accessor declaration does not parse with trailing comma
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

ambient accessor comma

<!--
  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

Since ambient accessors were allowed – nightly

### ⏯ 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.5.4#code/CYUwxgNghgTiAEEQBd4A8Bc8DeAoe8A5ivAA4wD2pAFAJRYDOyMAlgHaEA0+8DJ5Vag0bN2hWrgC+QA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
declare let x: {
  get prop(): string,
//                  ^ '{' expected
  set prop(s: string)
}
```

It gets even weirder 

```ts
declare let x: {
  get prop(): string { return "" },
// No error until...              ^ Property or signature expected
}
```

### 🙂 Expected behavior

The former example should parse without error, and the latter should parse but issue a grammar error on the implementation in an ambient context.
Repository: create-react-app
Issue: Missing Error Overlay
Labels: needs triage,issue: bug report

Hi, I have created and running new react app but the error overlay is not showing on the screen, i can only saw it in the console. can you please help me how can i enable this to development environment. Thanks

<img width="842" alt="Screen Shot 2022-02-02 at 11 08 16 AM" src="https://user-images.githubusercontent.com/4197193/152087550-0ac7ae26-07c4-4960-aab0-7fa0d188adb8.png">
Repository: youtube-dl
Issue: Add cambro.tv support
Labels: site-support-request,nsfw

## Checklist

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

- Single video: https://www.cambro.tv/223101/artoftease-chaturbate-nude-cam-porn-video/

## Description

Number of sites use kt_player video player, including cambo.tv and camhub.cc. Making one of them work will actually cover the entire network.
Repository: create-react-app
Issue: JavaScript
Labels: needs triage

If you have a general question about Create React App or about building an app with Create React App we encourage you to post in GitHub Discussions instead of this issue tracker. The maintainers and other community members can provide help and answer your questions there: https://github.com/facebook/create-react-app/discussions

If you're looking for general information on using React, the React docs have a list of resources: https://reactjs.org/community/support.html

If you've discovered a bug or would like to propose a change please use one of the other issue templates.

Thanks!
Can someone tell me what did I miss please, via image?
![seedgoose](https://user-images.githubusercontent.com/78063202/152098970-426a1ad1-a225-4227-8a03-71fb558afbba.png)
Repository: vue
Issue: Property validator should report the property that failed type / validator check
Labels: contribution welcome,improvement,warnings

### What problem does this feature solve?
Components with multiple properties might fail property validation at the most inopportune time: assigning one property will trigger property validation for all `function initProps (vm, propsOptions)`. Stack trace will show that the issue was triggered by assigning a specific property "prop1" while validation will actually fail on "prop2". If this is combined with component actually rendering for the first time ("prop1" was the trigger), it will be unclear what property actually failed.

In my case, reported error message was:

    [Vue warn]: Invalid prop type: "[object Object]" is not a constructor

This is from method `function assertType (value, type, vm)`

Clarify for the actual n00b error message I received: I specified prop type to be of an "enum" class declared with Object.freeze. Actual values are, naturally, Number.

### What does the proposed API look like?
It would be clearer to add prop name to the message like this:

    [Vue warn]: Invalid prop "propName" type: "[object Object]" is not a constructor

This would require to add `propName` (or just `name`) parameter to `assertType` in order to be able to include it in the message

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: deno
Issue: Deno FFI permissions model
Labels: permissions,suggestion,FFI

Hello. I've found some possible improvements with the current Deno FFI permissions model.

At present, a binary toggle between "FFI allowed" and "FFI forbidden" is offered. This has a couple of problem points. For one, it means that once FFI is in play, then all Deno safety guarantees are off. A malicious piece of code can then just open up system libraries and f.ex. build their own unsafe Node.js APIs to work on familiar, unsafe ground.

Second, the current model does not make safe exceptions to the FFI rule possible. Let me illustrate.

For my use case it would be useful, at least in short term, to load a given library from one of three possible paths. As such, a comma separated list of paths for `--allow-ffi` would allow me to trust my given library while avoiding the possibility of a malicious actor gaining access to any and all system libraries they please. Alternatively, a library name (perhaps with glob pattern, eg. `libpython-3.*`) could be considered though this is of course somewhat problematic with naming, aliasing etc. 

As an additional point of security, I think that calling FFI symbols and loading new libraries should be separated in the permissions. Once a library is loaded, the symbols contained in it are free of Deno's permission model to begin with. At present the calls do check for FFI permissions, though. This essentially means that once a library is loaded, Deno cannot relinquish its right to open more libraries and still keep calling the one library it loaded (and presumably thinks safe to call).

A further security option, though mostly irrelevant given permissions are constant for a single process, would be to allow the `dlOpen` symbol definitions to define custom permissions on a per-symbol basis. eg. Given a symbol named `readFile` the symbol definition could then define `"permissions": "read"`. I'm not sure if this would be terribly useful, though.
Repository: vscode
Issue: Git - changes UI does sometimes not react correctly on context menu actions
Labels: bug,git

<!-- ⚠️⚠️ 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.63.2
- OS Version: Windows 10 and Windows Server 2019 standard

Steps to Reproduce:
This is an intermittent issue which does not happen every time but i'm very sure that everyone who use the git integration has already encountered it

When you try to right click on an item and stage it nothing happens, or, in some cases, the wrong item gets staged.

this issue happens quite frequently especially after popping a stash. to make sure this issue does not encounter you always need to open the file you wish to click on, which is very annoying for a fluid workflow
Repository: TypeScript
Issue: Discrimination of tuple type doesn't work for completion
Labels: Suggestion,Experience Enhancement

# Bug Report

Doesn't discriminate tuple type correctly in autocompletion. Show props from all variants.

![image](https://user-images.githubusercontent.com/736697/152119549-9c6134d4-0b28-408f-93cd-6ff38c9c6bb6.png)



```ts
type Shape =
  | ["rectangle", { height: number; width: number }]
  | ["square", { size: number }]
  | ["circle", { radius: number }]

let shape: Shape = ["circle", {}]

```

### 🙁 Actual behavior

Showing props from other variants.

### 🙂 Expected behavior

Discriminate types in autocompletion correctly. Show only related props. Correct behavior should also be for all members of discriminated tuple type (when for example tuples in a union have different lengths),

Some time ago I had opened the same bug on union types with objects, it was fixed: https://github.com/microsoft/TypeScript/issues/24763
Repository: TypeScript
Issue: Detect uncalled function statements
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms
- uncalled function
- check
- statement


## ⭐ Suggestion

Today TS can detect uncalled functions that appear in conditionals. I propose also extending this to uncalled functions that appear as statements

## 📃 Motivating Example

```ts
function doImportantStuff() { }

doImportantStuff;  // Mistake here. The user forgot to call the func

if (doImportantStuff) { // This one is detected today

}
```

## 💻 Use Cases

This can help catch a common programming mistake. As long as the function being checked has a `const` binding and is always a function type, I don't think there are cases where you actually want to write `doImportantStuff;` as a statement

## Related issues
- #47699
Repository: TypeScript
Issue: Detect uncalled functions that appear in void expressions
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms
- uncalled function
- check
- statement


## ⭐ Suggestion

Today TS can detect uncalled functions that appear in conditionals. I propose also extending this to detect uncalled functions that appear an an expression where the result is unused

## 📃 Motivating Example
```ts
export interface Foo {
    doImportantStuff(): void;
}

declare const foo: Foo;

if (foo.doImportantStuff) { // This one is detected
  ...
}

[foo].forEach(x => foo.doImportantStuff);  // Mistake here. The user forgot to call `doImportantStuff`

```

## 💻 Use Cases

This was inspired by a real world bug in the VS Code codebase. The case with `forEach` shows the problem we ran into

Off the top of my head, I don't think there would be false positives but may need some more thought to make sure 

## Related issues
- #47698
Repository: godot
Issue: [4.0] StaticBody3D not detected into an Area
Labels: documentation,topic:physics,topic:3d

### Godot version

v4.0.alpha.custom_build [2aee84c75]

### System information

Windows 11

### Issue description

Moving a StaticBody3D into an Area. I can't detect the body into the Area
It is working correctly using 3.4.2, but not on master at this date.

![should_print](https://user-images.githubusercontent.com/4235617/152127677-868ae387-6972-4e17-a9cc-13c6e1f94535.gif)



### Steps to reproduce

- Move a StaticBody3D programmatically into an area
- print a message from the area signal "on_body_entered"

### Minimal reproduction project

[StaticBody and Area 4.0.zip](https://github.com/godotengine/godot/files/7985044/StaticBody.and.Area.4.0.zip)
[StaticBody and Area 3.4.2.zip](https://github.com/godotengine/godot/files/7985046/StaticBody.and.Area.3.4.2.zip)