sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: pack_padded_sequence throws IndexError when only kwargs are specified
Labels: module: rnn,triaged

## 🐛 Bug

pack_padded_sequence throws 

> IndexError:  tuple index out of range 

when only kwargs are specified, but no args.

## To Reproduce

Steps to reproduce the behavior:

1. Call pack_padded_sequence specifying all kwargs, but no args.

## Stack Trace
```
--> 108         packed = pack_padded_sequence(input=x[indices], lengths=lens.tolist(), batch_first=self.batch_first)
    109         outputs, hidden_t = self.rnn(
    110             input=packed,

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/onnx/__init__.py in wrapper(*args, **kwargs)
     65 
     66         # fast pass
---> 67         if not might_trace(args):
     68             return fn(*args, **kwargs)
     69 

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/onnx/__init__.py in might_trace(args)
    139     def might_trace(args):
    140         import torch
--> 141         first_arg = args[0]
    142         if not isinstance(first_arg, torch.Tensor):
    143             raise ValueError('First argument of {} is expected to be a tensor, '

IndexError: tuple index out of range
```

## Expected behavior

Args should not be required to be specified.

## Environment

PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: Could not collect

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:
[pip] Could not collect
[conda] Could not collect


cc @zou3519
Repository: pytorch
Issue: cdf in torch.distributions.bernoulli throws NotImplementedError
Labels: todo,module: distributions,triaged

## 🐛 Bug

When _cdf_ is called with a specified value on an instance of _bernoulli_ from _torch.distributions_, the 

> NotImplementedError

is thrown. Although, _log_prob_ works fine.

## To Reproduce

Steps to reproduce the behavior:

1. `a = torch.rand(1, 5)`
1. `m = torch.distributions.bernoulli(a)`
1. `m.cdf(torch.ones(1, 5))`

## Stack trace

```
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-27-ed52de363764> in <module>()
----> 1 m.cdf(1)

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torch/distributions/distribution.py in cdf(self, value)
    131             value (Tensor):
    132         """
--> 133         raise NotImplementedError
    134 
    135     def icdf(self, value):

NotImplementedError:
```

## Expected behavior

The cdf should not throw NotImplementedError. 

## Environment
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: Could not collect

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:
[pip] Could not collect
[conda] Could not collect


cc @fritzo @neerajprad @alicanb @vishwakftw @nikitaved
Repository: TypeScript
Issue: Using generic argument that extends something, stops inferring super keys when Exclude is used in addition to keyof and Pick
Labels: Suggestion,Needs Proposal,Domain: Conditional Types

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.1.0

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
keyof extends pick exclude

**Code**

```ts
interface Base {
    base1: number;
    base2: number;
}

class Data<T extends Base> {
   alpha(k:keyof Pick<T, Exclude<keyof T, "base1">>) {   }
    beta(k:keyof Pick<T, keyof T>) {   }
}

function wrapped<T extends Base>() {
    let d = new Data<T>();
    d.alpha("base2"); // Argument of type '"base2"' is not assignable to parameter of type 'Exclude<keyof T, "base1">'. 
    d.beta("base2");  // works
}
```

**Expected behavior:**

Both alpha and beta should work.

**Actual behavior:**

Alpha does not work: ` Argument of type '"base2"' is not assignable to parameter of type 'Exclude<keyof T, "base1">'. 

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

[Playground link](https://www.typescriptlang.org/play/#src=interface%20Base%20%7B%0D%0A%20%20%20%20base1%3A%20number%3B%0D%0A%20%20%20%20base2%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Aclass%20Data%3CT%20extends%20Base%3E%20%7B%0D%0A%20%20%20alpha(k%3Akeyof%20Pick%3CT%2C%20Exclude%3Ckeyof%20T%2C%20%22base1%22%3E%3E)%20%7B%20%20%20%7D%0D%0A%20%20%20%20beta(k%3Akeyof%20Pick%3CT%2C%20keyof%20T%3E)%20%7B%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Afunction%20wrapped%3CT%20extends%20Base%3E()%20%7B%0D%0A%20%20%20%20let%20d%20%3D%20new%20Data%3CT%3E()%3B%0D%0A%20%20%20%20d.alpha(%22base2%22)%3B%20%2F%2F%20Argument%20of%20type%20'%22base2%22'%20is%20not%20assignable%20to%20parameter%20of%20type%20'Exclude%3Ckeyof%20T%2C%20%22base1%22%3E'.%20%0D%0A%20%20%20%20d.beta(%22base2%22)%3B%20%20%2F%2F%20works%0D%0A%7D%0D%0A)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: TypeScript
Issue: JSON type
Labels: Suggestion,In Discussion

## Search Terms

- JSON

## Suggestion

Type annotation for JSON in a string.

## Use Cases

Let's say you have a string which contains valid JSON object, like so:

```js
const json = '{"hello": "world"}';
```

How can you type annotate the `json` variable? Currently, you can mark it as a `string`:

```ts
const json: string = '{"hello": "world"}';
```

Instead there could be some TypeScript language feature that helps with typing JSON in a string more precisely, for example:

```ts
const json: JSON {hello: string} = '{"hello": "world"}';
```

## Examples

Specify that string contains valid JSON.

```ts
let json: JSON any;
let json: JSON; // shorthand
```

Add typings to an HTTP response body.

```ts
let responseBody: JSON {ping: 'pong'} = '{"ping": "pong"}';
```

Add type safety to `JSON.parse()` method.

```ts
let responseBody: JSON {ping: 'pong'} = '{"ping": "pong"}';
let {ping} = JSON.parse(responseBody);
typeof ping // 'pong'
```

JSON cannot contain complex types.

```ts
type Stats = JSON {mtime: Date}; // Error: Date is not a valid JSON type.
```

Doubly serialized JSON.

```ts
let response: JSON {body: string} = '{"body": "{\"userId\": 123}"}';
let fetchUserResponse: JSON {body: JSON {userId: number}} = response;
```

Get type of serialized JSON string using `jsontype` keyword.

```ts
type Response = JSON {body: string, headers: object};
type ResponseJson = jsontype Response; // {body: string, headers: object}
type ResponseBody = ResponseJson['body']; // string
type ResponseBody = (jsontype Response)['body']; // string
```

Specify that variable is JSON-serializable.

```ts
let serializable: jsontype JSON = {hello: 'world'};
JSON.serialize(serializable); // OK

let nonserializable: object = {hello: 'world'};
JSON.serialize(nonserializable); // Error: 'nonserializable' might not be serializable.
```

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)

## Syntax Alternatives

```ts
type ResponseRaw = JSON {ping: 'pong'};
type ResponseRaw = json {ping: 'pong'};
type ResponseRaw = string {ping: 'pong'};
type ResponseRaw = json_string {ping: 'pong'};
type ResponseRaw = JSON<{ping: 'pong'}>;
type ResponseRaw = JSON({ping: 'pong'});

type Response = jsontype Response; // {ping: 'pong'}
type Response = typeof Response; // {ping: 'pong'}
type Response = parsed(Response); // {ping: 'pong'}
```
Repository: godot
Issue: Incorrect syntax highlighting in Dictionaries and enums.
Labels: enhancement,topic:gdscript,topic:editor,usability

**Windows 10 64-bit - 3.1 alpha 0dbe01483a902c49ecedf4fd36b74353424145a5**

@Paulb23 Wanted to get your opinion on this.

I noticed it is valid to use keywords, class names, and class property names as dictionary keys.  They get the syntax highlighting making you think otherwise.

Currently it is possible to create a very colorful dictionary.  X)

![godot windows tools 64_2018-10-16_23-37-27](https://user-images.githubusercontent.com/13004169/47045894-9a61bc80-d19c-11e8-9dec-9b64f6801dff.png)
Repository: TypeScript
Issue: Differentiate between implicit any and explicit any in the Compiler API.
Labels: Suggestion,In Discussion

<!-- 🚨 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.

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

- "Differentiate between implicit any and explicit any in the Compiler API."

## Suggestion

<!-- A summary of what you'd like to see added or changed -->

Working with the compiler API I've noticed the type checker doesn't differentiate between `any` originating from a decision by the author and a default case by the compiler.

In an internal branch I've fixed this by adding a new field to `ts.TypeFlags` and a new intrinsic type which is `any` with the flag added. I'm happy to upstream my implementation if this is accepted.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

```typescript
function hello(a, b) {}

function world(a: any, b: any) {
  const c = b;
}
```
In the current version of TypeScript these 2 methods take identical arguments and can't be differentiated by the signatures alone. Adding explicit `any` to the compiler allows tools to distinguish these. 

I've found this modification particularly valuable when utilizing the type checker for tools that analyse the output of the compiler. An example I've been using this for internaly is calculating the explicit type coverage of TypeScript code which could otherwise not be done.

## Examples

<!-- Show how this would be used and what the behavior would be -->

```typescript
    if (ts.isIdentifier(node)) {
      const type = this.checker.getTypeAtLocation(node);
      if (type.getFlags() & ts.TypeFlags.Any &&
           !(type.getFlags() & ts.TypeFlags.Explicit)) {
        this._untypedIdentifiers += 1;
      } else {
        this._typedIdentifiers += 1;
      }
    }
```
With the compiler change it's now possible to exclude explicit any from type coverage calculations.

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: neovim
Issue: TUI:  scrollbar 
Labels: enhancement,ui,tui,ui-extensibility,jumps-navigation

I think that a scrollbar in each window would be a big UX win.

I'm imagining the scrollbar as a single column, on the very right hand-side of each window, as is standard.

This could be very similar to the scrollbar in the insert completion popup menu. I don't care whether the "gripper" on the scrollbar is interactive or not (e.g. whether you can use the mouse to grab and move the scrollbar). The scrollbar could simply act as visual feedback, and I would be very happy.
Repository: godot
Issue: Rotation snapping is active only when it is turned off.
Labels: bug,topic:editor,confirmed,usability

**Win10 64bit - Alpha 3.1 0dbe01483a902c49ecedf4fd36b74353424145a5**

@groud Likely some flags flipped up somewhere.  But have noticed that rotation snapping only works when both snapping options are disabled.

![ezgif com-video-to-gif](https://user-images.githubusercontent.com/13004169/47065614-4b437800-d1ec-11e8-9068-19adf6fd1b37.gif)
Repository: rust
Issue: One of the E0599 note disappears when using specialization
Labels: A-diagnostics,T-compiler,A-specialization,C-bug,requires-nightly,F-specialization

Take the following code:
```rust
struct A {
    b: bool,
}

struct Foo;

struct B<T, U=Foo>(T, U);

impl<T: Clone> Clone for B<T> {
    fn clone(&self) -> B<T> {
        B(self.0.clone(), Foo)
    }
}

fn main() {
    let i = B(A { b: true }, Foo);
    let _j = i.clone();
}
```

(derived from `src/test/ui/unique-pinned-nocopy.rs`)

This fails to compile with:
```
error[E0599]: no method named `clone` found for type `B<A>` in the current scope
  --> src/main.rs:17:16
   |
7  | struct B<T, U=Foo>(T, U);
   | ------------------------- method `clone` not found for this
...
17 |     let _j = i.clone();
   |                ^^^^^
   |
   = note: the method `clone` exists but the following trait bounds were not satisfied:
           `B<A> : std::clone::Clone`
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `clone`, perhaps you need to implement it:
           candidate #1: `std::clone::Clone`
```
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015&gist=bf41d2dae1e36b2cb0ef6d8cae3529e4

Now, add the following:
```rust
#![feature(specialization)]

impl<T: Clone, U: Clone> Clone for B<T, U> {
    default fn clone(&self) -> B<T, U> {
        B(self.0.clone(), self.1.clone())
    }
}
```

and it now fails with:
```
error[E0599]: no method named `clone` found for type `B<A>` in the current scope
  --> src/main.rs:25:16
   |
9  | struct B<T, U=Foo>(T, U);
   | ------------------------- method `clone` not found for this
...
25 |     let _j = i.clone();
   |                ^^^^^
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `clone`, perhaps you need to implement it:
           candidate #1: `std::clone::Clone`
```
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015&gist=76f69c7ad78d25413784e9cbfd306583

The following note disappeared, but seems like it should still be emitted:
```
   = note: the method `clone` exists but the following trait bounds were not satisfied:
           `B<A> : std::clone::Clone`
```
Repository: pytorch
Issue: caffe2 python custom operator could not update parameters
Labels: caffe2

I write a Python custom operator in caffe2 and set some parameters in them. I have given grads of them. But I found that the parameters are not in model.params list so they could not be updated during the network running. 

def f(inputs, outputs):
            weight = inputs[1].data
            outputs[0].reshape(inputs[0].shape)
            outputs[0].data[...] = inputs[0].data * weight

def grad_f(inputs, outputs):
    # Ordering of inputs is [fwd inputs, outputs, grad_outputs]
    grad_output = inputs[3]

    grad_input = output
    grad_input[0].reshape(grad_output.shape)
    grad_input[1].reshape(grad_output.shape)
    grad_input[0].data[...] = grad_output.data * inputs[1].data
    grad.input[1].data[...] = grad_output.data * inputs[0].data

here, I wanna update the parameter weight. Is there any python function to add the parameters I want to update into the model.params so it could be updated?
Repository: vscode
Issue: [css] Autocomplete for media queries
Labels: help wanted,feature-request,css-less-scss

VSCode doesn't offer autocompletion for media queries.
Why is that?

![2018-10-17_104706](https://user-images.githubusercontent.com/11320080/47071163-8600dc80-d1fb-11e8-8632-7fd7cfbcabd1.jpg)
Repository: godot
Issue: Animation editor is not accessible from plugins
Labels: enhancement,topic:editor,topic:plugin

**Godot version:**
3.1 155652908a4284658b6c9b27640142a15fcb502c

**Issue description:**
Unless I missed it, the plugin API doesn't seem to provide a way to access animation editor. Working with and extending the animation editor can be useful for many purposes. We have several use cases for that, and it's clear projects may have specific animation-related workflows that could be implemented as plugins.
Repository: flutter
Issue: TextFormField editing cursor "balloon" floating on top of AppBar & TabBarView when scrolled
Labels: a: text input,framework,a: fidelity,f: scrolling,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework

On Android 6.0.1 device. The form fields are in a SingleChildScrollView (no ListView used at all).

Initially when a field is clicked into:
![flutter_01](https://user-images.githubusercontent.com/8287259/47073515-0559d480-d22b-11e8-89dd-874864325ac4.png)

After scrolling:
![flutter_02](https://user-images.githubusercontent.com/8287259/47073521-0985f200-d22b-11e8-9cee-fcc7941e1085.png)

```
[✓] Flutter (Channel beta, v0.9.4, on Linux, locale en_XX.UTF-8)
    • Flutter version 0.9.4 at /home/.../flutter
    • Framework revision f37c235c32 (3 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /home/.../Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /home/.../android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/.../android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.28.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.19.0
```
Repository: godot
Issue: The panoramic sky field of view is not set correctly in orthogonal mode
Labels: bug,topic:rendering,confirmed,topic:3d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
0dbe01483a902c49ecedf4fd36b74353424145a5

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Linux

**Issue description:**
<!-- What happened, and what was expected. -->

Auto/default FOV

![image](https://user-images.githubusercontent.com/4047289/47075911-d2e5b280-d1fd-11e8-8c11-ef9291928534.png)

![image](https://user-images.githubusercontent.com/4047289/47075951-edb82700-d1fd-11e8-9948-ac1ee65cad3d.png)

The same with a similar custom FOV

![image](https://user-images.githubusercontent.com/4047289/47076049-25bf6a00-d1fe-11e8-9378-60cdbb45c407.png)

![image](https://user-images.githubusercontent.com/4047289/47076084-38d23a00-d1fe-11e8-8714-309e890d4909.png)

**Steps to reproduce:**
Attach a panorama texture to the environment node and press numpad-5.
Repository: pytorch
Issue: [feature request] Spectral norm support in torch.norm or factor out Power Iteration from spectralnormalization in some other place and orthogonalization from PowerSGD hook
Labels: triaged,module: norms and normalization

Currently PyTorch has a spectral matrix norm implementation based on power iteration hidden inside the SpectralNorm. Since new `torch.norm` supports matrix norms (e.g. nuclear norm), it may be good to move it there, so it's usable in other contexts too (e.g. for debugging/tracing spectral properties of neural net weights, and since PyTorch doesn't support truncated randomized SVD yet).
Repository: flutter
Issue: [docs] explain difference between animation and secondaryAnimation in buildTransitions
Labels: framework,a: animation,d: api docs,f: routes,P2,team-framework,triaged-framework

I want to achieve the animation effect of routing switching in the video.
Explicitly, The child page switches to the parent page, and both the child page and the parent page move. And, the animation looks like: the parent page is completely removed, and the child page is completely moved in.

I tested the PageRouteBuilder for custom animations, but it only allows subpages to customize the animation, and the parent page does not.

Can you help me？

![route](https://user-images.githubusercontent.com/33337793/47080695-46f27b80-d23b-11e8-8bf3-17d7138f14ea.gif)