sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: TracedModules don't support parameter sharing between modules
Labels: oncall: jit

I have a multihead module with 2 heads that share parameters during training. I want to use the JIT compiler to increase the performance only during the inference when only 1 head is used. When I create a jit compiled module, JIT code looks at all of the parameters, even those that will never be used in the 2nd head and raises the exception above. Instead of the exception, please create a warning here:

 File "anaconda2/lib/python2.7/site-packages/torch/jit/__init__.py", line 643, in check_unique
    raise ValueError("TracedModules don't support parameter sharing between modules")
Repository: go
Issue: cmd/objdump: x86 disassembler does not recognize PDEPQ
Labels: help wanted,NeedsFix,compiler/runtime

### What version of Go are you using (`go version`)?

```
go version go1.10.2 darwin/amd64
```

### Does this issue reproduce with the latest release?

Yes, confirmed on 1.9.2 and 1.10.2. Not tested on master.

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/michaelmcloughlin/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/michaelmcloughlin/gocode"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/p5/84p384bs42v7pbgfx0db9gq80000gn/T/go-build505202882=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

### What did you do?

Compiled package with assembly code using `PDEPQ`. Viewed resulting assembly with `go tool objdump`.

Gist https://gist.github.com/mmcloughlin/b5bf1bcc7f31222ff2bc510f2777cd79 is a minimal example. 

### What did you expect to see?

Expect `go tool objdump` to show the `PDEPQ` instruction.

### What did you see instead?

Output from `objdump.sh` script is as follows. The `objdump` tool does not recognize `PDEPQ`, and instead parses it as a sequence of instructions. Note that Apple's LLVM objdump correctly identifies the instruction.

```
+ go version
go version go1.10.2 darwin/amd64
+ go test -c
+ go tool objdump -s bmi.PDep bmi.test
TEXT github.com/mmcloughlin/bmi.PDep(SB) /Users/michaelmcloughlin/gocode/src/github.com/mmcloughlin/bmi/pdep.s
  pdep.s:7		0x10e7860		4c8b442408		MOVQ 0x8(SP), R8
  pdep.s:8		0x10e7865		4c8b4c2410		MOVQ 0x10(SP), R9
  pdep.s:10		0x10e786a		c442b3f5		CMC
  pdep.s:10		0x10e786e		d04c8954		RORB $0x1, 0x54(CX)(CX*4)
  pdep.s:12		0x10e7872		2418			ANDL $0x18, AL
  pdep.s:13		0x10e7874		c3			RET
  :-1			0x10e7875		cc			INT $0x3
  :-1			0x10e7876		cc			INT $0x3
  :-1			0x10e7877		cc			INT $0x3
  :-1			0x10e7878		cc			INT $0x3
  :-1			0x10e7879		cc			INT $0x3
  :-1			0x10e787a		cc			INT $0x3
  :-1			0x10e787b		cc			INT $0x3
  :-1			0x10e787c		cc			INT $0x3
  :-1			0x10e787d		cc			INT $0x3
  :-1			0x10e787e		cc			INT $0x3
  :-1			0x10e787f		cc			INT $0x3
+ objdump -disassemble-all bmi.test
+ grep -A 4 bmi.PDep:
github.com/mmcloughlin/bmi.PDep:
 10e7860:	4c 8b 44 24 08 	movq	8(%rsp), %r8
 10e7865:	4c 8b 4c 24 10 	movq	16(%rsp), %r9
 10e786a:	c4 42 b3 f5 d0 	pdepq	%r8, %r9, %r10
 10e786f:	4c 89 54 24 18 	movq	%r10, 24(%rsp)
```
Repository: vue
Issue: Transition using js hooks always run the initial render
Labels: transition

### Version
2.5.16

### Reproduction link
[https://jsfiddle.net/p1dthw6z/](https://jsfiddle.net/p1dthw6z/)

### Steps to reproduce
In the demo link, toggle checkbox 'odd'.

### What is expected?
When rows appeared, both inner element transition using CSS (fade) and transition using hooks (slide) should not do initial render.

### What is actually happening?
Transition using CSS do not run the initial render, as expected.
But the transition using hooks run the initial render, as if I have used `<transition appear>`, which I didn't.

---
I don't know if it is the intended behavior. If it is, I would like to know how to avoid the initial render in the hooked transition.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: vscode
Issue: Cannot exclude root folders while searching
Labels: help wanted,feature-request,search

Testing #50498

- In a MR workspace, try to exclude root folder using **/folder1/** and search. Results are still shown in folder1.

This happens irrespective of setting `search.enableSearchProviders" `

![image](https://user-images.githubusercontent.com/10746682/40652451-8f56d79e-6338-11e8-8994-58f40d5ab239.png)
Repository: opencv
Issue: RTSP streams freeze at version 3.1+ but not at 3.0
Labels: priority: low,category: videoio,incomplete

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.1+ including 3.4.1
- Operating System / Platform => Windows .Net C# x86
- Compiler => Visual Studio 2017

##### Detailed description

Using an RTSP camera such as "AimCam", the stream freezes after 10 seconds. It does not freeze when using EMGU 3.0.  It does not freeze when run through VLC utility either

##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
// cpp code
    ```
 or attach as .txt or .zip file
-->

 ```.cs
              _capture = new VideoCapture("rtsp://192.168.1.254/12345678.mov");
                _capture.ImageGrabbed += processFrame;
                _capture.Start();
…
// processFrame
            _capture.Retrieve(_frame);
             _frameBmp?.Dispose();
                _frameBmp = _frame.Bitmap;

    ```
Repository: rust
Issue: when suggesting to remove a crate, we leave a blank line
Labels: C-enhancement,A-diagnostics,T-compiler,E-help-wanted,WG-epoch

As of https://github.com/rust-lang/rust/pull/51015, the rustfix result for:

```rust
#![warn(unused_crates)]
extern crate foo;
fn main() { }
```

is 

```rust
#![warn(unused_crates)]

fn main() { }
```

but not

```rust
#![warn(unused_crates)]
fn main() { }
```
Repository: rust
Issue: unused macros fails some obvious cases due to prelude
Labels: C-enhancement,T-compiler,WG-epoch

This example does not warn, even in Rust 2018 edition:

```rust
// compile-flags: --edition 2018
extern crate foo; 
fn main() { foo::bar(); }
```

The reason is that we resolve `foo` against the extern crate, when in fact it could *also* be resolved by the extern prelude fallback. But that's tricky! Something like this could also happen:

```rust
// compile-flags: --edition 2018
mod bar { mod foo { } }
use bar::*; // `foo` here is shadowed by `foo` below
extern crate foo; 
fn main() { foo::bar(); }
```

In which case, removing `foo` would result in importing the module, since (I believe) that would shadow the implicit prelude imports.

Therefore: we can do better here, but with caution -- for example, we could suggest removing an extern crate in a scenario like this, but only if there are no glob imports in the current module. Not sure it's worth it though.
Repository: vscode
Issue: QuickPick API is no longer type safe
Labels: api,debt

Testing #50574:

I've added `canPickMany: true` to my `vscode.QuickPickOptions` and now I'm receiving an array through a parameter that does not include the array type:

Debugger hover shows:
![2018-05-29_18-25-06](https://user-images.githubusercontent.com/1898161/40671948-a788bbc2-636d-11e8-9a36-3a11d8ded731.png)
 
but Intellisense does not offer the array type:
![2018-05-29_18-19-39](https://user-images.githubusercontent.com/1898161/40671780-202a0744-636d-11e8-8f81-853e1c8a0561.png)
Repository: rust
Issue: libcore: add defaults for empty iterators
Labels: T-libs-api,C-feature-request,A-iterators

I'm looking for a way to create empty iterators.

I have a few places in my application where I keep an iterator around as part of a data structure, and will advance that from time to time. After a few rounds, I will reset the iterator to start from the beginning again. (The iterator is supposed to point into the data structure, so [I got some problems](https://users.rust-lang.org/t/struct-containing-reference-to-own-field/1894/2) with implementing that design even though the data is never dropped, but let's ignore that here).
To initialise my structure, I want to create an empty iterator, i.e. one that has no elements left and will only yield `None`.
```rs
pub struct X;
pub struct Example {
   iterator: Once<X>
}
impl Example {
  pub fn reset(&mut self) {
    self.iterator = once(X);
  }
}

let mut e = Example {
  iterator: ??? // how to create a consumed Once?
};
e.iterator.next(); // should yield None
e.reset();
e.iterator.next(); // will yield Option(X)
e.iterator.next(); // will yield None
```
In this particular case, I can use `option::IntoIter` directly instead of `Once` and write
```rs
pub struct Example {
   iterator: option::IntoIter<X>
}
impl Example {
  pub fn reset(&mut self) {
    self.iterator = Some(X).into_iter();
  }
}
let mut e = Example {
  iterator: None.into_iter()
};
```
but that doesn't express my intent as well as using `Once`. Also, given that in my actual code the iterator type is generic, I would need an additional method `get_init` next to `get_reset` in my trait. I'd rather have my trait say that the iterator type needs to implement `Default`, and the default value should be an instance of the iterator that doesn't yield anything.

My suggestion: **Have all builtin iterators implement `Default`**.

For example,
```rs
impl<A> Default for Item<A> {
  #[inline]
  fn default() -> Item<A> { Item { opt: None } }
}
impl<A> Default for Iter<A> {
  fn default() -> Iter<A> { Iter { inner: default() } }
}
impl<A> Default for IterMut<A> {
  fn default() -> IterMut<A> { IterMut { inner: default() } }
}
impl<A> Default for IntoIter<A> {
  fn default() -> IntoIter<A> { IntoIter { inner: default() } }
}
impl<T> Default for Once<T> {
  fn default() -> Once<T> { Once { inner: default() } }
}
// (not sure whether all of these could simply be derived)
```
Does this need to go through the RFC process? Should I simply create a pull request?
Repository: angular
Issue: Formbuilder group from value object with array
Labels: type: bug/fix,effort3: weeks,freq1: low,area: forms,state: confirmed,design complexity: major,P4

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
<pre><code>
    this.myObject = {myobject: [{id: 'test1'}, {id: 'test2'}]};
    this.myFormGroup = this.fb.group(this.myObject);
</code></pre>
RESULT
<pre><code>
    myFormGroup.value : { "myobject": { "id": "test1" } } 
</code></pre>

## Expected behavior
<pre><code>
myFormGroup.value : {myobject: [{id: 'test1'}, {id: 'test2'}]}
</code></pre>


## Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-fromgroup-with-array

## What is the motivation / use case for changing the behavior?
It seems to be a bug, FormGroup build FormControl tree without considering if it's an array or object

It'is ok with a FormArray

## Environment

<pre><code>
Angular version: 5.0.0
Angular version: 6.0.2
Repository: terminal
Issue: colortool.exe does not exit after executing
Labels: Product-Colortool,Help Wanted,Area-Interaction,Issue-Bug

This bug-tracker is monitored by Windows Console development team and other technical types.  **We like detail!**

If you have a feature request, please post to [the UserVoice](https://wpdev.uservoice.com/forums/266908).  

> **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible

* Your Windows build number:  (Type `ver` at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17134.48]

* What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

I'm trying to use the color tool to change the color scheme. Whenever I execute it within cmd.exe, it does not exit. Also the effects (even with `--both`) don't seem to persist when I close the hung window and open a new one.

* What's wrong / what should be happening instead:

1. Color tool does not exit and freezes cmd

To repro:

```
cd Downloads
colortool.exe --both OneHalfDark
```

Please see attached screenshot:

![screen shot 2018-05-29 at 2 02 53 pm](https://user-images.githubusercontent.com/2791268/40685436-1f702bc2-6349-11e8-8307-44258566e899.png)
Repository: opencv
Issue: Cuda 9.1 NVCUVID not working with opencv test program but works with nvidia test source code.
Labels: priority: low,category: build/install,category: gpu/cuda (contrib)

##### System information (version)
- OpenCV => 3.4     (checkout from git)
- Operating System / Platform => Linux Ubuntu 16.04 64 Bit
- Compiler => gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

##### Detailed description

When using cuda9.1, opencv's own test program does not work:
./example_gpu_video_reader plush1_720p_10s.m2v
It creates with a segfault.
cuda-sample test program works (it includes source code):
cuda-9.1/samples/3_Imaging/cudaDecodeGL/cudaDecodeGL

So, I conclude from this that the cuda drivers are installed correctly and that they work.
There must be something wrong with the opencv software, maybe using the cuda API wrongly.
Both the above test programs are supposed to utilize
libnvcuvid.so.390.30
 
<!-- your description -->

##### Steps to reproduce
./example_gpu_video_reader plush1_720p_10s.m2v
.... -> segfault.
The "plush1_720p_10s.m2v" is part of cuda-samples, supplied by Nvidia.

This used to work with cuda8.
The cuda supplied source code that tests the NVCUVID api works fine.
Repository: go
Issue: cmd/compile: confusing internal error when importing different packages with same name from different paths
Labels: NeedsFix,compiler/runtime

This is a follow-up on #25568: It is possible to get an internal compiler error when invoking the compiler with plausible but incorrect `-I` arguments leading to selection of different but identically named packages ("io" in this case). To reproduce:

1) `cd $GOROOT/test`
2) `go tool compile fixedbugs/bug345.dir/io.go`
2) `go tool compile -I . fixedbugs/bug345.dir/main.go`
=>
```
fixedbugs/bug345.dir/main.go:10:2: internal compiler error: conflicting package heights 4 and 0 for path "io"
```
The issue here is an incorrect argument for `-I`. The following invocation:

`go tool compile -I $HOME/test/fixedbugs/bug345.dir fixedbugs/bug345.dir/main.go`

works as expected.

The internal error is confusing. We should be able to provide a better error message.
Repository: flutter
Issue: Instrument code to give visual cue to developers when their native code is taking too long
Labels: engine,c: performance,c: proposal,P3,team-engine,triaged-engine

Following a discussion with peers I noticed that a pain point and source of misunderstanding around Method Channels running on main native thread.

Following a suggestion from @dnfield, it would be nice if method channels had a way to know if they're taking too long and freezing the UI. That would benefit people coming from different backgrounds that are not aware that method channels use the native UI thread and that's very bad for long operations.

I think the ideal case would have the method channel time the elapsed time in case the response happens in the main thread, or something along these lines. Feedback could flash the screen or something clearer / more obvious like a banner.

My low-hanging-fruit approach would be for debug builds to hook into Strict Mode api and set up some defaults for immediate results 

```dart
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                 .detectDiskReads()
                 .detectDiskWrites()
                 .detectNetwork() 
                 .penaltyLog()
                 // .penaltyDialog()
                 .penaltyFlashScreen()
                 .build());
```
https://developer.android.com/reference/android/os/StrictMode
Repository: rust
Issue: Command's Debug impl has incorrect shell escaping
Labels: C-bug,T-libs,A-fmt

On Unix, the Debug impl for Command prints the command using quotes around each argument, e.g.

    "ls" "-la" "\"foo \""

The use of spaces as a delimiter suggests that the output is suitable to be passed to a shell.  While it's debatable whether users should be depending on any specific debug representation, in practice, at least rustc itself uses it for user-facing output (when passing `-Z print-link-args`).

There are two problems with this:

1. It's insecure!  The quoting is performed, via the `Debug` impl for `CStr`, by `ascii::escape_default`, whose escaping rules are

   > chosen with a bias toward producing literals that are legal in a variety of languages, including C++11 and similar C-family languages.

   However, this does not include escaping the characters $, \`, and !, which have a special meaning within double quotes in Unix shell syntax.  So, for example:
   ```rust
   let mut cmd = Command::new("foo");
   cmd.arg("`echo 123`");
   println!("{:?}", cmd);
   ```
   prints
   ```
   "foo" "`echo 123`"
   ```
   but if you run that in a shell, it won't produce the same behavior as the original command.

2. It's noisy.  In a long command line like those produced by `-Z print-link-args`, most arguments don't contain any characters that need to be quoted or escaped, and the output is long enough without unnecessary quotes.

Cargo uses the `shell-escape` crate for this purpose; perhaps that code can be copied into libstd.
Repository: pytorch
Issue: Better error message in DataChannelTCP::_receive
Labels: triaged,module: backend

## Issue description

The following code will produce an error from the TCP distributed backend:

```python
import os
import torch
import torch.distributed as dist
import sys

os.environ['MASTER_ADDR'] = '127.0.0.1'
os.environ['MASTER_PORT'] = '29500'
dist.init_process_group('tcp', rank=int(sys.argv[1]), world_size=2)


if dist.get_rank() == 0:
	t = torch.arange(9)
	dist.send(tensor=t, dst=1)
else:
	t = torch.zeros(9)
	dist.recv(tensor=t, src=0)
```

Error:

```
Traceback (most recent call last):
  File "/Users/shendrickson/pytorch_dist.py", line 19, in <module>
    dist.recv(tensor=t, src=0)
  File "/Users/shendrickson/anaconda2/envs/torchdev/lib/python3.6/site-packages/torch/distributed/__init__.py", line 230, in recv
    return torch._C._dist_recv(tensor, src)
RuntimeError: Tensor sizes do not match
```

This is a bit misleading, since the sizes of the tensors are the same but the types are different. I think it would be better to give a message along the lines of:

```
RuntimeError: Expected to receive 72 bytes, but got 36 bytes instead. Are tensors of same size and type?
```

I'd be happy to submit a PR for this if others agree that the original message should be changed.
Repository: pytorch
Issue: [Caffe2]How to convert Caffe's mean file to Caffe2's ?
Labels: caffe2

I have tried to use Caffe's mean file directly in Caffe2, but it complains the mean file doesn't contain qtensor fields.
Is there any way to translate Caffe's mean file to Caffe2's?
Thansk.
Repository: pytorch
Issue: how to use Softmax when do segmentation
Labels: caffe2

I want  implement FCN by caffe2 to do semantic segmentation,  but I do not konw how to implement Softmax as FCN in caffe version.
Could you help me, Thanks!
the code of FCN's softmax using caffe is as follows:
```
layer {
  name: "upscore"
  type: "Deconvolution"
  bottom: "score_fr"
  top: "upscore"
  param {
    lr_mult: 0
  }
  convolution_param {
    num_output: 21
    bias_term: false
    kernel_size: 64
    stride: 32
  }
}
layer {
  name: "score"
  type: "Crop"
  bottom: "upscore"
  bottom: "data"
  top: "score"
  crop_param {
    axis: 2
    offset: 19
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "score"
  bottom: "label"
  top: "loss"
  loss_param {
    ignore_label: 255
    normalize: false
  }
}
```
Repository: rust
Issue: assert_eq!(a,b) fails to compile for slices while assert!(a == b) works fine
Labels: C-enhancement,T-libs-api

Example ([playground](https://play.rust-lang.org/?gist=1515ab97f5153b600fe3542b50aba925&version=stable&mode=debug)):

```rust
pub fn foo(xs: &[u32], k: u32) -> (&[u32], u32) { (xs, 0) }
fn main() {
    assert!(foo(&[], 10) == (&[], 0));  // OK
    assert_eq!(foo(&[], 10), (&[], 0));  // FAILS
}
````
Repository: opencv
Issue: VideoCapture can't read some png files
Labels: category: videoio,incomplete

##### System information (version)
- OpenCV => 4.0.0-dev (todays)
- Operating System / Platform => Windows 64 Bit
- Compiler => mingw64

opencv_ffmpeg400_64.dll has 2018-03-01 timestamp

##### Detailed description

the dnn samples make heavy use of loading images through the videocapture, but trying with

http://answers.opencv.org/upfiles/15276026856434307.png  or the humble
http://answers.opencv.org/m/opencv/media/images/logo.png?v=6 it fails to open.

<strike>renaming an older opencv_ffmpeg341_64.dll to opencv_ffmpeg400_64 made it work nicely, so there seems to be some regression here.</strike>


##### Steps to reproduce:

    VideoCapture cap("logo.png"); 
    cout << cap.isOpened() << endl;
Repository: gin
Issue: Question: How to write request log and error log in a separate manner.
Labels: question

I could write everything into a file with #805 post.
Related to this, how could it be possible to write error into a separate log?

--
I assume to use gin.DefaultErrorWriter, but it seems that log.SetOuput is only possible with a single file.

Current output (everything into a single file)
```
[GIN] 2018/05/30 - 19:21:17 | 404 |     114.656µs |             ::1 |  GET     /comment/view/99999
Error #01: th size of input parameter is not 40
[GIN] 2018/05/30 - 19:21:20 | 200 |     1.82468ms |             ::1 |  GET     /comment/view/00001

```

Current code
```
logfile, err := os.OpenFile(c.GinLogPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
    log.Fatalln("Failed to create request log file:", err)                                 
}

errlogfile, err := os.OpenFile(c.GinErrorLogPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
    log.Fatalln("Failed to create request log file:", err)
}

// set request logging
gin.DefaultWriter = io.MultiWriter(logfile)
gin.DefaultErrorWriter = io.MultiWriter(errlogfile)
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
log.SetOutput(gin.DefaultWriter)
```