sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Additional actions in Refactor Preview panel
Labels: feature-request,under-discussion,workspace-edit

Hi, based on some extension creators utilizing `vscode.workspace.applyEdit()` we got the feedback, that they are not able to measure the satisfaction of users with provided fixes.
What we would expect is that the extension would be able to gather feedback, e.g. by clicking thumbs up/down.

At the moment, there is no way how extensions would be able to gather the feedback, as the refactor preview does not have a way to define additional actions.
_____

Would it be possible to expose a menuId connected to some `IAPIMenu` key (e.g. refactorPreview/context), which would return back some descriptive data for the WorkspaceEdit on interaction? Additional data to return with the additional action, could be passed via `WorkspaceEditMetadata` which would pass it to `bulkEditService`.

The benefit of this would be that every extension could define additional actions based on their need/preference, and gather valuable feedback.

There could be a clear differentiation between the Default actions created by VScode and the ones added by extension, e.g. by a separator and rendering the additional buttons with secondary coloring.

[ Apply ] [ Discard ] | [ +1 ] [ -1 ]

Additional info:
- VS Code Version: 1.71.2
- OS Version: CromeOS 104.0.5112.83
Repository: angular
Issue: Allow dynamic LOCALE_ID
Labels: area: i18n,P3

### Which @angular/* package(s) are relevant/related to the feature request?

core, language-service, localize

### Description

### Background

Dynamically changing the locale is now possible, that is, you can change the translations at any time during the life of the application without reload by calling
```js
clearTranslations();
loadTranslations(newLocale);
```
and then recreating all components. The latter can be achieved by routing to a new page or recreating the router outlet, e.g.:
```js
<router-outlet
    *ngFor="let item of [locale]">
</router-outlet>
```
It is understood that this only changes future calls to `$localize`, so developers have to ensure that translations are not cached in global variables, and in particular not cached in global services.   

### Problem

What is missing is a way to change `LOCALE_ID` dynamically, since that is provided as a string (i.e. a Javascript primitive).  So e.g. the default locale of the `DatePipe` remains the initial locale.

### Workaround

Since Angular always (I think) ends up calling this before using the value of `LOCALE_ID`
```js
function normalizeLocale(locale: string): string {
    return locale.toLowerCase().replace(/_/g, '-');
}
```
we can just supply an object with a `toLowerCase` method:
```js
class LocaleIdProvider {

    get localeStr(): string {
        ... return dynamic locale as string here ...
    }
    
    toLowerCase(): string {
        return this.localeStr.toLowerCase();
    }
}

@NgModule({
    provide: [{ provide: LOCALE_ID, useClass: LocaleIdProvider }]
})
export class AppModule {
    ...
}
```

### Proposed solution

I propose to make that workaround official (but with `toString` instead of `toLowerCase`), that is, only require that `LOCALE_ID` has a `toString()` method instead of an actual string:
```js
interface Stringifyable {
    toString(): string;
}

export const LOCALE_ID: InjectionToken<Stringifyable>;
```
This is a backward compatible change since strings are naturally stringifyable. 

### Alternatives considered

Our choices are:
* Stick with the inofficial workaround, but that is fragile in case Angular starts using more string methods of `LOCALE_ID`. 
* Always supply the locale to the Angular `DatePipe`
* Write our own date pipe that does not use `LOCALE_ID`.
Repository: pytorch
Issue: TransformerEncoder/TransformerDecoder has same initial parameters for all layers
Labels: module: nn,triaged

### 🐛 Describe the bug

Example code (based on [documentation](https://pytorch.org/docs/stable/generated/torch.nn.TransformerEncoder.html#torch.nn.TransformerEncoder)):
```python
encoder_layer = nn.TransformerEncoderLayer(d_model=512, nhead=8)
transformer_encoder = nn.TransformerEncoder(encoder_layer, num_layers=6)
```
Then you have:
```python
(transformer_encoder.layers[0].linear1.weight == transformer_encoder.layers[1].linear1.weight).all() == True
```
Etc.

This is because:
```python
self.layers = _get_clones(encoder_layer, num_layers)
```
Where `_get_clones` uses `deepcopy`.

The same problem is for `TransformerDecoder`.

This is unexpected behavior to me but maybe it is expected and just not well documented?

Note that `Transformer` itself does not have this problem because it calls `_reset_parameters` after all the layers are assigned.


### Versions

(I have an outdated version but I checked the source code of the current version.)

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: stable-diffusion-webui
Issue: Predict and display VRAM requirement for a run and add warnings if it would cause OOM
Labels: enhancement

**Is your feature request related to a problem? Please describe.**
Users running on low VRAM (6GB in my case) will try to max it out as close as possible to the limit. If I open too many tabs in firefox or other apps, I can easily take up an extra 150-300mb VRAM which will now be too much to fit my gen parameters in. I think preventions for crashing is always a good feature to have in any user-facing application. (I understand why this wasn't a priority of course)

**Describe the solution you'd like**
Display a text label near the generate button which estimates the amount of VRAM that will be used, changing to a red color if it would not fit.

Perform the check as well when pressing the generate button and display a warning if it will not fit. This warning should not use the browser popup API because we can't ensure a good UX. Instead, the warning should be another label on the page which appears. Pressing the button a second time bypasses the warning and launches anyway. The warning label is removed/refreshed whenever the page regains focus, and when the VRAM frees up again.

I'm not sure how fast/expensive it is to poll the GPU for VRAM usage e.g. with nvidia-smi (or perhaps there are already built-in functions in PyTorch for this) so perhaps this should be done every few seconds.

Perhaps the VRAM requirements can be calculated mathematically, I'm not exactly sure how myself and there are certainly challenges with all the different options like --lowvram, --medvram, not to forget the optimizations that people are introducing on a weekly basis seemingly. As such it might be better for starters that we simply store statistics about the VRAM usage by parameters for each runs, i.e. making it adaptative and 'learning'. The prediction would display a question mark if the resolution hasn't be tried yet with the enabled optimizations, model size, resolution, and any other setting which can affect VRAM.

**Describe alternatives you've considered**

**Additional context**
Repository: godot
Issue: Vulkan: Volumetric Fog is reflected too much in SSR
Labels: bug,topic:rendering,confirmed,topic:3d

### Godot version

4.0 beta 2 and also #66756 rebased against master (57ffc4d82c)

### System information

Arch Linux, KDE 5.25.5, NVIDIA GeForce GTX 1060 6GB, NVIDIA Driver 515.76 Kernel 5.19.12-zen1-1-zen

### Issue description

![Volumetric Fog On](https://user-images.githubusercontent.com/32441086/194097757-e75e68e1-43a4-48e0-8cff-bc51d105ed35.png)
![Volumetric Fog Off](https://user-images.githubusercontent.com/32441086/194097872-6c0ef77c-7125-4d73-824f-350b126236e2.png)

It seems to get brighter the further you zoom away from the surface.
![image](https://user-images.githubusercontent.com/32441086/194098614-12548ef5-ae27-4f91-80e7-26994eb3e212.png)


### Steps to reproduce

Enable Volumetric Fog and SSR in the same scene.

### Minimal reproduction project

[ssr_volumetric_fog_bug.zip](https://github.com/godotengine/godot/files/9716932/ssr_volumetric_fog_bug.zip)
Repository: pytorch
Issue: JIT miss the argument `as_tuple` for API `nonzero`
Labels: oncall: jit

### 🐛 Describe the bug

JIT miss the argument `as_tuple` for API `nonzero`

```py
import torch


def fn(input):
    as_tuple = False
    return torch.nonzero(input, as_tuple=as_tuple, )

inp = torch.tensor(1., dtype=torch.float32)

print(fn(inp))

jit_fn = torch.jit.script(fn)
print(jit_fn(inp))
```

```
tensor([], size=(1, 0), dtype=torch.int64)

RuntimeError:
Arguments for call are not valid.
The following variants are available:

  aten::nonzero(Tensor self) -> Tensor:
  Keyword argument as_tuple unknown.

  aten::nonzero.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!):
  Argument out not provided.

The original call is:
def fn(input):
    as_tuple = False
    return torch.nonzero(input, as_tuple=as_tuple, )
           ~~~~~~~~~~~~~ <--- HERE
```

### Versions

```
PyTorch version: 1.13.0.dev20221001
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.9.13 (main, Aug 25 2022, 23:26:10)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.19.5-051905-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 11.7.99
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 515.65.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.3
[pip3] torch==1.13.0.dev20221001
[pip3] torchaudio==0.13.0.dev20221001
[pip3] torchvision==0.14.0.dev20221001
[conda] blas                      1.0                         mkl  
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py39h7f8727e_0  
[conda] mkl_fft                   1.3.1            py39hd3c417c_0  
[conda] mkl_random                1.2.2            py39h51133e4_0  
[conda] numpy                     1.23.3                   pypi_0    pypi
[conda] numpy-base                1.23.1           py39ha15fc14_0  
[conda] pytorch                   1.13.0.dev20221001 py3.9_cuda11.7_cudnn8.5.0_0    pytorch-nightly
[conda] pytorch-cuda              11.7                 h67b0de4_0    pytorch-nightly
[conda] pytorch-mutex             1.0                        cuda    pytorch-nightly
[conda] torch                     1.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchaudio                0.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchvision               0.14.0.dev20220923+cu116          pypi_0    pypi
```
Repository: deno
Issue: Support for install scripts (ex. "postinstall") for "npm:" specifiers with global node modules
Labels: node compat

> i'm wondering if maybe we should run post install scripts with a prompt when a user does --node-modules-dir . So the registry cache will always be pure, but the local node_modules won't necessarily be
> Edit: the reason for this only being done in local node_modules dir is that the user's global cache might get into an inconsistent state if they choose not to run or to run a post install script

^^ by @dsherret 

We should consider adding support for "postinstall" scripts, but instead of running them manually users would be prompted to confirm they indeed want postinstall script to run. In such case, the script would have permissions passed on the CLI applied with missing permissions being prompted for.
Repository: flutter
Issue: Add new animated icon between back arrow and close
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

## Use case

An animated icon between `Icons.arrow_back` and `Icons.clear`.

## Proposal

Add new AnimatedIcon.
Repository: flutter
Issue: [integration_test] Allow to run integration tests on profile mode
Labels: framework,c: proposal,f: integration_test,P3,team-framework,triaged-framework

## Use case

On our CI pipeline we run the tests using `flutter test integration_test` command, and it works well since it has a nice reporting capability. The tests are though running very slowly as they run in debug mode.

## Proposal

We would like to be able to run integration tests on profile mode, while keeping the JUnit reporting functionality that is missing with `flutter drive` command.
Repository: rust
Issue: invalid -Ctarget-cpu could fail more gracefully?
Labels: A-LLVM,T-compiler,C-bug

`rustc helloworld.rs  -C target-cpu=lol`

will print a ton of identical/similar warnings: 

````
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
'lol' is not a recognized processor for this target (ignoring processor)
LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it!
pure virtual method called
terminate called without an active exception
[1]    2648405 IOT instruction (core dumped)  rustc helloworld.rs -C target-cpu=lol
````
Repository: flutter
Issue: [pigeon] Pigeon readme should talk a bit more about tests
Labels: d: api docs,package,team-ecosystem,p: pigeon,P3,triaged-ecosystem

Currently, there's no mention of tests and how mocking etc should work with pigeon in the docs.
Repository: neovim
Issue: Respect order of diagnostics from LSP servers in qflist
Labels: enhancement,diagnostic

### Feature already in Vim?

No

### Feature description

Hi, my request is regarding LSP support in neovim but it's not specific to any of the LSP servers.
When qflist is populated with diagnostics, the order of entries is determined by buffer number and line number.
Here's the sorting function: https://github.com/neovim/neovim/blob/master/runtime/lua/vim/diagnostic.lua#L1606
Some(if not all) LSP servers send diagnostics in a particular order and I don't get why neovim would try to reorder them.
I'd suggest adding an option to provide your own sorting function(or simply allow to not sort the entries).
Repository: godot
Issue: Threads intercalary
Labels: topic:core,needs testing

### Godot version

3.5.1-stable

### System information

Windows 10

### Issue description

I'm confused about how threads should interact with each other. As in my example below, each thread was expected to take care of its respective function (core = _ready() and thread = Th(thread)), but in this interleaving where the core waits for the thread to resolve something, the thread ends up taking over the calls from core prints.

### Steps to reproduce

```gdscript
extends Node

var test:bool = false
var stop:bool = false

signal release

func _ready():
	print("core: ",OS.get_thread_caller_id())
	var thread:Thread = Thread.new()
	if thread.start(self,"Th",thread) == OK:
		for x in range(2):
			test = true
			yield(self,"release")
			print("core: ",x," ",OS.get_thread_caller_id())
		stop = true

func Th(thread):
	while true:
		if test:
			test = false
			print("thread: ",OS.get_thread_caller_id())
			OS.delay_msec(500)
			emit_signal("release")
		if stop:
			break
	thread.call_deferred("wait_to_finish")
```
result:
core: -2717241881944355145
thread: 4249528327736205830
core: 0 4249528327736205830
thread: 4249528327736205830
core: 1 4249528327736205830

### Minimal reproduction project

_No response_
Repository: stable-diffusion-webui
Issue: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Labels: asking-for-help-with-local-system-issues

when i try to run webui-user.bat  this error shown.

 
venv "C:\Users\giray\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 67d011b02eddc20202b654dfea56528de3d5edf7
Traceback (most recent call last):
  File "C:\Users\giray\stable-diffusion-webui\launch.py", line 110, in <module>
    run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
  File "C:\Users\giray\stable-diffusion-webui\launch.py", line 60, in run_python
    return run(f'"{python}" -c "{code}"', desc, errdesc)
  File "C:\Users\giray\stable-diffusion-webui\launch.py", line 54, in run
    raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\Users\giray\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Repository: pytorch
Issue: AOT Autograd Device Partitioning
Labels: triaged,module: functorch

### 🚀 The feature, motivation and pitch

Pytorch Eager will parallelize the backward based on devices. We should do something similar in AOT Autograd, perhaps with subprocesses. 

### Alternatives

_No response_

### Additional context

_No response_

cc @zou3519 @Chillee @samdow @soumith
Repository: godot
Issue: Can't use a inital dictionary like in Godot3
Labels: bug,topic:gdscript,regression

### Godot version

v4.0.beta2.official [f8745f2f7]

### System information

windows 10

### Issue description

Migrating my plugin and run into this issue.

**[Parse Error: Initializer for a constant must be a constant expression.](res://testScene.gd:4 - Parse Error: Initializer for a constant must be a constant expression.)**

The error line is also invalid, the error occurs at line 23 for `TYPE_DICTIONARY: Dictionary(),`

I used a static/const dictionary to predefine default object for each type like
```
const DEFAULT_VALUES_BY_TYPE := {
	TYPE_NIL: null,
	TYPE_BOOL: false,
	TYPE_INT: 0,
	TYPE_FLOAT: 0.0,
	TYPE_STRING: "",
	TYPE_VECTOR2: Vector2.ZERO,
	TYPE_RECT2: Rect2(),
	TYPE_VECTOR3: Vector3.ZERO,
	TYPE_TRANSFORM2D: Transform2D(),
	TYPE_PLANE: Plane(),
	TYPE_QUATERNION: Quaternion(),
	TYPE_AABB: AABB(),
	TYPE_BASIS: Basis(),
	TYPE_TRANSFORM3D: Transform3D(),
	TYPE_COLOR: Color(),
	TYPE_NODE_PATH: NodePath(),
	TYPE_RID: RID(),
	TYPE_OBJECT: null,
	TYPE_DICTIONARY: Dictionary(),
	TYPE_ARRAY: Array(),
	TYPE_PACKED_BYTE_ARRAY: PackedByteArray(),
}
```
The last three entries produces the issue.
I can replace by
```
	TYPE_DICTIONARY: {},
	TYPE_ARRAY: [],
```
But thats inconsistent to the other used values e.i. `TYPE_RECT2: Rect2(),`
And `TYPE_PACKED_BYTE_ARRAY: PackedByteArray(),` cant be fixed at the moment

This is blocking me from migrating my plugin, I want to have static pre-initialized dictionaries used by my tools to access them through static functions.




### Steps to reproduce

create a gd script and put in
```


const DEFAULT_VALUES_BY_TYPE := {
	TYPE_NIL: null,
	TYPE_BOOL: false,
	TYPE_INT: 0,
	TYPE_FLOAT: 0.0,
	TYPE_STRING: "",
	TYPE_VECTOR2: Vector2.ZERO,
	TYPE_RECT2: Rect2(),
	TYPE_VECTOR3: Vector3.ZERO,
	TYPE_TRANSFORM2D: Transform2D(),
	TYPE_PLANE: Plane(),
	TYPE_QUATERNION: Quaternion(),
	TYPE_AABB: AABB(),
	TYPE_BASIS: Basis(),
	TYPE_TRANSFORM3D: Transform3D(),
	TYPE_COLOR: Color(),
	TYPE_NODE_PATH: NodePath(),
	TYPE_RID: RID(),
	TYPE_OBJECT: null,
	TYPE_DICTIONARY: Dictionary(),
	TYPE_ARRAY: Array(),
	TYPE_PACKED_BYTE_ARRAY: PackedByteArray()
}
```

or 
```
const x1 = []
const x2 = Rect2()
const x3 = PackedByteArray()
```


### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: wonky Num Lock Behavior
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Triage

### Microsoft PowerToys version

0.63.0

### Running as admin

- [X] Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

starting Power toys, having a Keyboard setting to remap 'num lock' key to the : colon (Shift+;)
remap left windows key + shift + ; to the num lock key


### ✔️ Expected Behavior

num lock functions normally 

### ❌ Actual Behavior

in some apps (calculator, windows explorer) it thinks the num lock in on, and I get the number outputs
in other app (office, chrome) it thinks num lock is off, and I get the alternate functions (arrow keys, pg. up & pg. down).  

### Other Software

_No response_
Repository: vscode
Issue: errors thrown by openerService.resolveExternalUri not surfaced to MainThreadWindow.$asExternalUri in VS Code Web
Labels: bug,help wanted,opener

- VS Code Version: 1.72.1 (`main`)
- OS Version: N/A 
- Browser: Chrome

Steps to Reproduce:

1. `git clone https://github.com/microsoft/vscode.git`
2. run VS Code Web locally
3. install any extension that uses `asExternalUri` (i.e. [this one](https://github.com/jsjoeio/as-external-uri-test/tree/main/packaged))
4. run command "Hello World"
5. Open Browser Console

Expected
Should log error thrown `'Could not resolve external URI: ' + resource.toString()`

Actual
Nothing 

Notes
I believe this happens because there is no `try/catch` block here: 
https://github.com/microsoft/vscode/blob/main/src/vs/workbench/api/browser/mainThreadWindow.ts#L63

When you add a `try/catch` block there like so:
```typescript
		try {
			const result = await this.openerService.resolveExternalUri(URI.revive(uriComponents), options);
			return result.resolved;
		} catch (e) {
			console.error('something wrong', e);
		}
		const result = await this.openerService.resolveExternalUri(URI.revive(uriComponents), options);
		return result.resolved;
```

Then it logs the thrown error

Screenshot
<img width="1712" alt="image" src="https://user-images.githubusercontent.com/3806031/194153310-89376d1a-1938-4a44-ae20-6aacb9499628.png">

Would you accept a PR to fix this?