sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Why the same training code running on different GPUs (V100 vs P100) brings a significiant difference in outputs and thus train loss / model accuracy?
Labels: triaged,module: determinism

## ❓ Questions and Help

## Why running the same training code on different GPUs (V100 vs P100) brings a significiant difference in outputs ($outputs=model(inputs)$) and thus different train loss / model accuracy?

I run a resnet50 model on cifar10 dataset for only one mini-batch and print out the parameters, inputs, and outputs.

I use the script below for running on a single-GPU. And execute this script on V100 GPU and P100 GPU individually.

```python
CUDA_VISIBLE_DEVICES=0 python -u main.py -e 1 --batch-size 64 -m resnet50 --datatype float32
CUDA_VISIBLE_DEVICES=0 python -u main.py -e 1 --batch-size 64 -m resnet50 --datatype float64
```

I have refered to [https://pytorch.org/docs/stable/notes/randomness.html](https://pytorch.org/docs/stable/notes/randomness.html) for determinastic and reproducible results.
* The results (including train loss, outputs) of the same GPU can be reproduced deterministically. The dumped parameters, inputs, outputs, gradients are all bitwise-identical. (we print out 20 decimal digits of each number, by setting *torch.set_printoptions(profile="full")* )

**However, the results on V100 and P100 (both in float32 and float64 precision) are different.** Specifically, take the first mini-batch for example, their parameters (model.named_parameters()), inputs (batched images) are exactly bitwise-identical, but the outputs (outputs = model(inputs)) are totally different. 
According to IEEE 754 standard, the floating-point operation in float32 should have 6 significant decimal digits precision at least. While the outputs of V100 and P100 only share 2\~5 identical decimal digits. Similarly, the floating-point operation in float64 should have 15 significant decimal digits precision at least. While the outputs of V100 and P100 only share 11\~14 identical decimal digits.

The outputs of the first mini-batch on V100 and P100.

Figure 1. float32
![issue_f32](https://user-images.githubusercontent.com/10664789/118618249-004fce00-b7f6-11eb-9116-81faab715dee.jpg)

Figure 2. float64
![issue_f64](https://user-images.githubusercontent.com/10664789/118618315-1198da80-b7f6-11eb-8130-2371642797ad.jpg)


All the experiments are conducted on an 1 GPU (V100, P100) cloud server (CentOS 7, Driver 450.80.02, Docker 20.10.6, Nvidia Docker 2.5.0) using the official pytorch 180 docker (pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel).

As the results differ when running on different types of GPUs, I guess the difference may come from the different order of floating-point operations. Which kind of reproducibility is guaranteed by PyTorch?
I am so confused and ask for help here. 

For your convenience, all the code and logs are attached. [resnet50_cifar10_reproduce.tar.gz](https://drive.google.com/file/d/1Sbc767DcM566RI66lTq_2qpCIE2jq2yG/view?usp=sharing)

Thanks!

Mingzhen

cc @mruberry @kurtamohler
Repository: material-ui
Issue: [Select] Allow adding non-option children
Labels: new feature,waiting for 👍,component: select

Many of our first-time users get confused by multi-selects, as they don't often quickly understand that they need to click outside of the select menu to close it so they can continue filling in their form. This makes onboarding new users with multi-selects a bit uncomfortable.

We'd like to add a visible button to the Menu that lets them close it, however it seems like this isn't trivial to do, as all the children of the Menu trigger the `handleItemClick` function, adding `undefined` to the array of values.

Here's an example of what I'm trying to achieve, another option would be to have an IconButton top-right that's clickable for example:
https://codesandbox.io/s/dry-wind-jdfbe

<img width="334" alt="Screenshot 2021-05-18 at 10 26 11" src="https://user-images.githubusercontent.com/10428082/118618027-7e46b180-b7c3-11eb-8123-2b5adbc84755.png">

As you can see in the demo, the "Close" label is added to the values array as undefined.

- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.
Repository: javascript
Issue: no-restricted-syntax for...of warning potentially confusing
Labels: pull request wanted

The warning about using for...of states that regenerator-runtime is required:

> iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.

The explanation creates the impression regenerator-runtime is essential for any code using for...of, which is no longer true, as [for...of seems to be fairly widely supported](https://caniuse.com/?search=for-of).

I think it could make sense to reword the explanation to state that regenerator _may_ be required and that imperative loops should be avoided.
Repository: vscode
Issue: Invalid syntax in web worker
Labels: bug,monaco-editor

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: Monaco
- OS Version: na

Steps to Reproduce:

1. Transpile the editor worker
2. Observe invalid export from code (workers cannot export things)

Issue for: https://github.com/microsoft/vscode/pull/123739
-------
This PR fixes an issue I've been having with Monaco, where loading the editor would throw an error about tap level exports not allowed.
I was less worried about this, but I recently added error tracking to my site, and figured if the fix is easy, I may as well fix it 🙃 

Details: 
 - This is how I prepare the workers for use in Monaco, using ESBuild: https://github.com/NullVoxPopuli/limber/blob/main/packages/monaco/build.js#L33
    - I'm using `esm` as a target, but it shouldn't matter as `bundle: true` is set (so everything is one file)
 - Compiled file deployed here: https://limber.glimdown.com/monaco/editor/editor.worker.js
    - problem: ![image](https://user-images.githubusercontent.com/199018/118122494-ef9bf400-b3c0-11eb-8e9f-2243e115e1ae.png)
Repository: terminal
Issue: Explorer background context menu option missing
Labels: Help Wanted,Needs-Repro,Issue-Bug,Needs-Attention,Product-Terminal,Area-ShellExtension

### Windows Terminal version (or Windows build number)

1.7.1033.0

### Other Software

Windows 10, 20H2 (19042.985)

### Steps to reproduce

Right-click on background of folder in Windows Explorer.

### Expected Behavior

An _Open in Windows Terminal_ option to be available, like on other computers:

![image](https://user-images.githubusercontent.com/1290262/118640317-1ef39c00-b7d9-11eb-96ee-812aeed62ec9.png)



### Actual Behavior

Missing option to _Open in Windows Terminal_:

![image](https://user-images.githubusercontent.com/1290262/118640429-3f235b00-b7d9-11eb-885e-1340ce4dc1ba.png)

I _DO_ however get the context menu option when right-clicking on a folder:

![image](https://user-images.githubusercontent.com/1290262/118640623-798cf800-b7d9-11eb-81dd-c8dfd638b51d.png)

I have tried uninstalling and re-installing the app from the Microsoft Store and while it will remove and re-add the folder context-menu, the background context-menu does not get added.
Repository: TypeScript
Issue: tsc --init --target es2015 generates es6 tsconfig.json
Labels: Suggestion,Experience Enhancement

# Bug Report

When running `tsc --init --target es2015`, the generated target is `es6`.

```
{
  "compilerOptions": {
    /* Visit https://aka.ms/tsconfig.json to read more about this file */

    /* Basic Options */
    // "incremental": true,                         /* Enable incremental compilation */
    "target": "es6"                                 /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
}
```

This is unfortunate as the generated file looks as if it was having an invalid option.

### 🔎 Search Terms

tsc init es2015 es6

### 🕗 Version & Regression Information

I'm using tsc 4.2.4, and replicated with tsc 4.4.0-dev.20210518

- I was unable to test this on prior versions because I don't think this is an actual regression. I found b871b5353c8a9ca6dedd6bc84706fd75ed86bae4, and I suspect that this is a left-over.

### 🙁 Actual behavior

```
{
  "compilerOptions": {
    "target": "es6"                                 /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
}
```


### 🙂 Expected behavior


```
{
  "compilerOptions": {
    "target": "es2015"                                 /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
}
```
Repository: ant-design
Issue: Table, numbers indicating the order in multiple sorting
Labels: help wanted,💡 Feature Request,Inactive

- [X] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
When a table is being sorted by different columns, it would be nice for the user to remember the order in which the sorts were applied.

### What does the proposed API look like?
Some flag in the table component called includeSortOrder or similar which defaults to false to maintain current behavior.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: create-react-app
Issue: PostCSS
Labels: stale

Could you please investigate this issue...

npx create-react-app [APP NAME]

OR 

from existing package.json
npm install 

Produces error...

Moderate:  Regular Expression Denial of Service
Package: postcss 
PatchedIn: >=8.2.10
Dependency: react-scripts
Path: react-scripts > css-loader > icss-utils > postcss


Seems like an update to postcss is required

Thanks Team
Repository: go
Issue: crypto/rsa: allow hash.Hash for PSS and MGF1 to be specified independently
Labels: NeedsInvestigation,FeatureRequest

I've checked https://github.com/golang/go/issues/19974.
And, I am aware of comment  https://github.com/golang/go/issues/19974#issuecomment-530862973.

SignPSS/VerifyPSS have almost the same problem as that issue.
I wanted to call SignPSS using RSASSA-PSS with SHA-256 with MGF1SHA1 because  server which is hosted by third party needs that, but I couldn't. 

It seems good to  simply add option `MGF1Hash` to PSSOptions.  It is not invasing, and keep backwards compatibility.

If there are no counter-proposals,  I' ll create a patch.

```
// PSSOptions contains options for creating and verifying PSS signatures.
type PSSOptions struct {
	SaltLength int
	Hash crypto.Hash
        // ADD OPTION HERE
	// MGF1Hash is the hash function used for MGF1 . 
        // If zero,  hash function used to generate the message digest will be used.
	MGF1Hash  crypto.Hash
}

```
Repository: create-react-app
Issue: React Js making API calls in production build
Labels: needs triage

Hi,
I am new to ReactJS I have created and processed React app in development mode allows for successful communication with my API by Proxying API Requests from package.json.

But when I create a production build for my React app and process it using serve -s build communication with my API is unsuccessful and fails while Proxying API Requests from package.json.

I have used AXIOS to make API calls

My question is, why isn't the API loading in production /build?

If proxying doesn't work in production build how should I make API calls?

When I try to give the full URL in the AXIOS CORS error occurs 

Can someone point me in the right direction?
Repository: pytorch
Issue: Make SavedVariables aware of pyobjects
Labels: module: autograd,triaged

Currently SavedVariable's goal is to avoid a reference cycle in c++ when a Tensor is saved by a Node and is an output of this Node as well.
In particular, the cycle is `Tensor.autograd_meta.grad_fn_` that points to the Node and the Node will point back to the Tensor (usually via a custom field in a subclass for Node that are codegened).

While such cycle are unrecoverable from the c++ side, python has a garbage collector that can detect and clear up such cycles if all the python bindings are properly managed.

In this context, we should be able, when there is a `pyobj` associated with a given Tensor to save that Tensor as-is even if that would create a cycle as the python garbage collector will be able to clear out such cycles.

The goal is to have a similar effect as https://github.com/pytorch/pytorch/pull/58271 but without removing the use of saved variables.

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano
Repository: rust
Issue: Random test ordering for cargo test
Labels: T-libs-api,C-feature-request,A-libtest

<!-- Thanks for filing a 🙋 feature request 😄! -->

**Describe the problem you are trying to solve**
Sometimes tests depend on each other and one of the possible counter measures is to shuffle the order in which tests are run.

**Describe the solution you'd like**
I would like `cargo test` to take a `--random` flag, which would shuffle the test order. Ideally it would generate and print the seed used (a u64 integer). This could be used to debug situations, maybe with a corresponding `--random-seed <seed>` parameter (which would imply `--random`).

**Notes**
I had a look at the codebase and I think I identified the place where the sorting currently happens (https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_test.rs#L67). I'd be happy to try to contribute a PR.
Repository: pytorch
Issue: Inter-category type promotion has undocumented behavior
Labels: module: docs,triaged,module: type promotion

## TL;DR

I've reported this initially as bug, but it turned out to be more of documentation issue. I'll leave my original comment below. 

---

## 🐛 Bug

Type promotion is broken for binary ops with uint8 in some edge cases.

## To Reproduce

```python
import torch

a = torch.tensor([0], dtype=torch.uint8)
b = torch.tensor(0)

for dtype in (torch.int16, torch.int32, torch.int64):
    print(
        f"{torch.add(a, b.to(dtype)).dtype} "
        f"vs. "
        f"{torch.promote_types(torch.uint8, dtype)}"
    )
```

```
torch.uint8 vs. torch.int16
torch.uint8 vs. torch.int32
torch.uint8 vs. torch.int64
```

- There is nothing special about `torch.add`. The same happens for `torch.mul`. I haven't checked more operators.
- This only happens if the `uint8` tensor **is not scalar** and the other tensor **is scalar**.

## Expected behavior

Behavior should follow `torch.promote_types()`.

## Environment

```
PyTorch version: 1.9.0.dev20210517
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Arch Linux (x86_64)
GCC version: (GCC) 10.2.0
Clang version: Could not collect
CMake version: version 3.20.2

Python version: 3.9 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: 11.1.105
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080
Nvidia driver version: 465.27
cuDNN version: Probably one of the following:
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_adv_infer.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_adv_train.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_cnn_infer.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_cnn_train.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_ops_infer.so.8.1.1
/usr/local/cudnn-8.1.1-cuda-11/lib64/libcudnn_ops_train.so.8.1.1
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.1
[pip3] torch==1.9.0.dev20210517
[conda] blas                      1.0                         mkl  
[conda] cpuonly                   1.0                           0    pytorch-nightly
[conda] mkl                       2021.2.0           h06a4308_296  
[conda] mkl-service               2.3.0            py39h27cfd23_1  
[conda] mkl_fft                   1.3.0            py39h42c9631_2  
[conda] mkl_random                1.2.1            py39ha9443f7_2  
[conda] numpy                     1.20.1           py39h93e21f0_0  
[conda] numpy-base                1.20.1           py39h7d8b39e_0  
[conda] pytorch                   1.9.0.dev20210517     py3.9_cpu_0  [cpuonly]  pytorch-nightly
```

cc @brianjo @mruberry @nairbv
Repository: flutter
Issue: Use FutureOr instead of SynchronousFuture
Labels: framework,a: quality,c: proposal,P3,team-framework,triaged-framework

## Use case

The [docs for SynchronousFuture](https://api.flutter.dev/flutter/foundation/SynchronousFuture-class.html) warn that it should only be used when "you want to expose a single API, where you normally want to have everything execute synchronously, but where on rare occasions you want the ability to switch to an asynchronous model". This sounds like the framework should be using FutureOr instead.

## Proposal

Deprecate SynchronousFuture, and use FutureOr wherever it is recommended that a SynchronousFuture be used. This would allow uses to implement functions like [setNewRoutePath](https://master-api.flutter.dev/flutter/widgets/RouterDelegate/setNewRoutePath.html) using the `async` keyword or with a normal function.

## Example

```dart
class BookRouteInformationParser extends RouteInformationParser<RouteData> {
  @override
  Future<RouteData> parseRouteInformation(
    RouteInformation routeInformation,
  ) {
    return SynchronousFuture(RouteData());
  }1
  // ...
}
```

becomes:

```dart
class BookRouteInformationParser extends RouteInformationParser<RouteData> {
  @override
  FutureOr<RouteData> parseRouteInformation(
    RouteInformation routeInformation,
  ) {
    return RouteData();
  }
  // ...
}
```

See also: https://github.com/dart-lang/sdk/issues/46060
Repository: rust
Issue: docs not loading properly in Safari unless Develop Menu is enabled
Labels: T-rustdoc,P-medium,C-bug,A-rustdoc-ui

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

## Setup

Command issued: `cargo doc --open`
Safari version: 14.1
MacOS: BigSur 11.3.1

rustup version: 1.24.2
rustc version: 1.52.1

I expected to see the crate's documentation being displayed and formatted properly.

Instead, this happened:
<img width="1417" alt="Screenshot 2021-05-18 at 19 58 29" src="https://user-images.githubusercontent.com/54247008/118701386-f2a94100-b813-11eb-8874-1a1e0b039643.png">

This is **not** by any means a problem of ndarray, I'm experiencing this with all the crates I've tried so far.
Repository: create-react-app
Issue: macOS Big Sur 11.3.1  crashing while running create-react-app
Labels: stale,needs triage,issue: bug report

<!--
    Please note that your issue will be fixed much faster if you spend about
    half an hour preparing it, including the exact reproduction steps and a demo.

    If you're in a hurry or don't feel confident, it's fine to report bugs with
    less details, but this makes it less likely they'll get fixed soon.

    In either case, please use this template and fill in as many fields below as you can.

    Note that we don't provide help for webpack questions after ejecting.
    You can find webpack docs at https://webpack.js.org/.
-->

### Describe the bug

I installed node (16.1.0) and npm (7.11.2) with nvm (0.38.0), and proceded to create a waeb app with React using the command

```bash
npx create-react-app test-app
```

However, during the installation of the required packages, my computer simply crashes, and restarts. There is no error message. The computer crashes and restarts.

I am using an iMac 2017, with the following specifications:
Processor: 3,4 GHz Quad-Core Intel Core i5
Memory: 8 GB 2400 MHz DDR4

I'm fairly new to web dev. And this is my first react project.
Repository: godot
Issue: Scaled Control's hint tooltip keeps changing it's scale when it's updated on mouse movement
Labels: bug,topic:gui

**Godot version:**
3.3-stable.


**OS/device including version:**
Windows 10, Nvidia GTX 750 Ti


**Issue description:**
While working on goostengine/goost#80, I've stumbled upon an issue that when a control is scaled down and the tooltip is updated on mouse motion to display grid units, this results in inconsistent behavior:

![image](https://user-images.githubusercontent.com/17108460/118707406-2a6bb500-b823-11eb-891b-b1a557d92834.png)

![image](https://user-images.githubusercontent.com/17108460/118707640-7159aa80-b823-11eb-8985-139da61e9ee9.png)

```gdscript
extends ColorRect

func _gui_input(event):
	if event is InputEventMouseMotion:
		hint_tooltip = str(get_local_mouse_position())
```

Moving the mouse makes the tooltip unscaled and then scaled down, and then unscaled again, and this pattern keeps repeating on any mouse movement.

The tooltip should be either scaled down at all times, or unscaled at all times (for the use case of displaying grid units, I'd expect it to be unscaled, to be honest).

This issue seems to be related to #37140.


**Steps to reproduce:**
1. Create a `ColorRect` node and resize it.
2. Change `rect_scale` property to `Vector2(0.5, 0.5)` in the inspector.
3. Run the scene.
4. Hover mouse over the rect. You'll see the tooltip scaled down (expected according to #37140?)
5. Move mouse slightly away. The tooltip is going to appear again, but unscaled.


**Minimal reproduction project:**
[tooltip_changes_scale_on_update.zip](https://github.com/godotengine/godot/files/6503629/tooltip_changes_scale_on_update.zip)
Repository: go
Issue: x/pkgsite: surface VCS clone path from the go-import meta tag
Labels: NeedsDecision,pkgsite

Take golang.org/x/mod, for example:

```
$ curl https://golang.org/x/mod
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="golang.org/x/mod git https://go.googlesource.com/mod">
<meta name="go-source" content="golang.org/x/mod https://github.com/golang/mod/ https://github.com/golang/mod/tree/master{/dir} https://github.com/golang/mod/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/golang.org/x/mod">
</head>
<body>
<a href="https://pkg.go.dev/golang.org/x/mod">Redirecting to documentation...</a>
</body>
</html>
```

If I go to https://pkg.go.dev/golang.org/x/mod, the only link I see is https://github.com/golang/mod, which is fine for browsing the source - but not for `git clone`, as github is just a mirror. I should be using `https://go.googlesource.com/mod` for that, but pkgsite doesn't make that evident.

I get that perhaps this is an internal detail that most people shouldn't need to be aware of, but it's still relevant for peoplel wishing to contribute to a module. Especially for the x repos hosted by Gerrit - I seem to recall that you have to clone from the right URL for `git-codereview` to work properly.