sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Cannot find operator schema for 'ATen' Caffe2 Ios
Labels: caffe2,triaged

## Issue description
Running a network with ATen ops on caffe2 built for Ios results in the following error message

## Error Message

```
[E operator.cc:140] Cannot find operator schema for ATen. Will skip schema checking.
libc++abi.dylib: terminating with uncaught exception of type at::Error: [enforce fail at operator.cc:209] op.
Cannot create operator of type 'ATen' on the device 'CPU'. Verify that implementation for the corresponding device exist.
It might also happen if the binary is not linked with the operator implementation code.
If Python frontend is used it might happen if dyndep.InitOpsLibrary call is missing.
Operator def: input: "150" output: "151" output: "152" name: "" type: "ATen" arg { name: "dim" i: 1 } arg { name: "keepdim" i: 0 } arg { name: "operator" s: "max" } device_option { device_type: 0 cuda_gpu_id: 0 }
```

## System Info
- Caffe2
- Installed from Source ([Instructions followed](https://caffe2.ai/docs/getting-started.html?platform=ios&configuration=compile))
- Additional build command: -DBUILD_ATEN_MOBILE=ON
- OS: macOS 10.13.6 
- CMake version: 3.12.1

## More Information
The model was written and trained in pytorch. The onnx export file and init_net.pb as well as predict_net.pb files were generated by following the [Transfering a model from PyTorch to Caffe2 and Mobile using ONNX](https://pytorch.org/tutorials/advanced/super_resolution_with_caffe2.html#transfering-a-model-from-pytorch-to-caffe2-and-mobile-using-onnx) tutorial
Superresolution Net and Squeeze Net both execute without fail. The error message mentions linking the operator implementation code. I'm not sure how to go about that in my XCode project
Repository: rust
Issue: Compiler runs out of memory
Labels: T-compiler,I-compilemem,C-bug,E-needs-mcve

I've trying to change a crate to be more generic, so I've started to add some generics to some types and then continued to add them where the compiler suggests (more or less).
That worked pretty fine till the crate stopped "compiling" because it is running out of memory (with a peak of ~30GB) and gets killed by the OS.
The code the reproduce this is unfortunately [quite big](https://github.com/weiznich/juniper/commit/21ed21506d270ebe4d576e29773fe5f17064a8c0) because I don't know what exactly caused this. 
There are not that much generics in there, compared to for example diesel, so I don't think the generics itself are the problem. More likely this is the result of a half finished transformation of everything to the new generic form.
 
This happens with the latest rustc nightly.
Repository: vue
Issue: Vue.component doesnt except argument of type `Component`
Labels: typescript

### Version
2.5.17

### Reproduction link
[https://codesandbox.io/s/8z04jxj3y8](https://codesandbox.io/s/8z04jxj3y8)





### Steps to reproduce
- Click repro link
- Open test.ts
- See type errors
- Uncomment vue type augmentation to see errors disappear


### What is expected?
I can pass any component to `Vue.component`

### What is actually happening?
Type error:
```
Argument of type 'Component<DefaultData<never>, DefaultMethods<never>, DefaultComputed, Record<string, any>>' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Rec...'.
  Type 'VueConstructor<Vue>' is not assignable to type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Rec...'.
    Value of type 'VueConstructor<Vue>' has no properties in common with type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Rec...'. Did you mean to call it?
```

---
Adding the following overload to `Vue.component` will fix it:
```ts
    component<Data, Methods, Computed, Props>(
      id: string,
      definition: Component<Data, Methods, Computed, Props>,
    ): ExtendedVue<V, Data, Methods, Computed, Props>;
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: flutter_test framework does not run isolates/handle isolate message sending properly
Labels: a: tests,framework,dependency: dart,has reproducible steps,P2,found in release: 3.5,team-framework,triaged-framework

Isolates are unable to send and receive messages properly when running flutter_test tests. For example, even very simple ping-pong style messages either fail to send or the isolate may fail to run at all.

```dart
import 'dart:isolate';
import 'package:unittest/unittest.dart';

child(args) {
  var msg = args[0];
  var reply = args[1];
  print("msg = $msg, reply = $reply");
  reply.send('re: $msg');
}

void main([args, port]) {
  test('message - reply chain', () {
    ReceivePort port = new ReceivePort();
    port.listen((msg) {
      print("Received msg + $msg");
      port.close();
    });
    Isolate.spawn(child, ['hi', port.sendPort]);
  });
}
```

This simple example shows one of the symptoms of the issue where the 're: $msg' is never printed.

Other examples sometimes run the child isolate code, but the reply messages to the reply port fails to send.
Repository: rust
Issue: Builtin macros such as `include_str!` should accept `&'static str` instead of a string literal
Labels: T-compiler,C-feature-request,A-const-eval

Right now, `include_str!()` works on a syntax level and does not allow a user to pass in a `&'static str` for the file path. I stumbled upon this after the following code didn't compile in release mode:

```rust
const CSS_PATH: &str = "C:\\my\\file\\path\\test.css";

#[cfg(debug_assertions)]
let css = Css::hot_reload(CSS_PATH).unwrap();

#[cfg(not(debug_assertions))]
let css = Css::new_from_str(include_str!(CSS_PATH)).unwrap();
```

Notice the `Css::hot_reload` vs the `Css::new_from_str` - in debug mode I want to hot-reload the file from disk (for quick style changes), but in release mode I want to include it in the binary.

Now I can solve it by doing:

```rust
#[cfg(debug_assertions)]
let css = Css::hot_reload("C:\\my\\file\\path\\test.css").unwrap();

#[cfg(not(debug_assertions))]
let css = Css::new_from_str(include_str!("C:\\my\\file\\path\\test.css")).unwrap();
```

... but then I need to update the file path in two places, which isn't good.

Looking at the [source of `include_str!()`](https://github.com/rust-lang/rust/blob/727eabd68143e968d8826ee29b8ea7792d29fa96/src/libsyntax/ext/source_util.rs#L133-L168), it seems that `include_str!` works directly on the AST, i.e. the compiler doesn't know about whether the given string (the file path) is `const` or not, so if it is implemented it would maybe be necessary to restructure this part of the compiler.

I realize that it's a low-priority issue, but it would be nice to have. And yes, I can solve it with a build script, but that's just a last line of defense - I currently don't see any reason (except from the technical implementation problem) to not have it in the compiler - maybe a potential security concern if the strings are built at compile time from a `const fn`, but then again `include_str!("/usr/bin/passwd")` can already be done today, so it doesn't decrease or increase security.
Repository: vscode
Issue: Settings UI lacks concept of inherited default value
Labels: feature-request,settings-editor

re #57304

* open settings UI
* locate 'Suggest Font Size'
* notice how the UI shows `0` which isn't true - the default value is the font size of the editor. 

<img width="343" alt="screen shot 2018-08-28 at 09 47 01" src="https://user-images.githubusercontent.com/1794099/44708754-32e69500-aaa8-11e8-9088-194a04f4d6bc.png">
Repository: vscode
Issue: Settings decoration: Modified in Folder
Labels: feature-request,settings-editor

Issue Type: <b>Feature Request</b>

Testing #57304

There already is a 'Modified in Workspace" decoration, it would be great if that would also list any folders in which that setting is modified (and also show these in the workspace settings).

VS Code version: Code - Insiders 1.27.0-insider (43676d0cb7db94e2fa771f1d10bff10eaa01b453, 2018-08-28T05:12:24.162Z)
OS version: Darwin x64 17.7.0


<!-- generated by issue reporter -->
Repository: pytorch
Issue: [Caffe2] Model work Alright in Python but Failed in C++
Labels: caffe2

## Issue description

I have built a model in PyTorch and transfer it into Caffe2's .pb format through onnx. The model in .pb format worked well with Caffe2's Python API, but failed to work with Caffe2's C++ API. I rewrote the C++ code following the pybind_state.cc file in my local repository of caffe2 source code, making my C++ code almost identical to the reference. However, it still didn't work. My guess is that the problem lies in the caffe2.pb.cc file generated using protobuf, as I generated it after my build of Caffe2 following the tutorial in https://caffe2.ai/docs/cplusplus_tutorial.html.

## Code example

Following is my C++ code.
```
	this->workspace = new caffe2::Workspace();
	caffe2::NetDef initNet, predictNet;
	CAFFE_ENFORCE(this->workspace);
	std::ifstream initNetFile(this->initNetPath, ios::binary);
	std::ifstream predictNetFile(this->predictNetPath, ios::binary);
	std::string initNetStr((std::istreambuf_iterator<char>(initNetFile)), std::istreambuf_iterator<char>());
	std::string predictNetStr((std::istreambuf_iterator<char>(predictNetFile)), std::istreambuf_iterator<char>());

	CAFFE_ENFORCE(caffe2::ParseProtoFromLargeString(initNetStr, &initNet));
	CAFFE_ENFORCE(caffe2::ParseProtoFromLargeString(predictNetStr, &predictNet));

	auto predictor = new caffe2::Predictor(initNet, predictNet, this->workspace);
```
And my Python demo which worked.

```
# The path to save model
INIT_MODEL_PATH = r".\init_voxelbased.pb"
PREDICT_MODEL_PATH = r".\predict_voxelbased.pb"

# Load the model
with open(INIT_MODEL_PATH, 'rb') as f:
    init_net = f.read()
with open(PREDICT_MODEL_PATH, 'rb') as f:
    predict_net = f.read()

# Initialize the predictor from the input protobufs
p = workspace.Predictor(init_net, predict_net)
```
Visual Studio 2017 shows very little information (internal metadata point to 0x00000000000) about 'initNet' after the 'ParseProtoFromLargeString', so I strong suspect that there is something wrong with 'ParseProtoFromLargeString' .

## System Info


- PyTorch or Caffe2: Caffe2
- How you installed Caffe2 (conda, pip, source): source
- Build command you used (if compiling from source): build_windows.bat in '/scripts'
- OS: Windows 10 professional
- Caffe2 version: Not sure, but built from source in Aug 15 2018
- Python version: 3.6.5
- CUDA/cuDNN version: 9.2
- GPU models and configuration: GTX1080
- GCC version (if compiling from source): Unknown
- CMake version: 3.12.1
- Versions of any other relevant libraries: protobuf 3.5.0
Repository: vue
Issue: Property 'xxx' does not exist on type CombinedVueInstance ?
Labels: typescript

### Version
2.5.17

### Reproduction link 



### Steps to reproduce
1. use vue-cli init a ts hello-world project .
2. code like that
```js
<script lang="ts">
import Vue from "vue";
export default Vue.extend({
  name: "HelloWorld",
  props: {
    msg: String
  },
  data():any {
    return {
      wtf: this.initData(), // throw ts error : Property 'initData' does not exist on type 'CombinedVueInstance<Vue, {}, {}, {}, Readonly<{ msg: string; }>>'.
    }
  },
 
  methods: {
    initData():any {
        return {
          a: ''
        }
    },
  },
 
});
</script>
```


### What is expected?
How can i fix it ?

### What is actually happening?
**Property 'initData' does not exist on type 'CombinedVueInstance<Vue, {}, {}, {}, Readonly<{ msg: string; }>>'.**


<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: godot
Issue: moving folded code only moves top line from fold and not all lines in fold
Labels: bug,topic:editor,confirmed



Godot 3.1


usinmg alt+arrows to move a folded function over another folded function but only moved the top line from the folded function

unexpected behavior 


make a function, fold it, use alt+arrows up or down to move it
Repository: react
Issue: Number input breaks when letter "e" is entered
Labels: Component: DOM,Type: Needs Investigation

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**
bug

**What is the current behavior?**
input[type=number] only allows entering numbers and letter "e" in the input. Native "input" input event is called for both numbers and the letter "e". With React the `onChange` event is only called for numbers. There's no way to catch "e" with `onChange`.

The "e" is even being filled when the input is controlled. The only way I can think of to work around this bug right now is to use `onKeyDown` and `preventDefault` when "e" or "E" is pressed.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
https://codesandbox.io/s/ov3ql3ljwz

**What is the expected behavior?**
It should pass anything that is being filled into the input to the onChange handler and should not break controlled component.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React: 16.4.2
Chrome: 68.0.3440.106
Windows 10
Repository: rust
Issue: rustdoc ignores inherent impls made in non-module scope
Labels: T-rustdoc,E-medium,C-bug

Similar to https://github.com/rust-lang/rust/issues/52545, rustdoc doesn't see anything if it's not written into a module's scope. However, there are some things that can be written in function/expression scope that still make it out into the public API. While that issue was about trait impls, it seems that inherent impls work in a similar way. Consider the following snippet:

```rust
fn asdf() {
    impl SomeStruct {
        pub fn qwop(&self) {
            println!("hidden function");
        }
    }
}

fn main() {
    let asdf = SomeStruct;
    asdf.qwop(); // prints "hidden function"
}
```

Even though `qwop()` was written in function scope, it's still visible globally because it was defined with `pub`. Rustdoc should collect these impls and display them.

One thing i'm curious about is whether we should show non-`pub` functions defined in non-module scope when `--document-private-items` is set. I think we can get away with it, because it already displays private functions there regardless of where they're defined.
Repository: go
Issue: x/net/websocket: add a web socket client when targeting js/wasm
Labels: NeedsInvestigation,FeatureRequest

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
v 1.11

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN="/Users/adamtcarter/go/bin"
GOCACHE="/Users/adamtcarter/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/adamtcarter/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7h/f4ryg4z10xd13dy_qf221grc0000gn/T/go-build718587663=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

### What did you do?
Use web sockets in go while targeting js,wasm

### What did you expect to see?
NA

### What did you see instead?
NA

If it makes sense, please add a WebSocket client in x/net/websocket when targeting js,wasm.  I was digging around some of the code and it looks like it would be possible by taking a similar approach to what was taken with http.Request calling the native browser `fetch` api.  Let me know if it's viable and I can take a stab at it.
Repository: pytorch
Issue: Cannot run torch in different sub-interpreters
Labels: todo,needs reproduction,module: cpp,triaged

## Issue description

It seems that torch cannot be imported in two different sub-interpreters, as they are described in https://docs.python.org/2/c-api/init.html#sub-interpreter-support.

## Code example

    #include <Python.h>

    int main(int argc, char **argv) {

        Py_Initialize();
        PyEval_InitThreads();

        PyThreadState *thread1 = Py_NewInterpreter();
        PyThreadState *thread2 = Py_NewInterpreter();

        PyEval_ReleaseLock();

        PyEval_AcquireLock();
        PyThreadState_Swap(thread1);
        PyRun_SimpleString("import torch");
        PyEval_ReleaseLock();

        PyEval_AcquireLock();
        PyThreadState_Swap(thread2);
        PyRun_SimpleString("import torch"); // This is where the error occurs.
        PyEval_ReleaseLock();

        Py_Finalize();

        return 0;
    }

## Result

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/data/bdawagne/python/lib/python3.6/site-packages/torch/__init__.py", line 186, in <module>
    from .tensor import Tensor
  File "/usr/data/bdawagne/python/lib/python3.6/site-packages/torch/tensor.py", line 12, in <module>
    class Tensor(torch._C._TensorBase):
  File "/usr/data/bdawagne/python/lib/python3.6/site-packages/torch/tensor.py", line 172, in Tensor
    """)
RuntimeError: method 'detach' already has a docstring

## System Info
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Fedora 28 (Twenty Eight)
GCC version: (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
CMake version: version 3.11.2

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.1.85
GPU models and configuration: 
GPU 0: GeForce GTX 1080 Ti
GPU 1: GeForce GTX 1080 Ti

Nvidia driver version: 396.45
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect


cc @yf225 @glaringlee
Repository: pytorch
Issue: Better dev docs for writing native CPU kernels with Vec256
Labels: triaged,module: vectorization

There have been multiple PRs that put non-arch-specific CPU kernels in `native/cpu`. We need to 
1. Rename `native/cpu`
2. Have better dev docs on how to use `Vec256`.

cc @colesbury @cpuhrsch
Repository: rust
Issue: Add filter to `rustc_on_unimplemented` for `self_has_method="foo"`
Labels: C-enhancement,A-diagnostics,T-compiler,F-on_unimplemented

Add a way to query on specific methods and traits being available to `rustc_on_unimplemented` for more targeted suggestions.
Repository: flutter
Issue: Facilitate Proguard on Android
Labels: platform-android,tool,customer: dream (g3),P3,team-android,triaged-android

Facilitate Proguard on Android.
Repository: rust
Issue: Can't compare reference to ptr but reverse works
Labels: T-lang,C-bug

```rust
fn main() {
    let a = 1;
    let b = &mut a as *mut _;
    
    // Ok:
    b == &mut a;
    // Not Ok:
    &mut a == b;
}
```

Surprisingly, the second comparison errors with:
```shell
error[E0277]: the trait bound `&mut {integer}: std::cmp::PartialEq<*mut {integer}>` is not satisfied
 --> src/main.rs:6:12
  |
6 |     &mut a == b;
  |            ^^ can't compare `&mut {integer}` with `*mut {integer}`
  |
  = help: the trait `std::cmp::PartialEq<*mut {integer}>` is not implemented for `&mut {integer}`
```

I believe reference vs ptr comparisons should be legal as the reverse is legal - and if the error message is to be believed, it's just as simple as adding a PartialEq impl for raw ptrs?
Repository: pytorch
Issue: [feature request] padding for torch.cat 
Labels: triaged,enhancement,module: viewing and reshaping

Currently, `torch.cat` only allows to concatenate equal-dimensional Tensors (except in the dimension catting).

For example:

```python
>>> x = torch.ones(2, 3)
>>> y = torch.zeros(1, 3)
>>> torch.cat([x, y], dim=0)

tensor([[1., 1., 1.],
              [1., 1., 1.],
              [0., 0., 0.]])

>>> x = torch.ones(2, 3)
>>> y = torch.zeros(1, 4)
>>> torch.cat([x, y], dim=0)

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 3 and 4 in dimension 1 at ../aten/src/TH/generic/THTensorMoreMath.cpp:1348
```

The proposal is to add a `padding` option to `torch.cat`, which will find the maximum size of Tensors in each dimension, and will place each Tensor within that larger padded Tensor.

```python
torch.cat(TensorList, dim, pad=True, pad_value=0.0)
```

Example:

```python
>>> x = torch.ones(2, 3)
>>> y = torch.zeros(1, 4)
>>> torch.cat([x, y], dim=0, pad=True, pad_value=0.5)

tensor([[1., 1., 1., 0.5],
              [1., 1., 1., 0.5],
              [0., 0., 0., 0.]])
```

If the TensorList has size mismatches in multiple dimensions, the output size will be computed by finding the max of sizes in each dimension, except the dimension being concatenated.

For example:

```python
>>> x = torch.ones(1, 2, 3, 4, 5)
>>> y = torch.ones(3, 9, 2, 5, 1)
>>> torch.cat([x, y], dim=0, pad=True).size()
torch.Size([4, 9, 3, 5, 5])
```
Repository: godot
Issue: A D-Pad button presses two buttons for Gamecube controllers / joysticks and Mayflash adaptors
Labels: bug,confirmed,topic:thirdparty,topic:input

**Godot version:**
3.0.6


**OS/device including version:**
Mac OS X El Capitan 
Version 10.11.6 (15G20015)



**Issue description:**
When I use a Nintendo Gamecube controller that’s connected to a USB Mayflash adaptor, pressing only one d-pad button at a time results in multiple buttons being pressed at the same time.

Here’s what the Output says when I press each button and print out which button was pressed:

Pressing left on the d-pad:
Output prints: Controller pressed buttons #15,#14,#15 and #14.
	I was expecting it to only say one of these numbers, and only once per button press.

Pressing down: Output prints: #14,13,14 and 13
	Same expectation.

Pressing Right: Prints 13, 13, 15 and 15.

Pressing up: Prints 12 and 12. 
	I don’t think it’s because I pressed the button for too long because I can press any other button only once with ease.


Tested with two different Gamecube controllers, 
one of them is 1st party from Nintendo, 
the other is a third party “SUPERPAD” from InterAct.
Both controller D-pads work fine when tested with Joystick and Gamepad Tester:
https://download.freedownloadmanager.org/Mac-OS/Joystick-And-Gamepad-Tester/FREE-7.1.html






**Steps to reproduce:**
Plug in a Gamecube controller into a USB Mayflash adaptor.
Plug the adaptor into an iMac (Intel).

Run attached Godot Project.
Run the scene.
Press D-pad buttons one at a time and read the Output messages provided by the autoloaded script.

You can also test any other USB joystick.

Note: the script is autoloaded. It automatically detects which gamecube controller is pushing buttons. Without it, button testing might not work because: simply using Input.is_joy_button_pressed(0, 12) might not work since the active gamecube controller # is always random each time you run the scene.

Please fix. Thank you!


**Minimal reproduction project:**
See attached zip file.
[GamecubeControllerTest.zip](https://github.com/godotengine/godot/files/2330143/GamecubeControllerTest.zip)

If the project doesn't work, please make a new one with a scene and set the project to autoload this script:

[buttonTest.gd.zip](https://github.com/godotengine/godot/files/2330145/buttonTest.gd.zip)