sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: A second instance of a notebook is opened when debugging with two editor groups
Labels: bug,workbench-editors,notebook-perf

- Open a notebook in one editor group 1, and a editor group 2 with anything in it
- Start RBL in the notebook
- Focus group 2
- Open the debug view, click the stack frame for the notebook cell (there are other ways to make this happen too)
- A second notebook editor instance is opened in group 2

We just call openEditor and it should reveal the cell in the editor where it's already open. But I think that we can't do this correctly for notebook cells. Where is the code that checks whether the editor is already open?

![image](https://user-images.githubusercontent.com/323878/134716924-05e817a8-b18c-4903-b3f1-303bd849f6c7.png)
Repository: PowerToys
Issue: [FancyZones] Profile Switching should move and resize windows to fit new profile
Labels: Idea-Enhancement,Product-FancyZones

### Description of the new feature / enhancement

Profile switching should resize and move windows already snapped in the current profile to the new applied profile when you change it with a shortcut. 

You could link profiles which does this action so you have or link specific zones, having the same number of zone (zone 1, zone 2...) could be automatically used aswell. 



### Scenario when this would be used?

This would work when you have already set zones and snaps and change the fancyzone profile with a shortcut, this should trigger it to move and resize the windows to fit zones in the newly loaded profile. zone 1 > zone 1 between profiles.

This way you could change between different workflows and windows over time, this would also open up for many more new usecases people could get creative with like having a main large window that you rotate with.

### Supporting information

_No response_
Repository: youtube-dl
Issue: Add retry delay
Labels: request


- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

youtube-dl, when a (fragment) download fails, it retries immediately without delay. Beside that being bad practice (it's basically DoS'ing the server with requests), at least fragement download failures seem to be caused by the youtube backend not being able to deliver the data fast enough to the frontend server. So immediately retrying will not fix the issue. Adding even a small delay gives the server side enough time to process and get the missing fragment in a few retries at most.

I verified this by adding a sleep() call into report_retry_fragment() (yes, it's a hack) and got something around half a second for most fragment download errors to be resolved.

It might be worthwhile to make this retry delay configurable by a commandline parameter as well.
Repository: pytorch
Issue: Integration of __torch_dispatch__ with masked tensor semantics
Labels: triaged,module: __torch_dispatch__

Creating this issue to discuss if masked tensor semantics are correctly maintained with `__torch_dispatch__`. This came up in an offline discussion with @ezyang while talking about `DiagLinearOperator` class and the requirement to have gradients of the same size as that of the tensor stored in `DiagLinearOperator` (and not the meta tensor) while using `__torch_dispatch__`. Currently, the masked semantics for `DiagLinearOperator` are not maintained in the backward pass (the size of gradient tensor is the same as that of the meta tensor). 

```
// x = diag(...)  # x is sparse
// z = x @ y  # z is dense
// z.sum().backward()
//
// grad_z = all ones
// grad_x = should be sparse
//
// grad_x = grad_z @ y  # grad_x is dense here
//
// x             = [ 0 0 0 0 1 0 ]
// grad_x        = [ 1 1 1 1 1 1 ]
// sparse_grad_x = [ 0 0 0 0 1 0 ]
//
// sparse_x.sparse_sum().backward()
// x.sum().backward()
```

cc @albanD
Repository: pytorch
Issue: Transformer modules should not hard-code the activation function
Labels: module: nn,triaged

## 🚀 Feature
When passing a `str` to the `activation` argument, only `torch.nn.functional.relu` and `torch.nn.functional.gelu` activation functions are supported. The `activation` argument should be able to support any activation function defined in `torch.nn.functional`.

## Motivation

I want to be able to use the PyTorch Transformer `torch.nn.module`s with any activation function that is defined in PyTorch. Here is the list of `torch.nn.module`s:

- `torch.nn.Transformer`
- `torch.nn.TransformerEncoder`
- `torch.nn.TransformerEncoderLayer`
- `torch.nn.TransformerDecoder`
- `torch.nn.TransformerDecoderLayer`

The activation functions live in both `torch.nn` (e.g., `torch.nn.ReLU`, `torch.nn.SiLU`) and `torch.nn.functional` (e.g., `torch.nn.functional.relu`, `torch.nn.functional.silu`). Mathematically, any function which maps an input float `torch.Tensor` to an output `torch.Tensor` of the same shape that is defined in either of the above two namespaces (`torch.nn` and `torch.nn.functional`) should be supported.

## Pitch

Redefine `transformer.py:_get_activation_fn` as follows:

```python
def _get_activation_fn(activation):
    try:
        activation_fn = getattr(torch.nn.functional, activation)
    except AttributeError:
        try:
            activation_fn = getattr(torch.nn, activation)()
        except AttributeError:
            raise TypeError(f'Activation function {activation} is not defined in neither `torch.nn` nor `torch.nn.functional`')
    return activation_fn
```

## Alternatives

 - Create a dedicated module for activation functions and have `_get_activation_fn` interact with that
 - Hard-code the list of activation function names supported as opposed to using `getattr`
 - Instead of passing in a string `activation` to one of the above `torch.nn.module`s, pass in an activation function that has already been instantiated.

## Additional context

A major part of model development, performance tuning, experimentation, etc. is trying different activation functions. Often, a model is part of a larger system such as a hyperparameter tuner which compares activation functions. No hacking should be necessary to achieve this functionality.

Furthermore, as the field of machine learning matures, new activation functions will be discovered. This feature ensures forward-compatibility as long as PyTorch supports those new activation functions.


cc @albanD @mruberry @jbschlosser @walterddr
Repository: godot
Issue: Error/Crash if method of object of inner class type is being run in another thread and outer script reloaded
Labels: bug,topic:core,topic:gdscript,confirmed,crash

### Godot version

3.x build c26547414d62095b3f65d6c3d102e4f9a1f6bc0b

### System information

OS: Arch Linux, CPU: Ryzen 5, GUP: RX 480

### Issue description

When an active (still executing or waiting in another thread) instance of an object of inner class type exists, and something causes the outer script to be reloaded, Godot either reports a random script error or crashes.

Ideally, the script shouldn't be reloaded at all as a reference to the inner class still exists, or, if we think the programmer should avoid the situation, the engine should report an error instead of just crashing when in debug mode.

I found this issue because I often use inner classes to define tasks to send to a thread pool. The workaround is to ensure the thread pool has finished all tasks before performing actions that may result in this situation.

The workaround, however, doesn't allow me to start reloading a scene, for instance, while such a task is running, which happens if I want to ignore the result of that task and go ahead with the scene change.

### Steps to reproduce

- Script A creates an object (Object A) of an inner class and hands it to another script (Script B) that uses it inside a thread.
- The scene containing Script A is freed and then reloaded while the object is still being held by Script B and the other thread.
- If the thread execution is still ongoing, running code inside Object A, a random script error shows up, worse if the thread was waiting on a synchronization primitive and then the execution resumes because of the main thread, there is a crash (see the attached project).

### Minimal reproduction project

[godot_inner_class_bug.zip](https://github.com/godotengine/godot/files/7227846/godot_inner_class_bug.zip)
Repository: vscode
Issue: Git - VSCode fails to ignore commented lines in commit template when configured comment char
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

<!-- 🪓 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: 
```
Version: 1.60.2 (user setup)
Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Date: 2021-09-22T12:00:31.514Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043
```
- OS Version:
```
Edition	Windows 10 Pro
Version	21H1
Installed on	‎22-‎Sep-‎21
OS build	19043.1237
Experience	Windows Feature Experience Pack 120.2212.3530.0
```

Steps to Reproduce:

1. Create an empty folder and initialize a new git repo
2. Then configure the repo to have a custom comment char and a commit message template with comments using the custom comment char (cannot use the default `#` char as it has special meaning for our commit messages)
```
[core]
        commentChar = *
[commit]
        template = <full-path-to-message-template>
```
3. Then modify the index and commit changes using VSCode 

Expected result: All comments from commit message template should be removed
Actual result: All comments from the commit message template are committed as part of the message

_Note: When committing using `git bash` using `vim` editor it successfully remove all the comments_
Repository: godot
Issue: Improve error message when a float is expected but an int is passed as a shader function parameter
Labels: enhancement,usability,topic:shaders

### Godot version

v3.3.3.stable.mono.official.b973f997f

### System information

Windows 10, GLES3, GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2

### Issue description

In .shader files the built-in function pow() will raise _Invalid arguments_ error if any of the arguments is a variable or function output of type _int_.
The error states: "_Invalid arguments for built-in function: pow(int,int)_" in case the arguments are (int(true),2).
At the same time, however, it will not raise any error if the arguments are any mix of variables of type float and integer/float constants.
EDIT: Apparently this applies to max() too, passing in (1,1) outputs a float so requires an int() on top for it to work with an _int_ variable, yet max(int(true),2) returns an int...
### Steps to reproduce

Use any function with output type of _int_ or variable of type _int_ as arguments passed into _pow()_ in a _CanvasItem_ type shader.

### Minimal reproduction project

[Pow Bug.zip](https://github.com/godotengine/godot/files/7227961/Pow.Bug.zip)

### Examples
![image](https://user-images.githubusercontent.com/70374466/134732677-77e95b6a-5e7a-4dee-b386-fa7be71611e9.png)
![image](https://user-images.githubusercontent.com/70374466/134732833-62fdb3ed-d36b-428a-bb96-b4e8507b948e.png)
Repository: TypeScript
Issue: Can't call `protected` method from union type (but can call `private` method)
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  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.
-->

union this protected

### 🕗 Version & Regression Information

<!-- 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 `protected`

This appears to have always failed for `protected` methods. It used to also fail for `private` methods but started working for `private` in TS 3.9.7. Might be related to #9974 or #29337 (both of which were filed before `private` started working).

### ⏯ 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.2#code/KYDwDg9gTgLgBAYwDYEMDOa4EE4G8CwAUHHGFAJYBuKMwcAZhBABQCUAXHJROQCZ4BfIiTIRaCWvwBGKKG07c+g4XBkAvNnhUkEEAHZp4MAJ5hgAJWD1OOALxwYAC3JoA3NoemLVgHSMWrK5wAPTBcADu0ADWaB4mZpb0PjJygSFhkVAxKh66BkbOaImcTi5w9qVucYWJfkxsQaER0bHEJA41vikN6c1Zrbn6hnAArnrk+sXYAD6V5R0u7m0kYxN6tf49TZnZy6Pjk12yW2EAolBQ0ACEKkKEd0A)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
export class A {
  private foo(): void {}
  protected bar(): void {}
  baz() {
    const typeRef: A = this;
    typeRef.foo(); // works
    typeRef.bar(); // works
  
    const thisRef: this = this;
    thisRef.foo(); // works
    thisRef.bar(); // works

    const unionRef: A|this = this;
    unionRef.foo(); // works
    unionRef.bar(); // Error!
  }
}
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
Error when trying to call `protected` method from a union type (but `private` method works)

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
Call to `protected` method to be allowed from the union type just like the call to the `private` method.
Repository: pytorch
Issue: Add torch.distributed.shard package
Labels: oncall: distributed,triaged,sharded_tensor

## 🚀 Feature
Consolidate [ShardedTensor](https://github.com/pytorch/pytorch/blob/master/torch/distributed/_sharded_tensor/api.py#L180), [ShardingSpec](https://github.com/pytorch/pytorch/blob/master/torch/distributed/_sharding_spec/api.py#L36) and all other sharding utils under a single `torch.distributed.shard` package.

## Motivation

Currently we have a couple of different packages `torch.distributed._sharded_tensor` and `torch.distributed._sharding_spec`. Ideally, we should align all of these under a single package for sharding.

## Pitch

Initially move everything under a single private package `torch.distributed._shard` and then eventually make this public when ready for public release.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @gcramer23
Repository: godot
Issue: Linux: Tablet pen pressure randomly jumps to 1
Labels: bug,platform:linuxbsd,topic:porting,topic:input

### Godot version

3.3.3.stable

### System information

Linux (EndeavourOS [Arch]), Huion Kamvas Pro 20 Tablet Display & XPS 13 7390 2-in-1 Screen

### Issue description

This seems to be a Linux-only issue, I am not able to reproduce the bug on Windows with the same hardware.

Tablet pressure value will jump to 1 randomly for periods of 1 to 2 frames.
These do not correspond to dumps from usbhid-dump. (https://digimend.github.io/support/howto/trbl/locating_failure/), and I am not seeing the issue in other software (Krita, MyPaint, GNOME Settings tablet tester).

Tested on both a Huion Kamvas Pro 20 Tablet Display and XPS 13 7390 2-in-1 tablet.

### Steps to reproduce

```
func _input(event):
    if event is InputEventMouseMotion:
        print (event.get_pressure())
```
Use the tablet pen at varying levels of pressure. You will see the printed pressure value randomly jump to 1 for 1 to 2 frame periods.
![Screenshot from 2021-09-24 18-54-20](https://user-images.githubusercontent.com/21956520/134750388-e8495d70-9af0-4fbd-8a8c-0ab511bacb2c.png)


### Minimal reproduction project

[TabletPressure.zip](https://github.com/godotengine/godot/files/7228137/TabletPressure.zip)
Repository: TypeScript
Issue: Apply uncalled function checks to boolean expressions (ts2774)
Labels: Suggestion,Needs Proposal

# Suggestion

Similar to https://github.com/microsoft/TypeScript/issues/36048 (implemented in https://github.com/microsoft/TypeScript/pull/36402), it would be great if uncalled function checks were applied to expressions like they are for if statements and ternaries.

```typescript
export default class Range {
  lowerBound: number
  upperBound: number

  constructor(lowerBound: number, upperBound: number) {
    this.lowerBound = lowerBound
    this.upperBound = upperBound
  }

  isEmpty(): boolean {
    return this.lowerBound == this.upperBound
  }

  overlaps(other: Range): boolean {
    const isDisjoint = other.upperBound <= this.lowerBound
      || this.upperBound <= other.lowerBound
      || this.isEmpty || other.isEmpty // <-- Always true without an error
    return !isDisjoint
  }
}
```

[Playground example](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBAE2AMwIYFcA28DGnUDOBcASqgHYDmwcA3gFBxyYQDuwUAQhOuQgFxxy6ALYAjDozjowYDt14ChoiVHpScEcgRhR0OGNAAULdlx59Bw8RwA002fItLrqgJR0pTGAAsAlgQAdKZOinAAvMxsoXxecL4BgTJy5mGRyTEIUgC+6kwBAKIiYDAAnkZugmIQEJjAFJ5MTFDAMOhQ5PH+QSGpfBGRCUEZfVlMuVIQAG4c+GAERhC+HIJkVMCVcNW19Z0MTXCa2vABACIBAFYQfuTwkUs+HEmOo3AAPIPdwdGjcUwAPv8uokRgp+h84A8nr0wWMDnBAcCgoVimUEUCoVBAiiSqU4AB6fHvAC0xLgAEFMKxUKViLp0DRWH5fDx4A0OFBoHEWm0OnAAIRnS7XW45ei5IA)

## 🔍 Search Terms

This condition will always return true since this function is always defined. Did you mean to call it instead? ts2774

## ✅ 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.
-->
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).

## ⭐ Suggestion

It would be great if using an uncalled function in a boolean expression was an error.

## 📃 Motivating Example

It would be great if this was true:

```typescript
// Error
const bad = false || new Range().isEmpty

// Works!
const good = false || new Range().isEmpty()
```

## 💻 Use Cases

Recently spent awhile debugging some code that was always returning true before realizing I was checking the truthyness of an uncalled function.
Repository: flutter
Issue: Allow mocking PluginRegistrarWindows
Labels: engine,platform-windows,a: desktop,P2,team-windows,triaged-windows

Currently `PluginRegistrarWindows` is a concrete class with mostly non-virtual methods, and that's also what's passed to plugin registration. Plugins that need to interact with the registrar later (e.g., to get the current view) will pass the registrar to the plugin class's constructor, which mean it's useful to be able to mock it for native unit testing.

We should extract an interface class with a new name, and update the plugin template to have the plugin class take the interface, not the implementation.

We'll need to do the former well before the latter though, and then wait for that to reach stable, so that the plugin template builds with stable. (This is what I get for not building unit tests for plugins very early in desktop development...)
Repository: pytorch
Issue: Constants in torch.Jit.script
Labels: oncall: jit

Hi , I am new to torch.Jit.script functionalities. But while going through the docs , I understood that the constants in the forward pass are not recorded in the graph created by the script module (torch.Jit.script).
would like to know what are referred to as constant with a small pytorch  model example. 
Thanks in advance !!!!!!!
Repository: TypeScript
Issue: parse jsdocs @property at top level
Labels: Suggestion,Help Wanted,Experience Enhancement

# Suggestion

"currently @property is only parsed as a child of @typedef. It would be more consistent to parse it at the top-level too"

# 💻 Use Cases

```
/**
 * Controls the alignment of text when printed.
 *
 * @property left - Left-aligns the text.
 * @property right - Right-aligns the text.
 * @property center - Centers the text horizontally.
 */
type TextAlignment = 'left' | 'right' | 'center';
```
Repository: neovim
Issue: Global variable added to shada can never be removed
Labels: bug,editor-state

### Neovim version (nvim -v)

685cf398130c61c158401b992a1893c2405cd7d2, also 0.4.4

### Vim (not Nvim) behaves the same?

no, 8.2.2434

### Operating system/version

macOS, Linux

### Terminal name/version

any

### $TERM environment variable

any

### Installation

compiled from source

### How to reproduce the issue

```
echo 'set shada+=!' > init.vim
nvim -u init.vim
let g:SHADAVAR = 1
:q
nvim -u init.vim
unlet g:SHADAVAR
:q
nvim -u init.vim
echo exists('g:SHADAVAR')
```

### Expected behavior

`0` (variable not defined)

### Actual behavior

`1` (variable defined)
Repository: pytorch
Issue: Test ZeRO on gloo backend for GPU
Labels: oncall: distributed,triaged,pt_distributed_rampup,module: ddp

## 🚀 Feature
https://github.com/pytorch/pytorch/pull/65385 fixed up the issue that ZeRo tests did not work with Windows, but we should still run tests in general on Gloo with GPU as most distributed tests are tested with the NCCL and Gloo backend. Currently on windows the ZeRO tests use Gloo + GPU but for the rest of the OSes only NCCL + GPU is used.


## Motivation

Most of our distributed tests test both backends and we should keep doing this for ZeRO.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @gcramer23