sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Flip is much slower than advanced indexing
Labels: module: performance,triaged,module: viewing and reshaping

## 🐛 Bug

Flip is about 3x slower than advanced indexing, even though advanced indexing is a more general operation.
I have tested this on CPU and CUDA, and on pytorch 1.0 stable and pytorch-nightly.

## To Reproduce

```
import time
import torch

n = 1024
batch_size = 256
ntrials = 1000

x = torch.randn(batch_size, n)

start = time.perf_counter()
[x.flip(-1) for _ in range(ntrials)]
end = time.perf_counter()
print('Flip time (CPU): {}s'.format(end - start))

reverse_index = torch.arange(n - 1, -1, -1)
start = time.perf_counter()
[x[..., reverse_index] for _ in range(ntrials)]
end = time.perf_counter()
print('Advanced indexing time (CPU): {}s'.format(end - start))

x = x.to('cuda')
reverse_index = reverse_index.to('cuda')

torch.cuda.synchronize()
start = time.perf_counter()
[x.flip(-1) for _ in range(ntrials)]
torch.cuda.synchronize()
end = time.perf_counter()
print('Flip time (CUDA): {}s'.format(end - start))

start = time.perf_counter()
[x[..., reverse_index] for _ in range(ntrials)]
torch.cuda.synchronize()
end = time.perf_counter()
print('Advanced indexing time (CUDA): {}s'.format(end - start))
```

```
Flip time (CPU): 0.6906896363943815s
Advanced indexing time (CPU): 0.2781159598380327s
Flip time (CUDA): 0.1045754998922348s
Advanced indexing time (CUDA): 0.016148101538419724s
```

## Expected behavior

Flip should be faster or the same speed as advanced indexing. Right now I have to use advanced indexing for speed, which leads to less readable code.

## Environment

PyTorch version: 1.0.0.dev20190123
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.2 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB
Nvidia driver version: 390.42
cuDNN version: Probably one of the following:
/usr/local/cuda-8.0/lib64/libcudnn.so.6.0.21
/usr/local/cuda-8.0/lib64/libcudnn_static.a
/usr/local/cuda-9.0/lib64/libcudnn.so.7.0.4
/usr/local/cuda-9.0/lib64/libcudnn_static.a

Versions of relevant libraries:
[pip] Could not collect
[conda] blas                      1.0                         mkl
[conda] mkl                       2019.1                      144
[conda] mkl-service               1.1.2            py37he904b0f_5
[conda] mkl_fft                   1.0.6            py37hd81dba3_0
[conda] mkl_random                1.0.2            py37hd81dba3_0
[conda] pytorch                   1.0.0           py3.7_cuda9.0.176_cudnn7.4.1_1    pytorch
[conda] pytorch-nightly           1.0.0.dev20190123 py3.7_cuda9.0.176_cudnn7.4.1_0    pytorch
[conda] torchvision               0.2.1                      py_2    pytorch

cc @VitalyFedyunin @ngimel
Repository: godot
Issue: GI-Probe/Light Baking documentation lacks an important piece of info
Labels: enhancement,topic:core,topic:rendering,documentation

The fact I didn't know about this from reading the documentation prevented the use of GI-probes in my game until just today.

The piece of info lacking in the docs. is this. That being that GI-probes and baked lighting will **only** work if the nodes are in the first level of the scene tree.

So for instance having _Top Node > GI Probe_ will work, but having _Top Node > Probes > GI Probe_ will not. I don't know if this is by design or if it can be treated like a bug, but I imagine it would throw a lot of people off if they like to categorize their nodes.
Repository: TypeScript
Issue: typeof 'function' using with Exclude<T, Function>
Labels: Bug,Domain: Conditional Types,Domain: Control Flow

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.2.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** Generic typeof

**Code**

```ts
function f2<T>(v: Exclude<T, Function> | (() => T)): T {
    if (typeof v === 'function') {
        v = v() // error!
    }
    return v
}
```

**Expected behavior:**
No error, type v is just (() => T).

**Actual behavior:**
Line 3 report an error: Type '(() => T) | (Exclude<T, Function> & Function)' has no compatible call signatures.

**Playground Link:** https://www.typescriptlang.org/play/index.html#src=function%20f2%3CT%3E(v%3A%20Exclude%3CT%2C%20Function%3E%20%7C%20(()%20%3D%3E%20T))%3A%20T%20%7B%0D%0A%20%20%20%20if%20(typeof%20v%20%3D%3D%3D%20'function')%20%7B%0D%0A%20%20%20%20%20%20%20%20v%20%3D%20v()%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20return%20v%0D%0A%7D
Repository: rust
Issue: Memory-alignment declaration for struct only.
Labels: A-attributes,T-lang,C-feature-request

Memory alignment can be declared/annotated to  struct type declarations only

I would expect possibility to declare memory-alignment for struct-members and local variables as well.
Repository: pytorch
Issue: How to retrain the modelzoo model in Caffe2? 
Labels: caffe2

## 📚 Documentation
Is there any update/documentation on how to retrain (transfer learning) a pertained model from modelzoo with custom dataset in Caffe2?
I want to use Mask R-CNN2Go model from modelzoo and retrain it with my own dataset, however I don't see any documentation or tutorial on this topic.
Can somebody please point me in right direction?
Repository: react-native
Issue: Cookie based authentication issues aggregation
Labels: Help Wanted :octocat:,📮Known Issues,Bug

## Environment
[skip envinfo]

## Reproducible Demo
Provided in corresponding issues

## Description
Issues closed while still open. Cookie based authentication is at this moment not usable. This is partially due to the following issues:

- https://github.com/facebook/react-native/issues/23005 //TL;DR can only ever work with one cookie on Android
- https://github.com/facebook/react-native/issues/929 //TL;DR redirect: 'manual' doesnt work

These issues have been closed even though they are still open and very relevant.
There's more around cookies/fetch that i will try to hunt down in the following days. E.g one of the two platforms, i believe iOS , wont store cookies after app restart.

## Conclusion
In general cookie based authentication is very problematic on multiple levels. If cookie based authentication is ~~claimed~~ implied to be supported on React Native and developers unknowingly structure their architecture around this these issues need attention. Otherwise people need to know before implementing a project using such an authentication mechanism as dozens of hours could be spend working on an architecture that is inevitably simply not supported.

This is not a matter of pointing fingers or demanding features. It is currently unfortunately misleading to   leave people unaware of all these limitations as they might set out to create an architecture that's unsupported as i have.

At the very least maybe we should revise the documentation of `fetch` and explain how some things like "redirect:manual" dont work right now.
Repository: TypeScript
Issue: Error: Debug Failure getDisplayName for babel project while getting program.getTypeChecker()
Labels: Bug,API,Crash

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** : "typescript": "^3.0.3"

**Search Terms**:
getTypeChecker()
Error: Debug Failure
Object.assertDefined
getDisplayName
bable

**Code**
```
var options: ts.CompilerOptions = {
                noEmitOnError: true
                , strict: true
                , target: ts.ScriptTarget.Latest
                , module: ts.ModuleKind.CommonJS
                , skipLibCheck: true
                , experimentalDecorators: true
                , emitDecoratorMetadata : true
                , allowJs: true
                , noErrorTruncation : false
              };
        
            var compilerHost = ts.createCompilerHost(options);
            this.program = ts.createProgram(this.sourceFilesToParse, options, compilerHost);
            this.typeChecker = this.program.getTypeChecker();
```

**Expected behavior:**
Typecheker should return successfully without throwing the above exception.

**Actual behavior:**
When we give https://github.com/rolftimmermans/babel.git as input code (for this.sourceFilesToParse in the above code), we get following exception while creating the type checker object using this.program.getTypeChecker().

```
"Error: Debug Failure.
    at Object.assertDefined (..\node_modules\typescript\lib\typescript.js:1469:24)
    at getDisplayName (..\node_modules\typescript\lib\typescript.js:27251:129)
    at addError (..\node_modules\typescript\lib\typescript.js:27349:150)
    at Object.forEach (..\node_modules\typescript\lib\typescript.js:210:30)
    at declareSymbol (..\node_modules\typescript\lib\typescript.js:27351:28)
    at declareModuleMember (..\node_modules\typescript\lib\typescript.js:27370:28)
    at declareSourceFileMember (..\node_modules\typescript\lib\typescript.js:28414:19)
    at declareSymbolAndAddToSymbolTable (..\node_modules\typescript\lib\typescript.js:28362:28)
    at bindWorker (..\node_modules\typescript\lib\typescript.js:29021:28)
    at bind (..\node_modules\typescript\lib\typescript.js:28781:13)"
```

Note: The same program works well with other sample projects.
Repository: godot
Issue: InputEventMouseButton.factor is always positive
Labels: documentation,topic:input

**Godot version:** 70689eb

**OS/device including version:** Ubuntu

**Issue description:** While implementing a zooming camera I realized that `InputEventMouseButton.factor` is always either 0 or a positive number. It would make sense that the number is negative if you scroll down (or up).


**Steps to reproduce:**
```
extends Node

func _unhandled_input(event : InputEvent) -> void:
	if event is InputEventMouseButton:
		print(event.factor)
```
Repository: terminal
Issue: Visual Studio Code + zsh + ConPTY = input issues
Labels: Work-Item,Needs-Repro,Area-Performance,Product-Conpty,Area-Input,Issue-Bug

I was sent here via https://github.com/Microsoft/vscode/issues/67227

* Your Windows build number:
Microsoft Windows [Version 10.0.18323.1000]

* What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
I type in the VS Code integrated terminal. Always at the second letter after the prompt, the cursor seems to jump momentarily. Sometimes single characters of my input aren't processed, but I couldn't reproduce this when trying to take a video. However, it is definitely related to the jumping/flickering.

Looks like this:

![flicker](https://user-images.githubusercontent.com/58270/51853431-93fce800-2328-11e9-9991-08a23e70de85.gif)

NB: I can only reproduce this issue with zsh (version 5.4.2 (x86_64-pc-msys)), not with PowerShell nor bash.

@Tyriar pointed me at the `terminal.integrated.windowsEnableConpty` option. With that option disabled, the problem is gone.

* What's wrong / what should be happening instead:

The cursor shouldn't flicker/jump, all input should be processed, the same way as when ConPTY is disabled. Like this:

![noflicker](https://user-images.githubusercontent.com/58270/51853440-98290580-2328-11e9-8f46-76300770fb42.gif)
Repository: kubernetes
Issue: Long running request definition in the kube-aggregator
Labels: kind/bug,priority/important-soon,sig/api-machinery,lifecycle/frozen

Kube-API server has a set of long-running pattern check defined [here](https://github.com/kubernetes/kubernetes/blob/8b98e802eddb9f478ff7d991a2f72f60c165388a/cmd/kube-apiserver/app/server.go#L408-L411) that are applied to the operations taking longer than the default timeout of 60 seconds. 
Unfortunately, our kube-aggregator has hard-coded the same configuration [here](https://github.com/kubernetes/kubernetes/blob/8b98e802eddb9f478ff7d991a2f72f60c165388a/staging/src/k8s.io/kube-aggregator/pkg/cmd/server/start.go#L127-L130) which makes it impossible for other API servers to define their own endpoints that will allow long running requests.

There are several possible solutions that I can think of at this point in time:
1. kube-aggregator will always just passes through and does not define long-running checks at all. The downside of this approach is that we always rely on the remote API server to behave properly and does not provide the safety net we currently have.
2. kube-aggregator is notified about long-running endpoints from remote API servers. This leaves the safety net I've mentioned before, at the cost of additional complexity which defines long-running requests endpoints.

@kubernetes/sig-api-machinery-feature-requests 
@deads2k @sttts
Repository: TypeScript
Issue: getTrailingCommentRanges returns comments at the start of the file
Labels: Suggestion,In Discussion,API

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  master

**Code:**

```ts
// one
// two
```

**Expected behavior:**

`ts.getTrailingCommentRanges(text, 0)` doesn't return a comment.
Both comments are parsed by `ts.getLeadingCommentRanges(text, 0)`.

**Actual behavior:**

`ts.getTrailingCommentRanges(text, 0)` parses `// one` as a trailing comment.
`ts.getLeadingCommentRanges(text, 0)` parses both comments.

The special handling of position 0 should also affect trailing comments.
With the current behavior I have to remember to not parse trailing comment ranges at position 0 to avoid duplicates.

**Related Issues:**
This was part of https://github.com/Microsoft/TypeScript/pull/28489 where I first proposed changing this behavior.

/cc @rbuckton
Repository: kubernetes
Issue: Tracking Issue - Conformance Coverage for Networking
Labels: sig/network,kind/feature,help wanted,sig/testing,area/conformance,lifecycle/rotten

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:
This is a place holder to track Conformance Coverage on the Topic.
This issue should remain open until all related work is accomplished in the k/k repo
This issue will contain analysis of the coverage. Existing tests and additional tests requested with links to those issues/PR's

**Why is this needed**:
Specifically address CNI networking, identify tests that tests pod-pod communication

/area conformance
Repository: flutter
Issue: webview_flutter v0.3.0 - Multiple flashes on the page before webview loads.
Labels: c: performance,p: webview,package,team-ecosystem,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,triaged-ecosystem

## Steps to Reproduce

I created multiple projects testing this issue. In every page that has a `webview_flutter` when you load the page it shows quick and multiple flashes on the screen. On the iOS Simulator and Android emulator most of the time you do not see the flashes. But if you run it on a device they are very clear especially on the `AppBar` and any `bottomNavigationBar`
 
1. Create a page with body property set to the `WebView()`
2. I installed it on the iOS iPhone 6 Plus device with `flutter run --release`
3. As application starts or when you change a page with a `WebView()` the screen flashes quickly at load time. You can really see the effects on the `AppBar` and `bottomNavigationBar`.

If you need a video of the flashes please let me know.

```dart
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: WebView(
        initialUrl: 'https://flutter.io/',
        javascriptMode: JavascriptMode.unrestricted,
        onWebViewCreated: (WebViewController webViewController) {
          if (!_controller.isCompleted) {
            _controller.complete(webViewController);
          }
        },
      ),
    );
  }
```
## Logs
<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.3 18D42, locale en-US)
    • Flutter version 1.0.0 at /Users/name/Development/flutter
    • Framework revision 5391447fae (9 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/marco/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.2

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (1 available)
    • iPhone • gc713353tevh533h3co3729ac46e9k37j34h3bw1 • ios • iOS 12.1.2

• No issues found!
```
Repository: rust
Issue: Failure to clean up incremental compilation artifacts should not be a hard error
Labels: T-compiler,A-incr-comp

```
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/home/manishearth/mozilla/servo/target/debug/incremental/script-23kpbvowy6y9i/s-f8z0p73x3w-17kitl0-working/dep-graph.bin`: No such file or directory (os error 2).

```

This is basically rustc attempting to delete a file that no longer exists. This breaks the build, perhaps it should be a warning instead?

(I think you can get this kind of error if you keep around target dirs post rustup.)
Repository: rust
Issue: Defining scope of `existential type` defined by associated type
Labels: A-type-system,A-trait-system,A-associated-items,T-lang,A-impl-trait,F-type_alias_impl_trait,requires-nightly,T-types

So, during our discussion earlier today, @nikomatsakis brought up this interesting example of code that should really compile, we think:

```rust
existential type X: Sized;

trait Foo {
    type Bar: Iterator<Item = Self::_0>;
    type _0;
}

impl Foo for () {
    type Bar = std::vec::IntoIter<u32>;
    type _0 = X;    
}
```

Error:
```
error: could not find defining uses
 --> src/main.rs:3:1
  |
3 | existential type X: Sized;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^
```

[Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=58b0d50d78a09e5fb79c7dc99e4ff6c8)

It seems that `type _0 = X;` isn't being considered as a "defining use", even though it clearly does constrain `X`. The question is, what sort of changes do we need for this to work? (I'm pretty sure it should work.) Do we need Chalk perhaps?

CC @nikomatsakis @cramertj @scalexm
Repository: go
Issue: cmd/go: add option to prevent 'go get -u' from updating certain dependencies
Labels: NeedsInvestigation,FeatureRequest,GoCommand,modules

We should provide a way for users to prevent `go get -u` from updating certain dependencies unless they're explicitly requested.

There are a number of reasons users may need to pin a module dependency to a lower version. For example:

1. The dependency has a breaking change, which is allowed in `v0` versions.
2. There is a cyclic dependency involving the main module, and care must be taken to keep the cycle at specific versions. This is especially important when one module is a prefix of the other, and we want to avoid ambiguous imports as packages are moved between.
3. The dependency adds many more transitive dependencies that are not needed which may need to be downloaded.
4. The dependency has new functionality which is not used and adds significant overhead.

When a user has a dependency that requires special care to update, `go get -u` is not safe to use on its own. Instead, one needs to build a list of all requirements, exclude modules that shouldn't be updated, then pass that list to `go get -u`. This is cumbersome.

Some ideas for improvements:

* An `-except` or `-exclude` flag, allowing users to specify modules that shouldn't be updated.
* A comment or annotation in `go.mod` that tells `go get -u` not to update a module unless it's specifically named on the command line.

This is somewhat related to #28424.
Repository: opencv
Issue: fully connected layer::weightsMat clone missing
Labels: category: dnn

I faced a bug in fully connected layer that I could only resolve it by cloning the weightsMat:

https://github.com/opencv/opencv/blob/a65ccc06039d7e69d48bdad09f6afc45c3f37304/modules/dnn/src/layers/fully_connected_layer.cpp#L83

`weightsMat = blobs[0] = blobs[0].reshape(1, numOutput).clone();`

I noticed there exists the same pattern in cloning of weights mat in convolution layer:

https://github.com/opencv/opencv/blob/a65ccc06039d7e69d48bdad09f6afc45c3f37304/modules/dnn/src/layers/convolution_layer.cpp#L284

I wonder if cloning of weightsMat in fully connected layer is missing or not.