sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Adding max_norm constraint to an Embedding layer leads to an error
Labels: module: nn,triaged

## Max_norm constraint results in strange behavior

Here is a simplified (and meaningless) network where this problem occurs:
```python
class DDImodel(nn.Module):
    def __init__(self, max_separation = 155, position_embedding_size = 50, output_classes = 5):
        super(DDImodel, self).__init__()
        self.max_separation = max_separation
        self.position_embedding = nn.Embedding(max_separation, position_embedding_size, max_norm=3.0)
        self.hidden2class = nn.Linear(position_embedding_size, output_classes)

    def forward(self, inputs):
        batch_size = inputs.shape[0]
        positions = torch.arange(0, self.max_separation).repeat(batch_size, 1)
        out = self.position_embedding(positions)
        out = torch.sum(out, dim=1)
        out = self.hidden2class(out)
        return F.log_softmax(out, dim=1)
```
Without max_norm, everything works fine. But when I switch it on, I get an error:

> RuntimeError: leaf variable has been moved into the graph interior

Interestingly, it depends on the batch size. With batch size = 6, it works, but breaks when it is 7 and higher. Also, it always works with CUDA, but it doesn't work on a CPU.

Also, you can see some strange results on the computation graphs. With batch size of 6 (first image), it looks sensible, but when it is 7 (second image), there is this strange long sequence of CopySlice blocks. The error occurs only when there is this long sequence.

![graph](https://user-images.githubusercontent.com/47908386/70352260-98830e80-181f-11ea-905c-3b79f7545570.png)
![graph_strange](https://user-images.githubusercontent.com/47908386/70352263-9ae56880-181f-11ea-96a9-d98e906279c4.png)

Environment:
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.10.2

Python version: 3.6
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] msgpack-numpy==0.4.4.3
[pip3] numpy==1.17.3
[pip3] torch==1.3.1
[pip3] torchtext==0.4.0
[pip3] torchviz==0.0.1
[conda] Could not collect
Repository: pytorch
Issue: CUDA error: initialization error (multiprocessing) with Python 3.7 
Labels: needs reproduction,module: multiprocessing,triaged

## 🐛 Bug

The problem is similar to the one described in #2517 and #21092. However, the solutions mentioned in those issues do not work in this case. 

## To Reproduce

Steps to reproduce the behavior:

1. Anaconda3 with Python 3.7 
2. Pytorch 1.1.0
3. Run the code below to generate some processes in parallel with a single GPU  
4. Use the code borrowed from @floringogianu in #2517 with a little change, as below:
```
import torch
import torch.multiprocessing as mp
try: # otherwise it complains: context has already been set
  mp.set_start_method("spawn")
except: pass

def sub_processes(A, B, D, i, j, size):

    D[(j * size):((j + 1) * size), i] = torch.mul(B[:, i], A[j, i])


def task(A, B):
    size1 = A.shape
    size2 = B.shape
    D = torch.zeros([size1[0] * size2[0], size1[1]]).cuda()
    D.share_memory_()

    for i in range(1):
        processes = []
        for j in range(size1[0]):
            p = mp.Process(target=sub_processes, args=(A, B, D, i, j, size2[0]))
            p.start()
            processes.append(p)
        for p in processes:
            p.join()

    return D

if __name__ == "__main__":
  A = torch.rand(3, 3).cuda()
  B = torch.rand(3, 3).cuda()
  C = task(A,B)
  print(C)
```


## More detail about my setting:
 - OS: Ubuntu 18.4 
 - CUDA: 10.2 
 - GPU: Titan X 
 
## Workaround: 
Downgrade Python to 3.6.9 and it works. The expected output is as follow: 
```
tensor([[0.5072, 0.0000, 0.0000],
        [0.4780, 0.0000, 0.0000],
        [0.4990, 0.0000, 0.0000],
        [0.3349, 0.0000, 0.0000],
        [0.3156, 0.0000, 0.0000],
        [0.3295, 0.0000, 0.0000],
        [0.4351, 0.0000, 0.0000],
        [0.4100, 0.0000, 0.0000],
        [0.4280, 0.0000, 0.0000]], device='cuda:0')
```

So I hope someone could take a look into the reason as to why it does not work with Python 3.7 multiprocessing library. 

cc @ezyang @gchanan @zou3519
Repository: godot
Issue: Error when opening a custom dialog in response to a quit request
Labels: bug,topic:core

Godot 3.2 beta2
Windows 10 64 bits

I have a custom confirmation popup which works fine if I open it on a key press. But when I make it open in reaction to `NOTIFICATION_WM_QUIT`, this error prints in the console:

```
ERROR: Parent node is busy setting up children, move_child() failed. Consider using call_deferred("move_child") instead (or "popup" if this is from a popup).
   At: scene/main/node.cpp:332
```

Test project:
[PopupBug.zip](https://github.com/godotengine/godot/files/3933825/PopupBug.zip)
Run, close window. This makes the dialog show up, error in console. You can press `Quit` to actually close the app.
Repository: pytorch
Issue: Don't ship protoc in wheels
Labels: module: binaries,triaged

Apparently there is a torch/bin/protoc in our whl release. 

cc @ezyang
Repository: rust
Issue: Incorrect hints for `Fn` type on stable and incorrect suggestions on nightly
Labels: A-diagnostics,A-closures,T-compiler,C-bug,D-invalid-suggestion

Code
```rust
fn call_fn<F: Fn() -> ()>(f: &F) {
    f()
}

fn call_any<F: std::any::Any>(f: &F) {
    call_fn(f)
}

fn main() {
    call_any(&|| {});
}
```

currently produces on stable
```
error[E0277]: expected a `std::ops::Fn<()>` closure, found `F`
 --> src/main.rs:6:13
  |
1 | fn call_fn<F: Fn() -> ()>(f: &F) {
  |    -------    ---------- required by this bound in `call_fn`
...
6 |     call_fn(f)
  |             ^ expected an `Fn<()>` closure, found `F`
  |
  = help: the trait `std::ops::Fn<()>` is not implemented for `F`
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }
  = help: consider adding a `where F: std::ops::Fn<()>` bound
```
- `note: wrap the F in a closure with no arguments: || { /* code */ }` - ???
- `where F: std::ops::Fn<()>` - incorrect `Fn` syntax

On nightly situation is more interesting:
```
error[E0277]: expected a `std::ops::Fn<()>` closure, found `F`
 --> src/main.rs:6:13
  |
1 | fn call_fn<F: Fn() -> ()>(f: &F) {
  |    -------    ---------- required by this bound in `call_fn`
...
5 | fn call_any<F: std::any::Any>(f: &F) {
  |             -- help: consider further restricting this bound: `F: std::ops::Fn<()> +`
6 |     call_fn(f)
  |             ^ expected an `Fn<()>` closure, found `F`
  |
  = help: the trait `std::ops::Fn<()>` is not implemented for `F`
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }
```
- ` -- help: consider further restricting this bound: F: std::ops::Fn<()> +` has missing type and incorrect `Fn` syntax (`Fn()` is correct)

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1b1dcac0ec2206eeff63889ffd17d503))
Repository: flutter
Issue: Feature Request: Textfield allow override of key events before Textfield is changed.
Labels: a: text input,c: new feature,framework,P3,team-framework,triaged-framework

Hello. It would be nice to be able to get some callbacks with the chance to change behavior before it is applied to the Textfield. 
Here is an example.
A search box where the user presses the up/down arrow keys to select suggestions. The default behavior of the Textfield is to move the cursor to the beginning or end of the text field. Getting a callback with the key event before the state of the Textfield is updated and a chance to change what happens would be great. 


The other option would be allow rawkeyboardlistener to swallow or forward events to its children based on a handler. Right now if I wrap a TextField inside a Rawkeyboardlistener they both receive the key events without discrimination. 

I’m not sure what approach would be better. But either way it seems a sdk change is needed to make this happen. 

![Screen Shot 2019-12-06 at 2 49 22 PM](https://user-images.githubusercontent.com/2245494/70355471-d855f000-1837-11ea-8964-9737d43d17f0.png)
Repository: go
Issue: net/http, x/net/http2: TCP connection is not closed after http client request times out after missing RST (TCP) or GOAWAY(HTTP/2) frame
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.4 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

I believe so.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/data/home/jminter/.cache/go-build"
GOENV="/data/home/jminter/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/data/home/jminter/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build951550205=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

With a simple client like this, and using it to make a dumb GET request to some server:

c := &http.Client{
	Timeout:   30 * time.Second,
}

If the server doesn't respond within 30 seconds, the client gets a timeout error as expected. But, Go does not close the underlying TCP connection to the server. If the client keeps retrying, unfortunately its subsequent requests get queued on the same TCP connection.

If the server doesn't close the connection, or perhaps if there's an underlying TCP connection (e.g. connectivity) break which means the client and server aren't actually communicating, the client doesn't redial to establish a new connection, at least perhaps until the local kernel socket send buffer is full, or there's a TCP keepalive timeout, or something (conjecture).

You can see this when it happens because netstat continues to show the connection, and you can see its local Recv-Q figure incrementing on each retry.

Setting DisableKeepAlives works around this problem, but it's a pretty big hammer.

IMO it would make more sense for Go to abandon and close the underlying TCP connection if an HTTP timeout has occured on it.

### What did you expect to see?

I'd like to see Go net/http close underlying TCP connections if the HTTP request they are running times out.

### What did you see instead?

It keeps the underlying TCP connection open.
Repository: rust
Issue: Make it easier to run build in CI Docker image
Labels: C-enhancement,T-bootstrap,T-infra

The `isCiBranch` function now requires either the Azure Pipelines or Github Actions check to pass:

https://github.com/rust-lang/rust/blob/9630dbbc3caca60f2482e6eae8904aa6bda54f93/src/ci/shared.sh#L60-L67

This means that a plain `./src/ci/docker/run.sh $image_name` will no longer work. Setting `TF_BUILD=True` appears to work, as it makes the script think it's running on Azure pipelines. However, discovering this required digging around in several shell scripts, and I'm not totally sure that it does the right thing.

Additionally, the `./src/ci/docker/run.sh` is not very discoverable - I don't think it's mentioned outside of the CI scripts and the README in `./src/ci/docker`.

It would be nice if there was a simple way to do a local build of the compiler in a given Docker image (perhaps a top-level script adjacent to `x.py`). This would simplify debugging PRs where the PR builder tests pass, but the full merge-commit test suite fails.
Repository: PowerToys
Issue: [Fluent UX] Shortcut Guide v2
Labels: Product-Shortcut Guide,Area-Localization,Status-In progress,Area-User Interface,Cost-Large,External Dependency-WinUI 3,UI refresh

PowerToys should do its best to look like a system level integration. Shortcut guide is a great example of where we can be but needs a little bit more polish.

- #792 - Screen preview in shortcut view only shows current display
- #179 - shortcut list update 
- #235 - configurable list
- #853 - adjustments in fade in effect and interaction model

# Current screen
![image](https://user-images.githubusercontent.com/1462282/70358016-3fba7280-182d-11ea-86c4-4b8966e601fe.png)

# Update: Possible Proposed adjustments

Here is one idea we've been working with the shell team with. It would allow for contextual hooks for applications, popular items can be included in, teaching moments for 'popular' and 

![image](https://user-images.githubusercontent.com/1462282/84830990-5d884180-afdf-11ea-8476-aadda968c2ce.png)

![image](https://user-images.githubusercontent.com/1462282/84830955-4b0e0800-afdf-11ea-89fe-37c122a6f8f9.png)

![image](https://user-images.githubusercontent.com/1462282/84830981-58c38d80-afdf-11ea-9957-996901b55e3e.png)

![image](https://user-images.githubusercontent.com/1462282/84830968-52cdac80-afdf-11ea-910b-a49bc72632d0.png)

**In context of full screen:**
![contextualForPowershell](https://user-images.githubusercontent.com/1462282/84831023-6ed14e00-afdf-11ea-9693-924bea35e3eb.png)
Repository: go
Issue: cmd/go, net, runtime: TestScript flake with "Failed to find getsockname procedure in ws2_32.dll: The specified procedure could not be found." 
Labels: NeedsInvestigation,compiler/runtime

Just seen at https://storage.googleapis.com/go-build-log/40de7642/windows-amd64-2016_533e366a.log, there is a panic `Failed to find getsockname procedure in ws2_32.dll: The specified procedure could not be found.`

Perhaps this is just a flake but failing to find getsockname in the Windows Socket DLL looks serious. Kindly paging some related/interested parties @bcmills @alexbrainman @bradfitz @randall77
Repository: rust
Issue: Supertrait method visible in generic but not non-generic code 
Labels: A-trait-system,A-associated-items,T-lang,C-discussion,T-types

Suppose you `use` a trait but not its supertrait, then try to call a method from the supertrait using dot syntax.  This works if the receiver is a generic parameter bounded on the child trait, but not if it's a concrete type that implements the child trait.

Example [(playground link)](https://play.rust-lang.org/?gist=ee809f4bdeec5c6cf7b1751ee1642193&version=stable&mode=debug&edition=2015):
```rust
mod private {
    pub trait Super {
        fn foo(self);
    }
    pub trait Child: Super {}

    impl Super for u32 {
        fn foo(self) {}
    }
    impl Child for u32 {}
}

use private::Child;

fn huh<T: Child>(x: T) {
    x.foo(); // OK
}

fn hah(x: u32) {
    huh(x); // OK
    x.foo(); // error: no method named `foo` found
             // for type `u32` in the current scope
}
```

This might be intended behavior, but in a quick search I didn't find any documentation of it, and it seems very strange.
Repository: godot
Issue: Assigned type (Class) doesn't match the function argument's type (Class)
Labels: bug,topic:gdscript,confirmed

Godot 3.2 beta2

I am getting a strange error with typed GDScript, where it finds incompatibility between argument type and parameter type... while they are actually the same.
```
SCRIPT ERROR: GDScript::reload: Parse Error: At "update_episode_data_from_file()" call, argument 1. Assigned type (Project) doesn't match the function argument's type (Project).
          At: res://main.gd:294
```

I have a `script_data.gd` file with a `Project` class inside.

I also have a `script_parser.gd` file which const-imports the previous one, in order to define the following function:
```gdscript
const ScriptData = preload("./script_data.gd")
   ...
static func update_episode_data_from_file(project: ScriptData.Project, path: String) -> Array:
   ...
```

 Then I const-imported both scripts inside `main.gd`, in which I have the following:
```gdscript
const ScriptData = preload("./script_data.gd")
const ScriptParser = preload("./script_parser.gd")
    ...
var _project : ScriptData.Project = null
    ...
func _open_project(fpath: String):
    ...
	var dir := fpath.get_base_dir()
	for ep_file_rpath in data.episode_files:
		var path := dir.plus_file(ep_file_rpath) as String
		ScriptParser.update_episode_data_from_file(_project, path)
```

This code works fine, but recently I've been getting this typing error in the editor, and it obscures any error happening elsewhere after this  line...
So far the only thing that fixes it is to close the editor and reopen it. Then a few hours later, it reappeared again.
I tried to repro in a simpler project, but could not find a pattern yet...
Repository: TypeScript
Issue: Symbols in const assertions should be considered unique
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  3.8.0-dev.20191205

**Search Terms:**
- const assertion unique symbol
- "unique symbol" "as const"

**Code**

```ts
const prop = Symbol()
const dictionary = {
  prop: Symbol()
}
const sealedDictionary = {
  prop: Symbol()
} as const

class MyClass {
  // Works because "prop" is a unique symbol
  [prop]: 1

  // Does not work because "dictionary.prop" is not a unique symbol
  [dictionary.prop]: 2

  // Does not work because "sealedDictionary.prop" is not a unique symbol,
  // even though it probably should be?
  [sealedDictionary.prop]: 3
}
```

**Expected behavior:**

`MyClass` should probably accept `sealedDictionary.prop` as a computed property name since it should be considered a unique symbol.

**Actual behavior:**

TypeScript complains with TS1166:

> A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.

**Playground Link:** ~[Provided](https://www.typescriptlang.org/play/?target=99&ts=3.8.0-dev.20191205#code/MYewdgzgLgBADgJxHGBeGBlAngWwEYgA2AFAJQCwAUKJLACYCWwUD4AhglmjAN5UzwkcAFyZcBEhUoBfKjWgwIAUzaEldACJMW7Ttz6UBiZKOz4iZKtJhsIMeVCpzCtuwFksAYRcQ7BgQD0ATAA6iAIANZ2eErAbACuyjAARMZwyTAMdmww8WAMAI7xSoriRPwwANppALqiAIxOhjBBMBogSnZgILAA7uERMDFxiSXJjMysYBxYAHRpGVkw3bA5eYXFpeaEFZUTOtOc80J1MABMTYHB7Z3LPTD9kUOxCUnJyqrqWpO6cwuZXXua3yRRKEDKhAANBVWkoAG5KMAwKAACxA8QA5ijMrBjHg2HhCFwIGj4oQ6M8APy7D5qTTaKYzY7IU4AZisQA)~ [Updated](https://www.typescriptlang.org/play?ts=3.8.2#code/MYewdgzgLgBADgJxHGBeGBlAngWwEYgA2AFAJQCwAUKJLACYCWwUD4AhglmjAN5UzwkcAFyZcBEhUoBfKjWgwIAUzaEldACJMW7Ttz6UBiZKOz4iZKtJhsIMeVCpzCtuwFksAYRcQ7BgQD0ATAA6iAIANZ2eErAbACuyjAARMZwyTAMdmww8WAMAI7xSoriRPwwANppALqiAIxOhjBBMBogSnZgILAA7uERMDFxiSXJjMysYBxYAHRpGVkw3bA5eYXFpeaEFZUTOtOc80J1MABMTYHB7Z3LPTD9kUOxCUnJyqrqWpO6cwuZXXua3yRRKEDKhAANBVWkoAG5KMAwKAACxA8QA5ijMrBjHg2HhCFwIGj4oQ6M8APy7D5qTTaKYzY7IU4AZisQA) (old link seems to be broken in new playground)

**Related Issues:** —
Repository: godot
Issue: Classes are inconsistently highlighted
Labels: bug,topic:gdscript,topic:editor,confirmed

Godot 3.2 beta 2

Given the following code:
```gdscript
class A:
	var a

static func test():
	var ep : A = null
	ep = A.new() as A
```
Highlighting is inconsistent:
![image](https://user-images.githubusercontent.com/1311555/70366472-77f29d00-188f-11ea-82c6-89c7e448f713.png)

Here on more involved code:
![image](https://user-images.githubusercontent.com/1311555/70366484-8c369a00-188f-11ea-9e79-fde2241708e7.png)
Repository: pytorch
Issue: How to set not to build libtorch_cpu.so and libmkl_*.so dependencies?
Labels: module: build,triaged,module: mkl

```       linux-vdso.so.1 (0x00007fffa4bfc000)
        libtorch_cpu.so => /home/xxxxx/workfiles/work/pytorch/torch/lib/./libtorch_cpu.so (0x00007f63d4f6c000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f63d4d52000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f63d4b3c000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f63d4938000)
        libmkl_intel_lp64.so => /lib/libmkl_intel_lp64.so (0x00007f63d3e06000)
        libmkl_gnu_thread.so => /lib/libmkl_gnu_thread.so (0x00007f63d25cd000)
        libmkl_core.so => /lib/libmkl_core.so (0x00007f63ce494000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f63ce275000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f63cdf73000)
        libc10.so => /home/xxxxx/workfiles/work/pytorch/torch/lib/./libc10.so (0x00007f63cdd31000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f63cd9ae000)
        libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f63cd788000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f63cd3dc000)
        /lib64/ld-linux-x86-64.so.2 (0x000055795895f000)
```
Repository: vue
Issue: When v-show render instruction is passed a reference object, the instruction will not work
Labels: discussion,has workaround

### Version
2.6.10

### Reproduction link
[https://codepen.io/SamirGuo/pen/vYBezXz](https://codepen.io/SamirGuo/pen/vYBezXz)







### Steps to reproduce
```html
<div id="app">
<template>
  <div>
    <button @click="visible = !visible">显示/隐藏</button>
    <my-component :visible="visible" style="border-bottom: solid 1px #ccc" />
  </div>
</template>
</div>
```
```js
const directive = {
    name: 'show',
    value: true
};

Vue.component('MyComponent', {
    props: {
        mystyle: '',
        visible: true
    },
    render(h) {
        directive.value = this.visible;
        return h('div', {
            // do not work!
            directives: [directive],
            // work well!
            // directives: [{
            //     name: 'show',
            //     value: this.visible
            // }],
            domProps: {
                innerText: 'sssssss'
            },
            style: this.mystyle
        });
    }
});


var Main = {
    data() {
      return { 
        visible: true
      };
    }
  };
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
```
### What is expected?

v-show to be applied

### What is actually happening?

v-show isn't applied

---
When the instruction update logic assigns oldValue, oldVnode.data.directives ["show"] and vnode.data.directives ["show"] are actually the same object.
So dir.oldValue = oldDir.value is actually equivalent to dir.oldValue = dir.value; in the later update event, dir.oldValue === dir.value

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: PowerToys
Issue: Help make it easier for users to choose apps that start automatically
Labels: Idea-New PowerToy

I noticed this tweet https://twitter.com/MicrosoftHelps/status/1203086731815407617 and thought that sounds okay for technical people but too hard for a lot of users. They also provide a link to https://support.microsoft.com/en-us/help/4026268/windows-10-change-startup-apps which seems slightly different. Maybe this is something the Windows 10 team will improve but it also seems like a a good thing for a Power Toy.