sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Preserve tensor subclasses when unpacking a SavedTensor
Labels: module: autograd,triaged

## 🚀 Feature

Preserve tensor subclasses when unpacking a SavedTensor

## Motivation

This is motivated by #47117

## Pitch

Currently, a new tensor object is created when we unpack a saved variable.
This loses any subclass information during the backward. 

Using the saved tensor hooks, we should be able to preserve that, if we also:

- Add the optimization of https://github.com/pytorch/pytorch/blob/4a390a56c4a345a917f5a4d8ee6cd47818fa7e84/torch/csrc/autograd/variable.h#L691 into https://github.com/pytorch/pytorch/blob/4a390a56c4a345a917f5a4d8ee6cd47818fa7e84/torch/csrc/autograd/variable.h#L722
- Change the call of `make_variable` in https://github.com/pytorch/pytorch/blob/4a390a56c4a345a917f5a4d8ee6cd47818fa7e84/torch/csrc/autograd/saved_variable.cpp#L183 to use `std::move`
- (Optionally) expose Tensor::alias in python

Given that, the user could register the following saved tensors hooks.

```python
def pack_hook(x): return x
def unpack_hook(x): return CustomTensor(x)
```

This way, the call to `make_variable` should not create a new tensor object from the result of `unpack_hook` because there should only be one reference to the returned `CustomTensor`.

## Alternatives

Use dispatch to python


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: electron
Issue: [Feature Request]: Expose desktopCapturer API to minimized windows
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

The desktopCapturer API only returns active windows, if a window is minimized or invisible, we will not get it in returned sources.

### Proposed Solution

Like many desktop/meeting sharing apps, hope desktopCapturer would catch all windows and return all  source id in desktopCapturer.

### Alternatives Considered

-

### Additional Information

-
Repository: pytorch
Issue: MultiStepLR with different gammas for each parameter group
Labels: module: optimizer,triaged,module: LrScheduler

## 🚀 Feature
MultiStepLR and StepLR with different gammas for each parameter group

## Motivation

I recently wanted to use different gammas for different parameter groups and was surprised that this is not possible yet. We can then eliminate stepwise LR decrease for only one group by setting the corresponding gamma = 1, too.

## Pitch

The implementation seems quite easy and should not create any computational overhead. I directly created a pull request but then saw that I should first propose an issue here.
Implementation snippet:
```python
[group['lr'] * gamma ** self.milestones[self.last_epoch]
                for group, gamma in zip(self.optimizer.param_groups, self.gamma)]
```

Cheers,
Florian

cc @vincentqb @jbschlosser @albanD @iramazanli
Repository: vscode
Issue: Should default themes specify link hover color?
Labels: ux,under-discussion,workbench-hover

On the web (and not only) links usually react to hover (underline or color change). Right now in vscode in some places there is underline, like in markdown preview, in other places there is no style change, like in Settings UI or an editor hover. 

There is already a color for that `textLink.activeForeground`. I think it would be better if default themes specified it.
Repository: rust
Issue: Improve diagnostic for casting `T: ?Sized + Trait` to `dyn Trait`
Labels: C-enhancement,A-diagnostics,T-compiler,D-confusing,D-newcomer-roadblock,D-terse



Given the following code: ([playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=97f05bb8c204551af955cf27b7e3f8ef))

```rust
pub trait Trait {}

fn convert<T: Trait + ?Sized>(b: Box<T>) -> Box<dyn Trait> {
    b
}

```

The current output is:

```
error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> src/main.rs:4:5
  |
3 | fn convert<T: Trait + ?Sized>(b: Box<T>) -> Box<dyn Trait> {
  |            - this type parameter needs to be `std::marker::Sized`
4 |     b
  |     ^ doesn't have a size known at compile-time
  |
  = note: required for the cast to the object type `dyn Trait`
```

This output is _correct_, however it is not quite clear in the standard mental model people have. In the standard mental model of `?Sized`, in this context people will think `T: Trait + ?Sized` means `T` can be `dyn Trait`, which should obviously be castable to `dyn Trait` when behind a `Box`. So the error _feels_ incorrect.

The reason the error is correct is that `T` could be a different unsized type that implements the trait, for example `[u8]` or `dyn OtherTrait`. In such a case the cast to `dyn Trait` would require some kind of double-DST, which doesn't exist.

I'm not quite sure how but it would be nice if this error could make this clearer.

In this specific case, if `convert` were a trait method, the solution would to have an impl for `Box<T: Sized>` and one for `Box<dyn Trait>` . Unsure if there's a good way to indicate that, but that's not as necessary as making the error clearer about why `T: Trait + ?Sized` can't be cast to `dyn Trait`
Repository: rust
Issue: non_fmt_panic warns on 2021 for external macros
Labels: A-lints,C-bug,A-edition-2021

I've noticed that `non_fmt_panic` will raise a warning in 2021 for external macros in some cases. #87965 silenced the case involving a non-string payload, but there are still warnings for strings with braces.  I don't think there is anything the caller can do to fix the warning (other than silencing it).

I tried this code:

```rust
// Any edition, 2021, 2018, or 2015.
fn main() {
    bar::picnic!("{example}");   // WARNING:  panic message contains an unused formatting placeholder
}
```

With the macro defined as either macro_rules or proc-macro:

```rust
// bar, 2015 or 2018
#[macro_export]
macro_rules! picnic {
    ($e:expr) => {panic!($e)};
}
```

Or defined as a proc-macro:

```rust
// bar, any edition
extern crate proc_macro;

#[proc_macro]
pub fn picnic(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    let t = input.into_iter().next().unwrap();
    proc_macro::quote! {
        panic!($t);
    }
}
```

I expected to see this happen: There (probably?) shouldn't be a warning if there is nothing the caller can do.

Instead, this happened: Warning is emitted.

### Meta
`rustc --version --verbose`:
```
rustc 1.56.0-nightly (30a0a9b69 2021-08-17)
binary: rustc
commit-hash: 30a0a9b694cde95cbab863f7ef4d554f0f46b606
commit-date: 2021-08-17
host: x86_64-apple-darwin
release: 1.56.0-nightly
LLVM version: 12.0.1
```
Repository: tauri
Issue: [Windows] Trojan alert from windows defender and other anti-virus providers
Labels: type: bug,help wanted,platform: Windows

<!-- BEFORE YOU FILE A NEW ISSUE-->
<!--

0. Please search open issues before duplicating a new one.
1. Make sure you are using the latest version of everything including: 
  - rustc 
  - ALL relevant Tauri Libs
2. You must attach the results of cargo tauri info or yarn tauri info to your issue.
3. Make sure it is an issue with Tauri, and not something to do with your side of the stack.
4. Consider starting a discussion. Speaking of which, have you looked there? Maybe your question has been answered.
5. Remember to follow our community guidelines and be friendly.
6. Is this an issue or a feature request? If the latter, please use the other template.

-->

### **Describe the bug**
After building from source a Tauri app, [Commandos](https://github.com/Commandos-app/Commandos) after doing a npm run tauri dev, at some point Windows Defender freaks out and I get a Trojan:Script/Wacatac.B!ml alert from it
### **To Reproduce**
Steps to reproduce the behavior:
1. Clone the repo
2. Run the dev process of the app
3. Use the app a bit 
4. Alert shoudl happen at some point

### **Expected behavior**
Windows Defender shouldn't flag this app as a Trojan

### **Platform and Versions (required):**
<!-- Use `yarn tauri info` or `cargo tauri info` command to get this information, and paste it here: -->
```
Operating System - Windows, version 10.0.19043 X64
Webview2 - 92.0.902.73

Node.js environment
  Node.js - 16.5.0
  @tauri-apps/cli - 1.0.0-beta.7
  @tauri-apps/api - 1.0.0-beta.6

Global packages
  npm - 7.20.3
  yarn - 1.22.5

Rust environment
  rustc - 1.54.0
  cargo - 1.54.0

App directory structure
/.git
/.github
/.vscode
/e2e
/images
/logo
/node_modules
/src
/src-tauri

App
  tauri.rs - 1.0.0-beta.7
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../dist/commandos
  devPath - http://localhost:5200
  framework - Angular
  bundler - Webpack
```

### **Additional context**
Not my app just wanted to tested it and ran into this issue
Repository: pytorch
Issue: [FX] Data type of target should be validated on Node construction and lint
Labels: triaged,module: fx

The `Node` class https://github.com/pytorch/pytorch/blob/7df2324120513c387524db604f8bcc7281aaf95f/torch/fx/node.py#L88 has a `target` field that must be a specific type depending on the `op` value of the `Node`. In particular, `target` must be a `Callable` if `op='call_function'` and a string otherwise https://github.com/pytorch/pytorch/blob/7df2324120513c387524db604f8bcc7281aaf95f/torch/fx/node.py#L15. Currently, the node constructor checks that the `target` is an instance of string for `call_method` and `call_module`, but does not validate the type fojr `call_function`. We should fix that. Second, we should augment the `lint` pass https://github.com/pytorch/pytorch/blob/af3cbfed9510747c776418c260c5116f662c6452/torch/fx/graph.py#L1030 to also check that this precondition is true.

Example case that should fail:

```
import torch
import torch.fx

g = torch.fx.Graph()

n = torch.fx.Node(graph=g, name='foo', op='call_function', target='foo', # This target should fail
                  args=(), kwargs={})
```

cc @ezyang @SherlockNoMad
Repository: TypeScript
Issue: JavaScript: Using Object Property Value Shorthand loses semantic highlighting
Labels: Suggestion,Experience Enhancement

*TS Template added by @mjbvz*

**TypeScript Version**: 4.4.-1

**Search Terms**
- semantic highlighting

---

Issue Type: <b>Bug</b>

Using the es6 syntax for object property value shorthand makes it so the used properties always have the light blue color, instead of the dark blue color of readonly properties. Here's a reproducible code snippet:
```js
const someVariable = "value"
const someObject = {
    someProperty: "other value",
    someVariable
}
```
In VSCode:
![image](https://user-images.githubusercontent.com/38259440/129813231-a0060d7e-4f2b-49c3-943e-7d703b75499e.png)
In the example above, someVariable shows up with a light blue color in the object declaration, whereas the expected behaviour would be a darker color that you could get from doing `someVariable: someVariable`:
![image](https://user-images.githubusercontent.com/38259440/129813252-bf22ec38-7aa9-4aa1-bf72-79564a3076fd.png)

VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:13:12.822Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|19.89GB (5.37GB free)|
|Process Argv|D:\\Users\\rodri\\Documents\\GitHub\\hypixel-translators-bot --crash-reporter-id 1aa51578-c79e-468f-b062-c24334e21918|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (17)</summary>

Extension|Author (truncated)|Version
---|---|---
better-comments|aar|2.1.0
jsdoc-markdown-highlighting|bie|0.0.1
vscode-eslint|dba|2.1.23
gitlens|eam|11.6.0
EditorConfig|Edi|0.16.4
prettier-vscode|esb|8.1.0
copilot|Git|1.3.2371
vscode-graphql|Gra|0.3.16
discord-vscode|icr|5.7.0
vscode-env|Iro|0.1.0
python|ms-|2021.8.1105858891
jupyter|ms-|2021.8.1236758218
remote-wsl|ms-|0.58.2
vsliveshare|ms-|1.0.4673
vetur|oct|0.34.1
vscodeintellicode|Vis|1.2.14
minecraft-lang-colorizer|zz5|1.0.0


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspyt653:30270858
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
vscextlangct:30333562
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490
pygetstartedc2:30351386
vstre464cf:30350173
bridge0723:30353136

```

</details>

<!-- generated by issue reporter -->
Repository: angular
Issue: Add parentInjector to Platform Factories
Labels: feature,area: core,core: di,feature: under consideration

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

platform-browser-dynamic, platform-browser, platform-server

### Description

We would like to extend the functionality of the existing platform factories by adding a parent injector to the platform.  The only way to do this currently involves copying providers from Angular source code, some of which are private exports, and some which have to be massaged in order to work at all.

This would allow us to change the code
```typescript
export function _document() {
    ɵsetDocument(document);
    return document;
}
export function OurPlatformDynamic(ourInjector: OurInjector): PlatformRef {
    return createPlatform(
        Injector.create({
            providers: [
                {provide: PlatformRef, deps: [Injector]},
                {provide: TestabilityRegistry, deps: []},
                {provide: ɵConsole, deps: []},
                {provide: COMPILER_OPTIONS, useValue: {}, multi: true},
                {provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]},
                {provide: PLATFORM_ID, useValue: 'browser'},
                {provide: PLATFORM_INITIALIZER, useValue: ɵinitDomAdapter, multi: true},
                {provide: DOCUMENT, useFactory: _document, deps: []},
                {
                    provide: COMPILER_OPTIONS,
                    useValue: {providers: [{provide: ResourceLoader, useClass: ɵResourceLoaderImpl, deps: []}]},
                    multi: true,
                },
            ],
            parent: ourInjector.angularInjectorApi,
            name: 'Platform: Bridge',
        }),
    );
}
```
to the much terser:
```typescript
export function OurPlatformDynamic(ourInjector: OurInjector): PlatformRef {
    return platformBrowserDynamic([], ourInjector.angularInjectorApi);
}
```

### Proposed solution

Change the return type of `createPlatformFactory` to `(extraProviders?: StaticProvider[], parentInjector?: Injector) => PlatformRef`
The implementation would then simply pass `parentInjector` in when calling `Injector.create`.

### Alternatives considered

Calling `createPlatform` directly is possible, but then it requires copying the list of built-in providers from the existing platforms. Such as copying `_CORE_PLATFORM_PROVIDERS`.  This is fragile as this would break anytime that list changes.
Repository: go
Issue: go/build: provide function to enumerate valid target combinations
Labels: NeedsInvestigation,FeatureRequest

Please provide a reliable function to dynamically query the list of valid (GOOS, GOARCH) combinations, so that application maintainers can plug directly into this system and build as many ports as possible.

Certain workarounds have limitations:

* https://golang.org/doc/install/source#environment (out of date, requires HTML parsing, fragile)
* gox (out of date, requires shelling out)

This could all be streamlined with a first party API. An array of combination strings would be nice. Or a hashmap of valid combination strings, which could serve for both enumeration and efficient validation, acting logically as a mathematical set for existence / non-existence checks.
Repository: go
Issue: cmd/link: invalid relocation: R_DWARFSECREF when building as c-shared on windows/arm64
Labels: NeedsInvestigation,compiler/runtime

When building a c-shared project _without_ `-w -s` on windows/arm64:

```
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f070f
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f0722
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f072a
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f0735
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f070f
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f0722
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f072a
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8813: invalid relocation: R_DWARFSECREF .debug_info+0x1f0735
sym 8813: unsupported obj reloc R_DWARFSECREF/4 to go.info.net.IPMask.Size$abstract
sym 8818: invalid relocation: R_DWARFSECREF .debug_info+0x200c09
sym 8818: unsupported obj reloc R_DWARFSECREF/4 to go.info.golang.zx2c4.com/wireguard/windows/conf.(*IPCidr).Bits$abstract
sym 8818: invalid relocation: R_DWARFSECREF .debug_info+0x200c09
sym 8818: unsupported obj reloc R_DWARFSECREF/4 to go.info.golang.zx2c4.com/wireguard/windows/conf.(*IPCidr).Bits$abstract
sym 8818: invalid relocation: R_DWARFSECREF .debug_info+0x200c09
```

Code in question is: https://git.zx2c4.com/wireguard-windows/tree/embeddable-dll-service

I won't be at a real desk for another few weeks, unfortunately, so debugging this one will have to wait. But in case anyone else wants to jump in, the above is what I'm seeing.
Repository: go
Issue: x/sys/windows/svc: gs:28h is zero after servicemain returns sometimes
Labels: NeedsInvestigation

I'm very rarely seeing crashes when using services from c-shared hosted in a .NET process, when calling svc.Stop, to the tune of:

```
Application: demo-client.exe
CoreCLR Version: 5.0.921.35908
.NET Version: 5.0.9
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00007FF9286BCFC8
```

Disassembling, that matches:

![image](https://user-images.githubusercontent.com/10643/129950421-b4f0e7bc-f4a6-4cfb-b61e-8c1ba19d0604.png)

Apparently our TLS slot has been zeroed by something?
Repository: godot
Issue: GLTF export crashing upon exceeding allocations
Labels: bug,topic:editor,crash,topic:3d,topic:export

### Godot version

v3.4.beta3.official

### System information

Windows 10 GTX 1060 6gb Intel 4690k

### Issue description

GLTF Export crashing upon use. Trying to export with either gltf or glb results in crash and no file.

### Steps to reproduce

Open MeshSmall.tscn
Export to any directory you want
Editor Will Crash.

### Minimal reproduction project

[GLTF EXPORT BUG.zip](https://github.com/godotengine/godot/files/7009548/GLTF.EXPORT.BUG.zip)
Repository: godot
Issue: Blend shape glitch after programmatically changing values
Labels: bug,topic:rendering,confirmed,topic:3d

### Godot version

3.3.stable

### System information

Windows 10, GLES3, RTX 2070

### Issue description

Programmatically changed blend shape values on duplicated meshes glitch on camera move

```
func _ready():
	$LightSwitch/LightSwitch.set("blend_shapes/SwitchOff", 1)
```

### Steps to reproduce

Create new inherited scene off an imported mesh
Drop the inherited scene as node in the main scene
Duplicate that node as many times as needed
Change one of those nodes shape keys inside GDscript on ready or something
This is hard to catch because it only glitches on specific positions/angles

Glitch video:
https://user-images.githubusercontent.com/106078/129967429-7704c99d-b0b0-4ab1-af01-68e199a1620c.mp4



### Minimal reproduction project

[BlendShapeBug.zip](https://github.com/godotengine/godot/files/7010011/BlendShapeBug.zip)
Repository: vscode
Issue: Allow quick pick items to always be visible and sticky
Labels: feature-request,quick-pick,under-discussion

Based on internal discussions, would like to have an option in the Quick Pick item API to allow certain items to be grouped together and separated by a border. Additionally, when there are long entries in the list, it would be great to have this group always visible like below (see items at the bottom of the quick pick):

<img width="648" alt="CleanShot 2021-08-18 at 13 53 40@2x" src="https://user-images.githubusercontent.com/35271042/129970755-5b43f2ea-2f2c-4076-a6ef-5df7f3cd0afd.png">

And when filtering the list, it would filter as it normally does:

<img width="633" alt="CleanShot 2021-08-18 at 13 56 13@2x" src="https://user-images.githubusercontent.com/35271042/129971045-3907bf17-db01-458c-a1b1-999c3e76f2a7.png">

<img width="627" alt="CleanShot 2021-08-18 at 13 56 20@2x" src="https://user-images.githubusercontent.com/35271042/129971057-c2318503-8641-468c-98c1-8ba39928faf2.png">


cc @luabud