sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Move bernoulli_() to DistributionTemplates
Labels: triaged,module: random

To make `bernoulli_` available for custom RNGs:
- Move `bernoulli_` logic to `DistributionTemplates.h`
- Move ` bernoulli_kernel` logic from `UnaryOpsKernel.cpp` to `cpu/DistributionTemplates.h`
- Move ` bernoulli_kernel` logic from `DistributionBernoulli.cu` to `cuda/DistributionTemplates.h`
- Add a test in `cpu_rng_test.cpp`
Repository: go
Issue: cmd/go: add support for tracing to visualize build behavior 
Labels: NeedsInvestigation,GoCommand

I'd like to add a GODEBUG option to cmd/go to emit traces so that we can visualize build behavior. For now it will emit a runtime trace but maybe in the future we might use @ianthehat's events library. Maybe in the future it could become a flag, but for now adding it to GODEBUG should be safe in the sense that it doesn't affect the formal interface of the go command.
Repository: godot
Issue: CSGMesh GetAabb() / GetTransformedAabb() returns zero
Labels: bug,topic:core,confirmed

**Godot version:**
3.2.2.beta1

**OS/device including version:**
Windows 10 Pro (10.0.18362)

**Issue description:**
CSGMesh methods `GetAabb()` and `GetTransformedAabb()` returns `Vector3.Zero`.
`csgMesh.Mesh.GetAabb()` seems to return the correct value.

**Steps to reproduce:**
1. Create a CSGMesh node.
2. Add any mesh to it.
3. Call `GetAabb()` or `GetTransformedAabb()` on the CSGMesh node.
4. Zero-value is returned from the methods.
Repository: TypeScript
Issue: Simple Comparison of Generics not allowed?
Labels: Suggestion,Experience Enhancement

**TypeScript Version:**  3.8

**Search Terms:**
generic comparison
compare generic strings

**Code**

```ts
function test<A, B>(one: A, two: B): A {
  if (one === two) {
    throw new Error('no');
  }
  return one;
}

const obj = {};

test(obj, obj);

```

**Expected behavior:**

While the generics are generally indicating that `one` and `two` are independent values, they can still potentially be the same underlying value so they should be able to at least be checked for equality without casting them first, especially since there is no error produced when calling the function with identical values in the first place.

At the very least the error message should be more specific since the assumption it is providing is not correct in since the condition returns true :-P

( This is clearly a simplified version of where I ran into this since there'd be no reason to use generics in this specific case :-) )

**Actual behavior:**

Shown in example


**Playground Link:** [Playground](https://www.typescriptlang.org/v2/en/play?ts=3.8.3#code/GYVwdgxgLglg9mABFApgZygHgIIBpEBCAfABQIoBcieyA7nFQQJRXaIDeAsAFCKIzBEZMCkQBeCXThMOPPnygALAE5xaiEeoCiy1cpIByMHANMA3HMQBfS8pRQQypOQvcb3HhAQZEcAEYAVuIcVq48qBhkgfj+AeY8QA)
Repository: TypeScript
Issue: Enforce consistent imports when directory is in jsconfig's paths
Labels: Needs Investigation

*TS Template added by @mjbvz*

**TypeScript Version**: 3.9.0-dev.20200427

**Search Terms**
- javascript
- auto import
- symlink

---

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.43.2
- OS Version: macOS 10.15.3

Steps to Reproduce:

1. Specify a `jsconfig.json` that includes `compilerOptions.paths` to a specific directory
2. Let intellisense import a variable from this specific directory
3. Depending on how deep you are in the code base, it will resolve that variable relatively or absolutely

You can take a look at this reproduction repo: https://github.com/Floriferous/vscode-symlink-import

More specifically the 2 files `code.js` and `deepCode.js`, they both resolve the variable differently, as `javascript.preferences.importModuleSpecifier` is set to `auto`.

I'd like a folder specified in `paths` to always resolve as `myPathsFolder/...`
Repository: pytorch
Issue: Add BufferDict container
Labels: feature,module: nn,triaged,actionable

## 🚀 Feature
A `torch.nn.BufferDict` container that mirrors `ParameterDict`.

## Motivation
We sometimes work with a lot of buffers, and it would be nice to have a convenient way of dealing with those, similar to `ParameterDict`, but well, with the values being buffered tensors rather than of type `torch.nn.Parameter`. Currently `ParameterDict` specifically uses `register_parameter`, so it's not straightforward to use that transparently.

## Pitch
Implement `BufferDict` by mirroring `ParameterDict`. Like so: #37385

## Alternatives
Manually handle toms of buffers. That gets clunky quickly.


cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: flutter
Issue: Support iPadOS pointer interactions
Labels: c: new feature,platform-ios,framework,a: fidelity,f: cupertino,f: gestures,a: desktop,a: mouse,P3,team-design,triaged-design

This is an umbrella issue that tracks the support for iPadOS pointer interactions.
However, features beyond basic cursor type and hover effect will likely have a low priority for a while.

## Reference
- Apple's [Design guidelines](https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/pointers/)
- UIKit's [Documentation](https://developer.apple.com/documentation/uikit/pointer_interactions)

## TODO
- Support basic mouse features
  - [ ] Support background color change in hover effect
  - [ ] Support basic cursor styles (those without magnetism) on hoverable regions
- Support region-aware features
  - [ ] Support highlight effect
  - [ ] Support lift effect
- [ ] Support trajectory prediction

## Related issues
- Previous discussion: https://github.com/flutter/flutter/issues/52912
- Scroll wheels: https://github.com/flutter/flutter/issues/54663
- General mouse cursor: https://github.com/flutter/flutter/issues/31952
Repository: pytorch
Issue: The pytorch's graph is lack of common names for nodes
Labels: module: bootcamp,feature,module: tensorboard,oncall: visualization,days

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
![image](https://user-images.githubusercontent.com/44078961/80440384-401dec00-893b-11ea-8a79-7c3838019d23.png)
Many nodes do not have a COMMON name. It is difficault to figure out who it is.

## To Reproduce

Steps to reproduce the behavior:

1.OH, you can use a forward function with conv2d method and jit.trace it into a graph. And you wiil get it

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
I believe that name with number should change into name by word, like bias and weight.

## Environment

That graph is build by the tensorbaord example of pytorch. I think common pytorch is ok.

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context
<!-- Add any other context about the problem here. -->
```shell
graph(%self : ClassType<LSTM>,
      %input : Float(1, 1, 3),
      %6 : (Float(1, 1, 3), Float(1, 1, 3))):
  %1 : Tensor = prim::GetAttr[name="weight_ih_l0"](%self)
  %2 : Tensor = prim::GetAttr[name="weight_hh_l0"](%self)
  %3 : Tensor = prim::GetAttr[name="bias_ih_l0"](%self)
  %4 : Tensor = prim::GetAttr[name="bias_hh_l0"](%self)
  %hx.1 : Float(1, 1, 3), %hx : Float(1, 1, 3) = prim::TupleUnpack(%6)
  %48 : Tensor[] = prim::ListConstruct(%hx.1, %hx), scope: LSTM
  %49 : Tensor[] = prim::ListConstruct(%1, %2, %3, %4), scope: LSTM
...
```
It is the graph's scirptmodule built by jit.trace. It seems like the node use the number the node's name. Maybe we can use the "name="weight_ih_l0"" word to name the node.

cc @suo
Repository: godot
Issue: AnimationPlayer doesn't show the keyframe icon for AnimatedSprite, and consequently that node hides the keyframe icon for the rest of the nodes
Labels: bug,topic:editor

**Godot version:**
3.2.1
**OS/device including version:**
Win 10 v1909
**Issue description:**
When creating a new track on the AnimationPlayer and switching to an animated sprite node, the keyframe icons do not appear. Switching to any other node will hide the keyframe icon for that node as well. The only way to restore the icon is to select the AnimationPlayer node and then select any other node beside the AnimatedSprite node.
**Steps to reproduce:**

1. Create a simple node
2. Add an Animatedsprite child node
3. Add an AnimationPlayer child node (to the node or the AnimatedSprite)
4. Create a track
5. Select the AnimatedSprite (no keyframe icon)
6. Select the Node (no keyframe icon)
7. Reselect the AnimationPlayer node
8. Select the Node (Keyframe icon is showin)

Video capture of the bug: https://youtu.be/wEoUN-Cr7Lo

**Minimal reproduction project:**
Video capture of the bug: https://youtu.be/wEoUN-Cr7Lo
Repository: godot
Issue: AnimatedSprite node doesn't show keyframe icon and disables the icons for any other node.
Labels: bug,topic:editor

**Godot version:**
3.2.1
**OS/device including version:**
Win 10 v1909
**Issue description:**
When creating a new track on the AnimationPlayer and switching to an animated sprite node, the keyframe icons do not appear. Switching to any other node will hide the keyframe icon for that node as well. The only way to restore the icon is to select the AnimationPlayer node and then select any other node beside the AnimatedSprite node.
**Steps to reproduce:**

1. Create a simple node
2. Add an Animatedsprite child node
3. Add an AnimationPlayer child node (to the node or the AnimatedSprite)
4. Create a track
5. Select the AnimatedSprite (no keyframe icon)
6. Select the Node (no keyframe icon)
7. Reselect the AnimationPlayer node
8. Select the Node (Keyframe icon is showin)

Video capture of the bug: https://youtu.be/wEoUN-Cr7Lo

**Minimal reproduction project:**
Video capture of the bug: https://youtu.be/wEoUN-Cr7Lo
Repository: flutter
Issue: Flutter Textstyle class  ignores invalid fontFamily and fontSize
Labels: framework,engine,a: typography,a: error message,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-engine,triaged-engine

Everything is recently installed. 
```
Android 3.63(April 13, 2020)
C:\Users\allen>flutter --version
Flutter 1.17.0-3.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 2a7bc389f2 (6 days ago) • 2020-04-21 20:34:20 -0700
Engine • revision 4c8c31f591
Tools • Dart 2.8.0 (build 2.8.0-dev.20.10)
=======================================================
```
The code snip-it:

```
// Calling Widget 
  child: Text("The quick brown fox jumps over the lazy dog",
                // Center align text
                textAlign: TextAlign.center,
                // set a text style which defines a custom font
                style: myTextStyle()),

// Function
TextStyle myTextStyle(
    {myColor = Colors.blueAccent,
      myFontFamily='nofont',
      myFontWeight = FontWeight.w400,
      myFontSize = -1.0 }
    )
{
  return  TextStyle(
    // set color of text
      color: myColor,
      // set the font family as defined in pubspec.yaml
      fontFamily: myFontFamily,
      // set the font weight
      fontWeight: myFontWeight,
      // set the font size
      fontSize: myFontSize);
}
```
==================================================
In either scenario, the console output is normal
```
Performing hot restart...
Syncing files to device SM N910V...
Restarted application in 8,496ms.
==================================================
```
Two issues here, I would be happy to spawn an extra bug if asked

Issue one:
If you were to enter an invalid(mispelled) fontFamily, the output to the Android phone is some default font, I assume 'Roboto'

Expected behavior: At a minimum an error message to the Console
                               Perhaps a RT error.

Testing consideration: You could not run automated tests since there would be string output just not the right one. A plain text output would not be noticed by Testing right away.

===========================================================
Issue two:
If you were to enter a negative value, like -36.0 for FontSize, I get no text at all

Expected behavior: At a minimum an error message to the Console
                               Perhaps a RT error.

Testing consideration: Without a Console message, you couldn't run automated tests.

==========================================================
The answer to the question 
"Why would anyone do that" ?
Answer
Because they can.

=========================================================
I have not tried flutter "lint" maybe I should.
Repository: node
Issue: http: Reduce API surface
Labels: http

I would like to suggest that [`complete`](https://nodejs.org/dist/latest-v14.x/docs/api/http.html#http_message_complete) and [`aborted`](https://nodejs.org/dist/latest-v14.x/docs/api/http.html#http_message_aborted) are unnecessary API surface and should be at least doc deprecated.

The user can keep of track of this state themselves by registering an `'aborted'` handler.

In particular the exact semantics of e.g. `complete` is a slightly unclear and might cause more harm than use.
Repository: angular
Issue: A destroyed view can be interacted with in ivy
Labels: freq1: low,area: core,state: confirmed,core: dynamic view creation,type: confusing,P4

In Angular with ViewEngine a destroyed view can't be interacted with (ex. one can't trigger change detection on such views). With ivy it is possible to call methods on a destroyed view and there is no error message / logs indicating that a view was destroyed.

Here is [the test exposing difference in VE vs. ivy behaviour](https://github.com/pkozlowski-opensource/angular/commit/e972be659827be252fec3b6c20c4986161de253c):

```typescript
it('should prevent usage of a destroyed fixture', () => {
    @Component({selector: 'test-cmpt', template: ``})
    class TestCmpt {
    }

    TestBed.configureTestingModule({declarations: [TestCmpt]});
    const fixture = TestBed.createComponent(TestCmpt);

    fixture.destroy();

    expect(() => {fixture.detectChanges()})
        .toThrowError(/Attempt to use a destroyed view: detectChanges/);
  });
```
Repository: ant-design
Issue: Slider组件onAfterChange事件触发问题
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-reproduction-template-sldlq)

### Steps to reproduce
点击滑动条改变值，触发一次onAfterChange，此时Slider处于focus状态。然后点击网页外的位置（比如Windows任务栏），此时Slider失焦。然后点击网页的任意位置，onAfterChange又一次触发了。

### What is expected?
onAfterChange只在点击Slider时触发。

### What is actually happening?
在没有点击Slider时onAfterChange触发了。

| Environment | Info |
|---|---|
| antd | 3.25.0 |
| React | 16.13.1 |
| System | Windows10 |
| Browser | Chrome63.0.3239.132 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: torch.cdist() implementation without using contiguous() calls
Labels: module: performance,triaged,enhancement,module: distance functions

## 🚀 Feature
A decent torch.cdist() implementation that does not have contiguous() calls which usually resulted in excessive GPU memory usage

## Motivation

See the original problem at https://discuss.pytorch.org/t/understanding-cdist-function/76296/12?u=promach

## Pitch

Modify [these two lines](https://github.com/pytorch/pytorch/blob/a836c4ca78b72ecc8e0664e1b684af64ce83be42/aten/src/ATen/native/Distance.cpp#L78-L79) inside torch.cdist() implementation

## Alternatives

I found some other implementation of cdist() [code 1](https://github.com/pytorch/pytorch/pull/25799#issuecomment-529021810) and [code 2](https://github.com/pytorch/pytorch/issues/15253#issuecomment-491467128), but they are still consuming excessive amount of GPU memory.

## Additional context

None


cc @VitalyFedyunin @ngimel
Repository: pytorch
Issue: Compatibility of subset dataset with disabled batch sampling
Labels: module: dataloader,triaged

I think there is a compatibility issue with disabled batch sampling and subset dataset
The use-case - define custom batch sampling, and split the dataset using PyTorch split utility function
Here's a minimal working example
```
self.train_dataset, self.val_dataset, self.test_dataset = torch.utils.data.random_split(
            self.dataset, [100, 100, 100])

loader = DataLoader(
                dataset=self.train_dataset,
                batch_size=None,
                batch_sampler=None,
                sampler=BatchSampler(
                    SequentialSampler(dataset), batch_size=self.hparams.batch_size, drop_last=False),
                num_workers=self.hparams.num_data_workers,
            )
```
And when iterating the subset datasets this is the error
```
Exception has occurred: TypeError
list indices must be integers or slices, not list
  File "/path/utils/data/dataset.py", line 257, in __getitem__
    return self.dataset[self.indices[idx]]
  File "/path/utils/data/_utils/fetch.py", line 46, in fetch
    data = self.dataset[possibly_batched_index]
  File "/path/utils/data/dataloader.py", line 385, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/path/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/path/lib/python3.7/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 251, in _evaluate
    for batch_idx, batch in enumerate(dataloader):
  File "/path/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 843, in run_pretrain_routine
    False)
  File "/path/lib/python3.7/site-packages/pytorch_lightning/trainer/distrib_parts.py", line 477, in single_gpu_train
    self.run_pretrain_routine(model)
  File "/path/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 704, in fit
    self.single_gpu_train(model)
  File "/path/train.py", line 152, in main_train
    trainer.fit(model)
  File "/path/train.py", line 66, in main
    main_train(model_class_pointer, hyperparams, logger)
  File "/path/train.py", line 161, in <module>
    main()
  File "/path/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/path/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/path/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/path/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/path/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
```

As the self.indices of the `subset` object is a simple python list.

Please refer to the forum post, where @ptrblck  approves reproducing the bug and offering a workaround.

cc @SsnL
Repository: pytorch
Issue: Reset a `torch.optim.Optimizer`
Labels: module: optimizer,triaged

## 🚀 Feature
A 'reset_state' method that resets the `state` of an optimizer. 

## Motivation
Sometimes we may need to reuse an optimizer to train the same model on another dataset. Some optimizers, though, keep track of some additional stats (e.g. Adam's moving averages), and currently, there is no method to reset these stats unless we expose some internal attributes of the class.

Check [this question](https://discuss.pytorch.org/t/reset-optimizer-stats/78516/2) in the forum for more info.

## Pitch

My proposal consists in adding a method `reset_state(self, state=None)`. If `state is None` is `True`, then we just reset the state, i.e. `self.state = defaultdict(dict)`, otherwise `self.state = state`

## Alternatives

Either you manually retrieve all the parameters of an optimizer and create a new one or you manually reset the `state` attribute. In both cases, we're exposing some internals of the optimizer.

cc @vincentqb
Repository: rust
Issue: Unhelpful error message, and endless loop in cargo, when a procedural macro overflows its stack
Labels: I-crash,C-enhancement,A-diagnostics,A-macros,T-compiler,D-confusing,D-papercut,D-verbose,D-terse,A-proc-macros

Using `rustc 1.44.0-nightly (b2e36e6c2 2020-04-22)` on Windows 10.

Create a proc-macro crate `crate0` with these contents:

	extern crate proc_macro;
	use proc_macro::TokenStream;

	#[proc_macro]
	pub fn overflow_stack(item: TokenStream) -> TokenStream {
	    fn recurse(i: u64) {
	    	if i < std::u64::MAX {
	    	    recurse(i + 1);
	    	}
	    }

	    recurse(0);
	    item
	}

And a binary crate `crate1` with these contents:

	#![feature(proc_macro_hygiene)]

	fn main() {
	    crate0::overflow_stack!();
	}

`cargo build` for `crate1` will produce this error message:

    thread 'rustc' has overflowed its stack
    error: could not compile `crate1`.
    
    Caused by:
      process didn't exit successfully: `rustc {...a long list of arguments follows...}`

When a stack-overflow bug is introduced into a procedural macro by making changes to one of the procedural macro's local dependencies, this error message is not helpful for localising the bug. (I experienced this today, and wasted some time thinking that I had triggered an ICE.)

I also experienced an endless loop in `cargo build` triggered by that same stack overflow, but I haven't been able to isolate a test-case.
Repository: go
Issue: cmd/compile: experiment with more integer comparison optimizations
Labels: Performance,NeedsInvestigation,compiler/runtime

In Go 1.15 we've added support for integer-in-range optimizations to the SSA backend. This same infrastructure (mostly in https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/fuse_comparisons.go) can quite easily be extended to perform other potential control flow transformations. I've opened this issue in order to track them and get more ideas.

Note: these transformations may or may not be worthwhile optimizations.

Disjunctions (||):

| Before | After | Comments | CL (if applicable) |
|-|-|-|-|
| `x == 1 \|\| x == 2` |  `uint(x - 1) <= 1` | Integer range | [CL 224878](https://golang.org/cl/224878)|
| `x == 4 \|\| x == 6` |  `x\|2 == 6` | Power of 2 difference | [CL 471815](https://golang.org/cl/471815) |
| `x != 0 \|\| y != 0` | `x\|y != 0` | Neq with 0 | |
| `x < 0 \|\| y < 0` | `x\|y < 0` | Less with 0 | |
| `x >= 0 \|\| y >= 0` | `x&y >= 0` | Geq with 0 | |

Conjunctions (&&):

| Before | After | Comments | CL (if applicable) |
|-|-|-|-|
| `x != 1 && x != 2` |  `uint(x - 1) > 1` | Integer range | [CL 224878](https://golang.org/cl/224878)|
| `x != 4 && x != 6` |  `x\|2 != 6` | Power of 2 difference | [CL 471815](https://golang.org/cl/471815) |
| `x == 0 && y == 0` | `x\|y == 0` | Eq with 0 | |
| `x < 0 && y < 0` | `x&y < 0` | Less with 0 | |
| `x >= 0 && y >= 0` | `x\|y >= 0` | Geq with 0 | |