sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [feature request] Support for 0-length sequences in packed_sequences
Labels: module: nn,module: rnn,triaged

Hello,

Currently, calling `pack_padded_sequence` with some length of size zero raises the error:
```
ValueError: Length of all samples has to be greater than 0, but found an element in 'lengths' that is <= 0
```

I believe it would be useful to support sequences of length zero for the following case. Working with variable lengths sequences, and implementing truncated backpropagation through time, I split my sequences in chunks along the time axis. In the last chunks some of the shortest sequences happened to be completely padded (hence of length zero).

Of course there are workarounds but I believe supporting it would reduce the amount of code to write.

Thank you

cc @albanD @mruberry @jbschlosser @zou3519
Repository: go
Issue: go/format: add benchmarks
Labels: Performance,NeedsInvestigation

I maintain a (fork of a) [tool called `go-bindata`](https://github.com/kevinburke/go-bindata) that compiles static files into a binary. Often the compiled file is quite large - tens of megabytes are not uncommon. I call `format.Source` on this generated file to avoid gofmt thrash. However, I noticed recently that calling `format.Source` takes 60% of the runtime of the go-bindata program.

Currently there are no benchmarks for `format.Source`. It might be good to add some to see if there are quick wins to get that function to return more quickly. 

A starting point may be the benchmark here: https://github.com/kevinburke/go-bindata/blob/master/benchmark_test.go. Committing an extremely large file to source might not be the best way to do this, though.
Repository: godot
Issue: InputEventMouseMotion is generated after each mouse button release
Labels: bug,platform:windows,confirmed,topic:input

Godot 3.0.5
Windows 10 64 bits

Repro:

1) Create a new scene and add a single Node in it
2) Put this script on it:

```gdscript
extends Node

func _input(event):
	if event is InputEventMouseMotion:
		print(event, " motion ", event.relative)
	if event is InputEventMouseButton:
		print(event, " button ", event.pressed)
```

3) Run the scene, place your mouse above the game, and click several times without moving the mouse: 
when you release a mouse button, it is always followed by a motion event, even if the mouse didn't move.
```
[InputEventMouseButton:982] button True
[InputEventMouseButton:985] button False
[InputEventMouseMotion:988] motion (0, 0)
[InputEventMouseButton:991] button True
[InputEventMouseButton:994] button False
[InputEventMouseMotion:997] motion (0, 0)
```
Repository: go
Issue: cmd/compile: optimise away deferred calls to empty functions
Labels: Performance,help wanted,NeedsFix

### What version of Go are you using (`go version`)?
### Does this issue reproduce with the latest release?
    go version devel +48c7973 Fri Jul 20 20:08:15 2018 +0000 linux/amd64

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ainar/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ainar/go"
GOPROXY=""
GORACE=""
GOROOT="/home/ainar/go/gotip"
GOTMPDIR=""
GOTOOLDIR="/home/ainar/go/gotip/pkg/tool/linux_amd64"
GCCGO="gccgo"
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-build664294769=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?
https://play.golang.org/p/TbjFF3fe8Wu

    $ go run -gcflags '-S' assertopt.go

### What did you expect to see?
Lines 12, 13, and 14 skipped by the compiler.

### What did you see instead?
Line 12 is skipped, but defers on 13 and 14 are still there. The Go compiler leaves those in, despite the fact that they are NOOPs.

This makes it hard to create assertions (in this case, postconditions) that don't hurt the performance of production builds using build tags.
Repository: pytorch
Issue: [Build error] libcudnn.so: error adding symbols: File in wrong format
Labels: caffe2

## Issue description

When I build Caffe2 from source on my Jetson TX1, there are errors like this:

[ 93%] Linking CXX shared library ../lib/libcaffe2_gpu.so
/usr/local/cuda/lib64/libcudnn.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
caffe2/CMakeFiles/caffe2_gpu.dir/build.make:2913: recipe for target 'lib/libcaffe2_gpu.so' failed
make[2]: *** [lib/libcaffe2_gpu.so] Error 1
CMakeFiles/Makefile2:1399: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

How can I solve the problem? Thank you!


## System Info

- CUDA :8.0
- cuDNN: 6.0
- Ubuntu:  16.04
Repository: pytorch
Issue: [request] speed-up multidim slicing backward
Labels: todo,module: performance,module: autograd,triaged

The current way of apply slicing (indexing) isn't very efficient ([here](https://github.com/pytorch/pytorch/blob/7160846c81d9ebd298a4c1608d67b8f4bd76fee7/torch/csrc/autograd/python_variable_indexing.cpp#L151-L199)). Each slicing at each dim is applied as a separate autograd op, making the backward extremely inefficient:
```py
>>> x = torch.randn(3,3,requires_grad=True)
>>> y = x[0, 1]
>>> y.grad_fn
<SelectBackward object at 0x7fbca03e0668>
>>> y.grad_fn.next_functions  # two <SelectBackward>s
((<SelectBackward object at 0x7fbca03e0550>, 0),)
>>> y.grad_fn.next_functions[0][0].next_functions
((<AccumulateGrad object at 0x7fbca03e0668>, 0),)
```
The backward of this would be:
```
   gy      = [1]
=> g(x[0]) = [0, 1, 0]
=> g(x)    = [[0, 1, 0], [0, 0, 0], [0, 0, 0]]
```
, incurring extra copying and malloc'ing. This will be especially slow with large tensors.

Potential solutions: 
1. Use `as_strided` in `applySlicing`.
  pros: fits the current structure easily.
  cons: the backward isn't well optimized for slicing (but it's not terrible either if input is not expanded...). I'll think about ways to speed this up when updating https://github.com/pytorch/pytorch/pull/8965 .
2. Move multidim slicing to ATen.
  pros: benefit cpp API
  cons: need ways to represent `3..5` and `...`.

cc @ezyang @SsnL @albanD @colesbury
Repository: pytorch
Issue: A newer protobuf should be used, so that cmake install will work when building for mobile
Labels: caffe2

## Issue description

As Yangqing noted in https://github.com/pytorch/pytorch/blob/master/cmake/ProtoBuf.cmake#L77, we should eliminate `EXCLUDE_FROM_ALL` after https://github.com/google/protobuf/pull/3878 merges. I have a corresponding PR(https://github.com/pytorch/pytorch/pull/7085) but the updating of protobuf breaks iOS build. I think we need to find a proper protobuf version and enable cmake install for Android and iOS.
Repository: node
Issue: Processes created using spawn with a pipe have no /dev/stdin
Labels: child_process

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you are able.
-->

* **Version**: v8.9.4
* **Platform**: Linux 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
* **Subsystem**: child_process

<!-- Enter your issue details below this comment. -->

The code below fails with `cat: /dev/stdin: No such device or address`.

```js
const {spawn} = require('child_process');
const proc = spawn('cat', ['/dev/stdin'], {stdio: ['pipe', process.stdout, process.stderr]});
```

Apparently Node spawns sub processes in a way that there is no `/dev/stdin` allocated.

I think this is a NodeJS bug - on UNIX, a sub process should be able to open `/dev/stdin` if there is a stdin for it. The following Go program for example works perfectly fine:

```go
func main() {
	cmd := exec.Command("cat", "/dev/stdin")
	cmd.Stderr = os.Stderr
	cmd.Stdout = os.Stdout

	stdin, _ := cmd.StdinPipe()
	go func() {
		stdin.Write([]byte("hello cat!\n"))
		stdin.Close()
	}()

	cmd.Run()
}
```
Repository: opencv
Issue: solvePnP behaves differently on ARM as compared to x86_64
Labels: bug,category: calib3d

##### System information (version)
- OpenCV => 3.4.2
- Operating System / Platform => Ubuntu Xenial 16.04 64bit
- Compiler => g++5.4.0

##### Detailed description
 When running solvePnP function with some parameters it returns some values on x86_64 platform, but when running the same code on ARM, results are completely different.


##### Steps to reproduce

1) Compile a code which will call solvePnP function with arbitrary parameters (CV_EPNP algorithm)
2) Run the code and see the results, x, y, z. 
3) Do the same on the ARM arch with the same version of openCV, OS and compiler. 
4) Results are given below:
Repository: TypeScript
Issue: Services in unopened projects
Labels: Suggestion,In Discussion,Effort: Difficult

Some language services, such as `findAllReferences`, `rename`, `navigateTo`, and `getEditsForFileRename`, as well as refactors like `moveToNewFile` (which wants to update imports from external references), work best when they know about as many files as possible.
Currently we only keep projects open if at least one file is being viewed in the editor.
When we invoke a service that might need to know about unopened projects, we might consider walking up ancestor directories to look for a base `tsconfig.json` that references many projects, and opening those.
Repository: material-ui
Issue: [TextField] Long labels break layout
Labels: docs,component: text field

<!--- Provide a general summary of the issue in the Title above -->
The textfield layout is not responsive when there are long labels.

<!-- Checked checkbox should look like this: [x] -->
- [x] This is a v1.3.1 issue.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Expected Behavior
According to Material Design, long labels should be correctly positioned within the available input space:
![2018-07-23 13 49 06](https://user-images.githubusercontent.com/9648559/43094272-6ce28384-8e80-11e8-808e-6b5628e37aa0.gif)

## Current Behavior
* Two or more line labels are overlapping the underline line.

## Steps to Reproduce
https://codesandbox.io/s/6xjr79vx3w
```
import React from 'react';
import TextField from '@material-ui/core/TextField';

class TextFields extends React.Component {
  render() {
    return (
      <form noValidate autoComplete="off">
        <TextField
          id="name"
          label="This is a long label because things"
        />
      </form>
    );
  }
}

export default TextFields;
```

## Context
* All content is usually content managed, which means that the content editors could enter in label that may break the layout.
* If the enter in a label that is longer than the available space, example: _"Do you have any association with a government entity?"_, and the user is loading the page in an iPhone 5, there is no enough space to render the label in only one line.

## Your Environment
<!--- Include as many relevant details about the environment with which you experienced the bug. -->

| Tech         | Version |
|--------------|---------|
| Material-UI  | v1.3.1 |
| React        | v16.4.1 |
| browser      |  Chrome |
Repository: flutter
Issue: Need primaryLightTextTheme and primaryDarkTextTheme in ThemeData
Labels: c: new feature,framework,f: material design,P2,team-design,triaged-design

I need a reliable way of placing text on primary dark and primary light backgrounds

Primary and accent colors can do this since I can access `primaryTextTheme` and `accentTextTheme` through the `ThemeData`. 

Currently I mimic the code from `ThemeData` `primaryTextTheme` for `primaryColorLight` and `primaryColorDark` and use the `estimateBrightnessForColor`:
```dart
    final Typography typography = Typography(platform: themeData.platform);
    final brightness =
        ThemeData.estimateBrightnessForColor(themeData.primaryColorLight);
    final TextTheme primaryLightTextTheme =
        brightness == Brightness.dark ? typography.white : typography.black;
```

What `ThemeData` needs is
```dart
    primaryColorLightBrightness ??= estimateBrightnessForColor(primaryLightColor);
    final bool primaryLightIsDark = primaryColorLightBrightness == Brightness.dark;
    final TextTheme defaultPrimaryLightTextTheme = primaryLightIsDark ? typography.white : typography.black;
    primaryLightTextTheme = defaultPrimaryLightTextTheme.merge(primaryLightTextTheme);
```
And similar for `primaryDarkTextTheme`

Thanks for all the awesomeness in Flutter!
Repository: go
Issue: cmd/vet: make printf checking more precise when arguments are changed
Labels: help wanted,NeedsInvestigation,Analysis

For #26486 https://golang.org/cl/125039 changed the printf checking to only warn about functions that do not modify the arguments before passing them to `fmt.Printf` (or whatever).  The example in that issue, drawn from real code, is:

```Go
func dbg(s string, va ...interface{}) {
	if s == "" {
		s = strings.Repeat("%v ", len(va))
	}
	_, fn, fl, _ := runtime.Caller(1)
	fmt.Printf("dbg %s:%d: ", path.Base(fn), fl)
	fmt.Printf(s, va...)
	fmt.Println()
}
```

This can be called as `dbg("", err)`.

The fix in CL 125039 means that we no longer issue printf warnings for functions like this:

```Go
func Prefix(s string, args ...interface{}) {
    s = "error: " + s
    fmt.Printf(s, args)
}
```

We should figure out a way to continue issuing warnings for `Prefix` without issuing them for `dbg`.
Repository: flutter
Issue: [text input ]Detect input via the on-screen keyboard
Labels: a: text input,c: new feature,framework,c: proposal,P2,team-framework,triaged-framework

Per the advice, I [asked this on StackOverflow](https://stackoverflow.com/questions/50341089/detecting-software-keyboard-input-using-flutter) some time ago now. I'm yet to receive any reply, so I'm starting to think this is a genuine issue.

In flutter, is it possible to detect keyboard input received via the on-screen keyboard?
Repository: go
Issue: cmd/go: test cached run slower than real test run
Labels: help wanted,ToolSpeed,NeedsInvestigation,GoCommand

### What version of Go are you using (`go version`)?
1.10.3


### Does this issue reproduce with the latest release?
Yes.

### What operating system and processor architecture are you using (`go env`)?
linux; amd64

### What did you do?

go test --count 1 .; time go test .

foo_test.go:
// package and imports snipped
func TestCache(t *testing.T) {
	tmp := os.TempDir()
	for i := 0; i < 10*1000*1000; i++ {
		os.Stat(filepath.Join(tmp, fmt.Sprintf("%d", i)))
	}
}

### What did you expect to see?
$ go test --count 1 .; time go test .
ok  	github.com/dbentley/testcache	11.839s
ok  	github.com/dbentley/testcache	(cached)

real	2s


### What did you see instead?
$ go test --count 1 .; time go test .
ok  	github.com/dbentley/testcache	11.839s
ok  	github.com/dbentley/testcache	(cached)

real	1m2.278s


### Further investigation
Using GODEBUG=gocachetest=1 or GODEBUG=gocachehash=1 doesn't cause output for 30+s.

I think the function inDir (currently at https://github.com/golang/go/blob/master/src/cmd/go/internal/test/test.go#L1450 ) evaluates symlinks, which requires lots of stat'ing.

It looks like this was introduced in https://github.com/golang/go/commit/37d56279c87818b496e5717bddd1f7c43bfa743d
Repository: rust
Issue: Add `--emit=nothing` to tell rustc not to emit any files (even if `--crate-type=lib`)
Labels: A-driver,T-compiler,C-feature-request

In order to only check if a program is well-formed (think `cargo check`), one would like to call `rustc` without emitting any files. `cargo check` uses `--emit=metadata -Z no-codegen` because the metadata is needed to check dependent crates. 

However, it seems like it's impossible to tell the compiler to not write any files in the case of `--crate-type=lib`. For the default `--crate-type=bin` it works: `rustc -Z no-codegen foo.rs` does not emit any files. But again, for `rustc -Z no-codegen --crate-type=lib foo.rs` it emits an `.rlib` file. 

In case this isn't a bug, would it be possible to add an `--emit=nothing` or equivalent option?

<sub>([Related question on StackOverflow](https://stackoverflow.com/questions/51485765/run-rustc-to-check-a-program-without-generating-any-files))</sub>
Repository: pytorch
Issue: dataloader stuck at sched_yield =0
Labels: module: dataloader,triaged

**My docker envs**:
Description:    Debian GNU/Linux 8.9 (jessie)
Pytorch: 0.4.0
cuda: 8.0
python: 3.6.5

After a few epochs of training and validation,  dataloader of  validation suddenly stuck at sched_yield =0. I set dataloader worker = 10. I can see one subprocess use CPU at 100% and other 9 processes just use CPU at 0%. RAM and GPU memory doesn't release. The whole program just hangs up.
__More details__:  My implementation of Dataset just reads image and meta information from multiple lmdb files. I open the lmdb env in Dataset __init__ function, 
```
self.env = lmdb.open(self.pic_set_path, max_readers=1,
                                 readonly=True, lock=False,
                                 readahead=False, meminit=False)
```
and in __getitem__ function, i get information just like this:
```
with self.env.begin(write=False) as txn:
            info = txn.get(image_name)
```

cc @SsnL @VitalyFedyunin @ejguan
Repository: TypeScript
Issue: Feat: Extract function with jsx selection should be replaced with jsx sfc
Labels: Suggestion,Awaiting More Feedback,Domain: Refactorings

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->


<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion
If we select jsx element and do extract refactor, editor should be refactor it in jsx maner


<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Examples

```ts
function Foo({ items }: { items: { id: number; name: string }[] }) {
    return <div>{items.map(item => <div>{item.id}: {item.name}</div>)}</div>;
}
```
After refactor should be

```ts
function Foo({ items }: { items: { id: number; name: string }[] }) {
    return <div>{items.map(item => <Bar id={item.id} name={item.name}/>)}</div>;
}

function Bar(item: { id: number; name: string; }) {
    return <div>{item.id}: {item.name}</div>;
}
```


## Current behavior
![ezgif-5-b8e179a53e](https://user-images.githubusercontent.com/3171573/43130382-05f86d0c-8f50-11e8-8475-978626660794.gif)
<!-- Show how this would be used and what the behavior would be -->
Repository: kubernetes
Issue: Bind mounts in container not updated after volume is remounted again 
Labels: kind/bug,sig/storage,lifecycle/frozen

<!-- This form is for bug reports and feature requests ONLY!

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).

If the matter is security related, please disclose it privately via https://kubernetes.io/security/.
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:

> Uncomment only one, leave it on its own line:
>
/kind bug
> /kind feature

@kubernetes/sig-storage-bugs 

**What happened**:

For fuse-backed volumes, fuse process may exit on error, the volume on the host will disappear. Kubelet will remount the volume later because it will find volume mount point does not exist anymore. But bind mount in container will still be the old one,  processes in container will fail with error: 

```
Transport endpoint is not connected
```

**What you expected to happen**:

- Processes in container can access new volume mount point without restart if possible
- Or containers are restarted with new bind mounts, then processes in container can access new volume mount point.
- Or other way to recover in this scenario.

**How to reproduce it (as minimally and precisely as possible)**:

- Create a cephfs volume and enable fuse support
- Create a pod to mount the volume
- Kill ceph-fuse process on the host

**Anything else we need to know?**:

Should we restart container after remounting volumes of it?

**Related issues**

- https://github.com/kubernetes/kubernetes/issues/46253
Repository: pytorch
Issue: [caffe2] Questions about conv_transpose && ConvTranspose
Labels: caffe2

I need to use conv_transpose(), but I always receive the same error. My code are as follows, any help would be highly appreciated. Thanks in advance.

upconv = brew.conv_transpose(
    model,
    blob_in = final_avg,
    blob_out = 'upconv',
    dim_in = =512,
    dim_out = 2048,
    kernels = [4,1,1],
    strides = [2,1,1],
    pads = [1,0,0],
)