sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Crossentropy inconsistent results depending on tensor order
Labels: module: nn,triaged,module: determinism

## 🐛 Bug

While implementing contrastive loss, I discovered that depending on the order of the elements in the input tensor, torch.nn.functional.cross_entropy may return different results. With large batch size, as used for contrastive loss, this difference may reach more than 1e-2.

## To Reproduce

Short example to see the behavior where both tensor contains the same elements but in different order (except element 0 which is the "True" element):
```
print(torch.nn.functional.cross_entropy(torch.Tensor([[-0.02199082262814044952392578125, 0.050022132694721221923828125, 0.00222884747199714183807373046875, -0.122285909950733184814453125, -0.055452823638916015625]]), torch.LongTensor([0])))

print(torch.nn.functional.cross_entropy(torch.Tensor([[-0.02199082262814044952392578125, -0.122285909950733184814453125, 0.050022132694721221923828125, -0.055452823638916015625, 0.00222884747199714183807373046875]]), torch.LongTensor([0])))
```
Result:
```
tensor(1.603590130805969238281250)
tensor(1.603590250015258789062500)
```
Here the difference is small (1e-7) but with larger batch size and larger size of the tensor, it may reach more than 1e-2 .

## Expected behavior

The value should not depend on the order of the element in the tensor (except for the "True" element) or at least should not reach so large values.

## Environment

 - PyTorch Version (e.g., 1.0): 1.5.0
 - OS (e.g., Linux): Ubuntu 18.04.4 LTS
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Python version: 3.8.2
 - CUDA/cuDNN version: Run on CPU
 - GPU models and configuration: Run on CPU
 - Any other relevant information:

## Additional context




cc @albanD @mruberry
Repository: neovim
Issue: lsp: synchronous omnifunc
Labels: enhancement,lsp,completion

I want to start discussion around LSP omnifunc. Last few days i'm trying to use it directly without any autocompletion frameworks (like CoC or deoplete), and I ran into an issue with omnifunc being (kinda) async. As far as I know, omnifunc should be always a sync call.

For example, I tried to create a simple fallback to default `<C-n>` completion if omnifunc doesn't return anything, but I cannot rely on the complete done event since it's triggered multiple times.

I also tried to use "mucomplete" to see if it manages to make it work with it's chain completion, but it just skips the omnifunc and continues down the chain, probably because initial trigger of omnifunc didn't return anything.

I think we should either make it sync, or expose another omnifunc function that will be sync, since my guess is that some people are ok with having it async.

I'd gladly do this myself, but my lua skills are really bad, especially around the async stuff.
Repository: angular
Issue: Make it possible to reason about content to project (content projection and content queries unification)
Labels: feature,area: core,core: queries,core: content projection,type: use-case,needs: discussion

There are multiple use-cases where one would like to reason about content provided to a component  (check if content was provided at all, count the number of items etc.). 

To make the discussion more concrete let's consider the following markup ([full runnable scenario](https://stackblitz.com/edit/angular-ivy-sumkgl?file=src%2Fapp%2Fapp.component.ts)):

```html
<my-container>
      <my-item></my-item>
      <my-item></my-item> 
      <my-item></my-item>
</my-container>
```

Given this markup the `<my-container>` component might want to answer the following questions:
* was content provided at all (existing, popular issue.:  #26083)
* how many items were provided (as of today this could be done through content queries only).

On top of this the `<my-container>` implementation might want to do the following (all the provided examples boil down to the ability of projecting items individually):
* wrap each item into some markup;
* project only 2 first items;
* project every second item (or items in 2 separate columns);
* etc. etc.

Achieving any of the use-cases listed above is very difficult in the current Angular and it steams from the fact that one can't reason (count, pick-up, check presence etc.) about individual items to project. 

While content queries can be used, to some degree, to reason about content items individually, the content queries approach has its problems as well:
* we end up with 2 mechanism operating on content (content queries and content projection) - those 2 mechanism have different APIs, different capabilities, need to be learnt separately etc.;
* there is a fundamental mismatch between 2 mechanism: content projection operates on "blocks" that can't be reason about (but capture content), while content queries are good with individual items but don't capture content (we can't insert result of a content query into the DOM).

This fundamental mismatch between content projection and content queries leads to many surprising situations and use-cases that can't be implemented really. Again, here is a "typical" example: https://stackblitz.com/edit/angular-ivy-sumkgl?file=src%2Fapp%2Fapp.component.ts

In short: content projection and content queries are good mechanisms while used separately, but as soon as we try to use both mechanisms together we start to bump into serious problems.

The idea behind opening this issue is to capture use-cases that are difficult to implement and expose problems where both content queries and content projection are used together. This should open ways to designing a more powerful content projection where it is possible to reason about and project content with one API. To set expectations: there are no immediate implementation plans, we want to capture use-cases and experiment with different APIs first.
Repository: create-react-app
Issue: Any plans to do nightly releases in the near future?
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
Not really related to a problem. In the last couple of months I have found myself in a situation where I was really interested in testing something that was merged in the master branch, but not yet released. Happened to me now with the [experimental support for fast refresh](https://github.com/facebook/create-react-app/pull/8582), also happened in the past with the [support for TS3.7](https://github.com/facebook/create-react-app/pull/7928) and [the ability to change webpack dev server host/port](https://github.com/facebook/create-react-app/pull/7750)

### Describe the solution you'd like

Some other libs in the community do alpha/beta or nightly releases to allow developers to play with the latest things merged to master. I created this issue after discussing this with @mrmckeb in [spectrum](https://spectrum.chat/create-react-app/general/how-can-i-use-the-master-branch-of-react-scripts-in-my-project~c304ec1d-1d1a-4b19-9c6c-8dd9e048f99c) 

### Describe alternatives you've considered

An easy alternative is to clone create-react-app and link react-scripts locally... but this process does not really scale when working with several developers in the same repo and all of them have to do the same on their own.

Other alternative was to try to build react-scrips locally and publish it github packages, then all my colleagues could just install that dependency from that registry instead... but being honest I couldn't make that work.
The same for trying to publish react-scripts to npm registry changing the name to something like @sbalay/react-scripts

### Additional context

I think that I'm not the only one interested in this, several people in the community follow the excellent work that you do in this repo day to day and are eager to test things and help out 🙂
Repository: flutter
Issue: [camera] Unable To Get High Quality/Full Frame Image & Camera Stretching Issue 
Labels: p: camera,package,team-ecosystem,has reproducible steps,P2,found in release: 2.0,found in release: 2.2,triaged-ecosystem

```console
I/CameraDeviceState(31088): Legacy camera service transitioning to state IDLE
I/RequestQueue(31088): Repeating capture request set.
W/LegacyRequestMapper(31088): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
W/LegacyRequestMapper(31088): Only received metering rectangles with weight 0.
W/LegacyRequestMapper(31088): Only received metering rectangles with weight 0.
I/CameraDeviceState(31088): Legacy camera service transitioning to state CAPTURING
I/RequestQueue(31088): Repeating capture request cancelled.
I/CameraDeviceState(31088): Legacy camera service transitioning to state IDLE
E/CameraDevice-0-LE(31088): Surface with size (w=1280, h=720) and format 0x22 is not valid, size not in valid set: [960x720, 864x480, 640x640, 800x480, 720x480, 768x432, 640x480, 480x640, 576x432, 640x360, 480x360, 480x320, 384x288, 352x288, 320x240, 240x320, 240x160, 176x144, 144x176, 160x120]
E/CameraDevice-0-LE(31088): submitRequestList - cannot use a surface that wasn't configured
I/flutter (31088): Instance of '_Timer'
I/ExoPlayerImpl(31088): Init 8b28888 [ExoPlayerLib/2.11.4] [ysl, Redmi Y2, Xiaomi, 28]
I/OMXClient(31088): IOmx service obtained
I/ACodec  (31088): codec does not support config priority (err -2147483648)
I/ACodec  (31088): codec does not support config priority (err -2147483648)
W/ExtendedACodec(31088): Failed to get extension for extradata parameter
E/MediaRecorder(31088): stop called in an invalid state: 8
```

<details> 
<summary>flutter doctor -v</summary> 

```console
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version
10.0.18363.592], locale en-IN)
    • Flutter version 1.17.1 at C:\src\flutter
    • Framework revision f7a6a7906b (2 weeks ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2


[√] Android toolchain - develop for Android devices (Android SDK version
29.0.3)
    • Android SDK at C:\Users\Khush\AppData\Local\Android\sdk
    • Platform android-R, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b04)

[√] Connected device (1 available)
    • GM1917 • 421ac9e • android-arm64 • Android 10 (API 29)

• No issues found!
```
	
</details>
Repository: vscode
Issue: [json] JSONSchema draft 2019-09 support
Labels: help wanted,feature-request,json

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

JSONSchema draft-07 is currently supported but `http://json-schema.org/draft/2019-09/schema#` does not currently load, or at least no completion or validation functionality is able to be provided from it.
Repository: go
Issue: proposal: net/http: Add NewDefaultTransport function
Labels: Proposal

We would like to be able to use the default options for `http.Transport` without modifying the global, or worrying about whether anyone has modified the transport, or having to typecast it to call `Clone`. I propose adding a `NewDefaultTransport() *Transport` function to the http package. It should return a new `Transport` with the default options filled out. The global definition then becomes `var DefaultTransport RoundTripper = NewDefaultTransport()`. Note that the function returns `*Transport` not `RoundTripper` so we don't have to typecast it.

```go
func NewDefaultTransport() *Transport {
    return &Transport{
        Proxy: ProxyFromEnvironment,
        DialContext: (&net.Dialer{
            Timeout:   30 * time.Second,
            KeepAlive: 30 * time.Second,
            DualStack: true,
        }).DialContext,
        ForceAttemptHTTP2:     true,
        MaxIdleConns:          100,
        IdleConnTimeout:       90 * time.Second,
        TLSHandshakeTimeout:   10 * time.Second,
        ExpectContinueTimeout: 1 * time.Second,
    }
}
```

This was previously discussed in #26013, but in that case people wanted to pull in modifications to the global that had been made, so the `Clone()` method was introduced.
Repository: TypeScript
Issue: strict boolean expressions compilerOption
Labels: Suggestion,In Discussion

## Search Terms

require strict boolean

## Suggestion

add yet another --strict check into compilerOptions, to only allow expressions that evaluate to Boolean for all conditional branching - `if`, `for`, `while`, `?:` ternary operator, etc

basically this TSLint rule, built into TS compiler
https://palantir.github.io/tslint/rules/strict-boolean-expressions/
## Use Cases

often people check the existence of function, before calling it:
 `if (somFunc) someFunc()`

or they think that function is actualy a property, and hence dont call it 

`if (someVal)... `. where it should have been `if (someVal()) ...`

if `if` required a strict boolean expression, both of the above would have been errors.

## Examples

instead above examples would be written:
`if (!!someFunc) someFunc()`

and for `someValue():boolean`

`if (someValue())..`
## Checklist

My suggestion meets these guidelines:

* [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. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: platformOverride/isWidgetCreationTracked service extensions do not respond until terminating
Labels: framework,dependency: dart,platform-web,P3,team-web,triaged-web

When running on web, these service extensions appear as loaded, but if I call them they seem to not respond (until I terminate the app, then they fail).

```
[2:44:25 PM] [Observatory] <== {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Isolate","event":{"type":"Event","kind":"ServiceExtensionAdded","timestamp":1590673465972,"isolate":{"type":"@Isolate","id":"1","number":"1","name":"main()"},"extensionRPC":"ext.flutter.platformOverride"}}}
[2:44:25 PM] [FlutterRun] ==> [{"id":"1","method":"app.callServiceExtension","params":{"appId":"905776b5-b381-41cd-9f12-b90cf284382a","methodName":"ext.flutter.platformOverride"}}]

// No response to calling ext.flutter.platformOverride...

// Until we terminate, and then it returns with "Service connection disposed"
[2:45:20 PM] [Observatory] Termination requested!
[2:45:20 PM] [FlutterRun] ==> [{"id":"5","method":"app.stop","params":{"appId":"905776b5-b381-41cd-9f12-b90cf284382a"}}]
[2:45:20 PM] [Observatory] <== {"jsonrpc":"2.0","method":"streamNotify","params":{"streamId":"Service","event":{"type":"Event","kind":"ServiceUnregistered","timestamp":1590673520454,"service":"hotRestart","method":"hotRestart"}}}
[2:45:20 PM] [FlutterRun] <== [{"id":"1","error":"ext.flutter.platformOverride: (-32000) Service connection disposed","trace":""}]
```

@jonahwilliams not sure if this is a Flutter or web issue. In VS Code we assume we can call these (because we see the load), and then end up showing errors in the debug console to the users during shutdown.
Repository: flutter
Issue: Combine past and future IAP purchases as one stream
Labels: c: new feature,p: in_app_purchase,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

# Use case

I would like to listen to a stream of both past and future purchases, so i always have the complete list of non-consumable purchases and active subscribtions.

I would like to do so, to know which purchases the user has made at startup, but also at a later time whilst using the app, if he decide to purchase a product.

My understanding now is that `queryPastPurchases` only return previous purchases using a `Future`, whilst `purchaseUpdatedStream` only receives updates for new purchases in a `Stream`.

## Proposal

I would like to propose a `Stream<List<PurchaseDetails>> purchases`, which output both purchases from `InAppPurchaseConnection.instance.queryPastPurchases`, in addition to any newer purchases from `InAppPurchaseConnection.instance.purchaseUpdatedStream`.

It's non-consumable purchases and active subscribtions, i'm interested in, not sure how consumable purchases would fit into this, but i think a separate stream for these would make sense.
Repository: react
Issue: exhaustive-deps: custom effects should support async functions
Labels: Type: Discussion,Component: ESLint Rules

We have a custom hook, `useAsyncEffect`, which works like `useEffect` except it accepts an async function. We would like to check the deps of this function using `exhaustive-deps`, but that lint rule is going a bit beyond its name and also checking the type of function we pass.

The `exhaustive-deps` rule can't know anything about the semantics of arbitrary third-party hooks, so I think it's overstepping its bounds a bit (at least if you take the name "exhaustive deps" literally)

React version: 16.13.1
eslint version: 7.0.0
eslint-plugin-react-hooks version: 4.0.3

## Steps To Reproduce

Source:

```
import React from 'react';
import { useAsyncEffect } from './utilities/react';

function MyComponent() {
  useAsyncEffect(async () => {
    await Promise.resolve()
  }, []);
  return <div />;
}
```

`.eslintrc.json`:

```
{
  "parserOptions": {
    "ecmaVersion": 2020,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "plugins": ["react-hooks"],
  "rules": {
    "react-hooks/exhaustive-deps": [
      "error",
      {
        "additionalHooks": "^useAsyncEffect$"
      }
    ]
  }
}
```

Then run:

```
node_modules/.bin/eslint --ext jsx src/file.jsx
```

## The current behavior

```
  5:18  error  Effect callbacks are synchronous to prevent race conditions. Put the async function inside:

<snip>

✖ 1 problem (1 error, 0 warnings)
```

## The expected behavior

There should be no lint error
Repository: PowerToys
Issue: Reset the settings
Labels: Idea-Enhancement,Product-Settings,Area-User Interface

# Summary of the new feature/enhancement
<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

Just wanna ask for the option to reset the PowerToys settings. After fiddling around with them too much, one could simply want to start over with the defaults.

This has two parts:
1) manually reset settings
2) remove settings from the system (register and "C:\Users\\%username%\AppData\Local\Microsoft\PowerToys") when uninstalling (not when updating)
Repository: godot
Issue: OS.execute() should work the same whether run within the editor or within an exported binary
Labels: discussion,topic:core

<!-- 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 using non-official build. -->
v3.2.stable.official

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 8.1

**Issue description:**
<!-- What happened, and what was expected. -->
OS.execute() has different behavior if the execute target is an exported Godot binary.

This was pointed out in issue (https://github.com/godotengine/godot-docs/issues/3593) which was determined to be a documentation issue (A.K.A "a feature").

This doesn't seem to make sense, OS.execute() should behave the same whether run within the editor or within an exported binary.

I've created an ugly work-around by using a Windows .bat file which then executes the target binary.

**Steps to reproduce:**
1) Unzip to a folder of your choosing.
2) Import osexec_child project into Godot.
3) Do a Windows export (note Embed PCK is checked). Verify ../osexec_bins/osexec_child.exe runs correctly when run from the command line.
4) Click Project/Exit to Project List.
5) Import osexec_parent project into Godot and run it in the editor (F5)
6) Clicking the button launches a second instance of oexec_parent, not ../osexec_bin/osexec_child.exe
7) Do a Windows export of osexec_parent (Embed PCK is checked)
8) Run ../osexec_bins/osexec_parent.exe from the command line
9) Clicking the button correctly launches osexec_child.exe

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[osexec_oddness.zip](https://github.com/godotengine/godot/files/4696664/osexec_oddness.zip)
Repository: go
Issue: net/http: Transport.Clone breaks HTTP/2
Labels: Documentation,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.10 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/tmp/.gocache"
GOENV="/Users/jrittner/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jrittner/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/jrittner/go1.13.10"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/jrittner/go1.13.10/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qz/jbyzqww512dfd00_vfwk74l4zy5gvy/T/go-build718180347=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

I set up an `http.Transport` with a non-nil, empty map for `TLSNextProto` in order to disable HTTP/2, as per the documentation.

https://golang.org/pkg/net/http/
> Programs that must disable HTTP/2 can do so by setting Transport.TLSNextProto (for clients) or Server.TLSNextProto (for servers) to a non-nil, empty map.

```go
 transport := http.DefaultTransport.(*http.Transport).Clone()
 transport.TLSNextProto = make(map[string]func(authority string, c *tls.Conn) http.RoundTripper)
 httpClient := &http.Client{
   Transport: transport,
 }
 resp, err := httpClient.Get("https://google.com")
 if err != nil {
   panic(err)
 }
 defer resp.Body.Close()
 fmt.Println("Response status:", resp.Status)
```

### What did you expect to see?

I expected it to do HTTP/1.1 over TLS.

### What did you see instead?

```
panic: Get https://google.com: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00d\x00\x04\x00\x10\x00\x00\x00\x06\x00\x00@\x00\x00\x00\x04\b\x00\x00\x00\x00\x00\x00\x0f\x00\x01\x00\x00\x1e\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01http2_handshake_failed"
```