sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [discussion] In-place gradient (grad_input) computation for better memory utilisation
Labels: module: autograd,module: memory usage,triaged,needs research

grad_input can sometimes be computed inplace, reuse grad_output and not allocate another buffer (this is often the case for normalization or elementwise ops). This would lead to better memory utilisation.

Originally discussed in: https://github.com/pytorch/pytorch/issues/26288#issuecomment-663731698

@albanD's argument was that this may break hooks. I propose to allow some ways for user to explicitly guarantee that no backward hook registration is supported for some parts of the model, and to even detect automatically if any hooks are registered. and allow this mode.

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved
Repository: pytorch
Issue: Squared 2-norm pdist (as available in SciPy / Faiss)
Labels: triaged,module: numpy,function request,module: norms and normalization,module: distance functions

## 🚀 Feature
Squared 2-norm for the PyTorch [pdist function](https://pytorch.org/cppdocs/api/function_namespacetorch_1_1nn_1_1functional_1a203299f5d26e8c9cee48fe4b7382312a.html), which computes the p-norm distance between every pair of row vectors in the input.

## Motivation

We need to use the squared 2-norm pairwise distance for our research. It's commonly enough used to be [implemented in scipy's pdist as "sqeuclidean"](https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.pdist.html). For instance, it can used to easily compute the cosine distance - see https://github.com/pytorch/pytorch/issues/11202#issuecomment-706776025.

Also, anyone who only cares about the ordering of the 2-norm distances to the other pairs don't actually need the expensive `sqrt()` operation, which is why e.g. Facebook's [Faiss library uses the squared 2-norm by default](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances). Moreover, for very small distances, the `sqrt()` operation  can cause numerical stability issues and produce `NaNs`, which is good to avoid when not needed.

## Pitch
It would be awesome if `pdist()` included a way to do the squared 2-norm (see benefits above). One approach could be to use SciPy's function signature with an optional argument `pdist(metric="sqeuclidean")`. In the future, this argument could also be used for some of the other SciPy pdist distances like cosine should you ever want to support it.

It looks to me like the core part of the CPU implementation needed in [src/ATen/native/cpu/DistanceOpsKernel.cpp](https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/cpu/DistanceOpsKernel.cpp#L114-L122) should be fairly straightforward and something like:
```
  template<typename data_t>
  struct tsqdist_calc {
    static inline data_t map(const data_t& diff, const data_t& p) { return diff * diff; }
    static inline data_t red(const data_t& agg, const data_t& up) { return agg + up; }
    static inline scalar_t finish(const scalar_t agg, const scalar_t p) { return agg; }
    static inline Vec backward(const Vec& diff, const scalar_t grad, const scalar_t dist, const Vec& p) { return Vec(grad) * 2 * diff; }
  };
```

## Alternatives
It's possible to square the output from `pdist()` in the network definition, but the unnecessary `sqrt()` and `pow()` makes training slower and more vulnerable to numerical stability issues (distances are often very close to 0).

**EDIT:** More importantly,  this operation will not be auto-grad-able at zero (whereas the actual operation is differentiable at zero).

## Additional context

@erikbrinkman if you have time, I'd love your thoughts on this feature request as you implemented the original pdist functionality in PyTorch. If the PyTorch team would like, I'd also be happy to take a stab at it.

cc @mruberry @rgommers @heitorschueroff
Repository: godot
Issue: Instancing Viewports in new thread causes stuttering on main thread
Labels: enhancement,topic:rendering,documentation,performance


**Godot version:**
3.2.2 stable


**OS/device including version:**
MacBook Pro (Retina, 15-inch, Mid 2015)
macOS Mojave 10.14.5
Intel Iris Pro 1536 MB


**Issue description:**
Instancing viewports, or a scene containing viewports, from inside a thread can cause significant stuttering on the main thread. The severity of the stutter seems to scale with the size of the viewports. This makes seamless background loading impractical when viewports are involved. No visible difference between GLES2 and GLES3.


**Steps to reproduce:**
1. In some scene, add a script that starts a thread which instances some new viewports and sets their size to something large like 5000x5000.
2. Run the scene and notice stuttering / frame rate drop when script runs.

**Minimal reproduction project:**
[AddViewportStutter.zip](https://github.com/godotengine/godot/files/5362306/AddViewportStutter.zip)
Repository: youtube-dl
Issue: Please provide a more verbose error message than "unable to download video" in case of failure when downloading multiple fragments
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.09.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2020.09.20**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

When trying to download a video that must be downloaded as multiple fragments (I tried with https://www.france.tv/france-5/c-etait-ecrit/1988449-le-brexit.html as an example, in case there are several different manners of "multiple fragments"), any kind of OS error on download (e.g., insufficient permissions, read-only filesystem, etc.) seem to simply result in the error message "ERROR: unable to download video" without any hint as to what the underlying error was.

For example, if I create a directory in which I have no write permission and try to run youtube-dl on the aforementioned URL, all I get is "ERROR: unable to download video" with no explanation as to the fact that it's a "permission denied" error.

If this is too difficult to fix, please at least add something like "try to run with -v option for more verbose output" as a hint to this "unable to download video" error, because -v does indeed provide a clue as to the underlying root cause.
Repository: ant-design
Issue: Tabs组件在切换value时，上一个激活的tab标题颜色没有恢复黑色
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-forked-o4sco)

### Steps to reproduce
1. 设置一组tabs，activeKey受控
2. 更改tabs的activeKey

### What is expected?
只有选中key高亮

### What is actually happening?
上一个选中key和当前选中key都亮起了

| Environment | Info |
|---|---|
| antd | 4.7.0 |
| React | 16.13.1 |
| System | Windows 10 |
| Browser | Google Chrome 版本 85.0.4183.83（正式版本） （64 位） |

---
可以通过点击网页使tabs失焦恢复正常


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: create-react-app
Issue: unable to create react app workspace using create-react-app
Labels: stale,needs triage

Node version is 12.19.0
npm version is 6.14.8

every time i run create-react-app <app-name> i am getting the below error and unable to create the react app folder completely.

D:\UMESH>npm install create-react-app -g
C:\Users\Indhu\AppData\Roaming\npm\create-react-app -> C:\Users\Indhu\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
updated 2 packages in 21.175s

D:\UMESH>create-react-app react-proj

Creating a new React app in D:\UMESH\react-proj.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


> core-js@2.6.11 postinstall D:\UMESH\react-proj\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall D:\UMESH\react-proj\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.5 postinstall D:\UMESH\react-proj\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ react-dom@16.13.1
+ cra-template@1.0.3
+ react@16.13.1
+ react-scripts@3.4.3
added 1596 packages from 745 contributors and audited 1600 packages in 581.683s

71 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Repository: rust
Issue: Diagnostics: suggest using `from_str` when calling `parse` on a type that implements `FromStr`
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,A-suggestion-diagnostics,D-terse

## Problem

I find myself confusing the `parse` and `from_str` methods quite often. Take for example:

```txt
error[E0599]: no function or associated item named `parse` found for struct `connection_string::JdbcString` in the current scope
   --> src\connector\mssql.rs:363:55
    |
363 |         let mut jdbc = connection_string::JdbcString::parse(input)?;
    |                                                       ^^^^^ function or associated item not found in `connection_string::JdbcString`
```

`parse` doesn't exist on `JdbcString`; `from_str` does. So the way to fix it would be to write:

```rust
// either call `from_str`
let mut jdbc = connection_string::JdbcString::from_str(input)?;

// or flip it and call `parse` on the string
let mut jdbc: connection_string::JdbcString = input.parse()?;
```

## Solution

It'd be great if the diagnostic could detect if `parse` was called on a type that implements `FromStr` and suggest to use `from_str` instead:

```txt
error[E0599]: no function or associated item named `parse` found for struct `connection_string::JdbcString` in the current scope
   --> src\connector\mssql.rs:363:55
    |
363 |         let mut jdbc = connection_string::JdbcString::parse(input)?;
    |                                                       ^^^^^ function or associated item not found in `connection_string::JdbcString`
    |                                                       |
    |                                                       help: did you mean to call `connection_string::JdbcString::from_str`?
```
Repository: TypeScript
Issue: Request: support old ES "with" statement
Labels: Suggestion,Awaiting More Feedback

I did **not** thoroughly search for this!
I'm sorry, it's pretty hard to search for such a common word, there were thousands of issues that use "with," but I tried looking through the first few hundred.

## Suggestion

TypeScript support (a restricted subset of) the old JavaScript keyword: "with."

## Use Cases

Simplifies code that accesses a large number of different, yet known keys of an object in quick succession.

## Examples

```ts
const foo = {
    bar: "baz",
    qux: "foobar"
};

with ( foo ) {
    // introduces two new variables into scope
    // bar :: string
    // qux :: string
    console.log(bar, qux);
}
// bar : not in scope
// qux : not in scope

```

output:

```ts
const foo = {
    bar: "baz",
    qux: "foobar"
};

{
    console.log(foo.bar, foo.qux);
}
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

~ This *is* a runtime feature, but this is *already* a feature that was implemented in ECMAScript itself (at some point).
Technically, it has ***not*** been removed. It is merely disallowed in strict mode.

I do **not** recommend supporting the actual ECMAScript "with" statement (I hate that the `self`/`window`/`globalThis` object is still global).
Instead, I suggest that a **very** restricted subset is supported.

It would have to be *very* restrictive in order to not bring back the problems of the original "with."
Suggested restrictions to ensure code can still be typed and remain safe:
* The object may only have known keys (string literals, no symbols, no numbers), it may not be an array.
* The object must be contained in a variable, specifically one that is `const` (function calls can mutate non-const variables).
(The variable restriction may be alleviated if the code is transpiled into a block with a variable assignment.)
* (should not be done at global scope?)

It is very possible to transpile `with` to perfectly safe runtime code that can be guaranteed to be as safe as if one had explicitly accessed the object.
It wouldn't be hard if only supporting a subset, yet there are other implications to consider, such as performance, especially with nested `with` statements.

(And yes, this could also be used to create the most hellish spaghetti code you have ever seen.)
Repository: scrcpy
Issue: Installing Scrcpy in a Pixelbook Go
Labels: snap

 - [ y] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
 - [ y] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).

**Environment**
 - OS: [Chromebook / Debian]
 - scrcpy version: [1.16]
 - installation method: [snap]
 - device model: Laptop: Pixelbook Go; Phone: Xiaomi K20 Pro
 - Android version: [10]

**Describe the bug**
It seems I could not use scrcpy due to this error.
```
jamaguilera@penguin:~$ scrcpy
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
ERROR: '/usr/local/share/scrcpy/scrcpy-server' does not exist or is not a regular file
```

I have tried to install scrcpy via snap because the normal mode gives me this error:
```
jamaguilera@penguin:~$ sudo apt install scrcpy
Reading package lists... Done
Building dependency tree       
Reading state information... Done

No apt package "scrcpy", but there is a snap with that name.
Try "snap install scrcpy"

E: Unable to locate package scrcpy
```

Thanks in advance for anyone who could help!
Repository: terminal
Issue: Discuss: Should ED 2 (EraseType::All) push text on the screen into the scrollback?
Labels: Issue-Question,Product-Conhost,Area-VT

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement

So I was investigating the "docker stats" flicking issue(#1680) and found something weird. The sequences generated by `docker stats` first erase-all then print the stats. The way conhost and WT implements this (ITerminalApi::EraseInDisplay), is to push everything on the screen into the scrollback and print new things:


![image](https://user-images.githubusercontent.com/4710575/95733627-fccef400-0cb4-11eb-8c29-c4f05c8f3915.png)


<!-- 
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).
-->

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->

I don't know why this is like this but I'm sure there's a reason, and I feel that changing this might fix the flickering.
Repository: opencv
Issue: Xcode 12 + OpenCV4 Settings
Labels: question (invalid tracker),platform: ios/osx,incomplete

##### System information (version)
- OpenCV => 4.5.0-pre
- Operating System / Platform => MacOS Catalina
- Compiler => Xcode 12.0.1 (12A7300)

##### Detailed description
![1](https://user-images.githubusercontent.com/10358139/95734839-90ed8b00-0cb6-11eb-90c0-ce50bd398a2f.jpg)
![2](https://user-images.githubusercontent.com/10358139/95734843-934fe500-0cb6-11eb-95e9-65f674ec045d.png)

##### Steps to reproduce
```.cpp
#include <opencv2/opencv.hpp>
using std::string;

int main(int argc, const char * argv[]) {
    string path = "/Users/creator/Downloads/x.jpeg";
    cv::Mat image = cv::imread(path);
    cv::namedWindow("origin");
    cv::imshow("origin", image);
    
    cv::Mat gray;
    cv::cvtColor(image, gray, cv::COLOR_RGBA2GRAY);
    cv::namedWindow("gray");
    cv::imshow("gray", gray);
    cv::waitKey(0);

    return 0;
}
```
Repository: svelte
Issue: $store and store.subscribe behave differently
Labels: stale-bot,documentation

**Describe the bug**
Open console in this [repl](https://svelte.dev/repl/eada079a48e04360b92ef3baec1591f0?version=3.29.0)
in synchronous for loop `store.subscribe` runs callback for each `set`, while reactive `$:` runs only on last `set`

```
const store = writable(0);
	
setTimeout(() => {
	for (let i = 1; i <= 10; ++i) {
		store.set(i); // syncronous set calls
	}
});
	
$: console.log('$:', $store); // logs only last value
store.subscribe(v => console.log('subscribe', v)); // logs each value
```

**Expected behavior**
Autosubscription and manual subscription should behave the same way or explained in documentation

**Severity**
Might broke some logic, if you expect all callback of `set` to run in autosubscription.
I think this should be clarified in documentation.
Repository: pytorch
Issue: torch.cuda.amp!  when I use @autocast() on DCN(DeformConv), the error "RuntimeError:expect scalar type Float but Half "
Labels: module: cuda,triaged,module: amp (automated mixed precision)

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1.
1.
1.

<!-- 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. -->

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

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 : 1.6.0
 - OS :Linux
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:3.7
 - CUDA/cuDNN version: 10.2
 - GPU models and configuration: 2080TI
 - Any other relevant information: when I try to use torch.cuda.amp to train FairMOT, this error occurs!!! because DCN requires float32 not float16
 
## Additional context

<!-- Add any other context about the problem here. -->


cc @mcarilli @ngimel
Repository: create-react-app
Issue: proxy problem
Labels: stale,needs triage

I put "proxy": "http://localhost:5000" in the package.json which is the backend port and receive the 404 error when I use axios to connect to my backend. I used the postman to test the backend "http://localhost:5000/user/login", it works fine. if I remove the proxy, the axios also works. the reason I use the proxy is I store the jwt token in the cookie and actually the axios worked fine with the proxy before. I put the my frontend and backend together and re-install the react app and finally the proxy has the problem.
![proxy](https://user-images.githubusercontent.com/69028512/95756696-d7aca680-0cf1-11eb-988c-aa4a2428e980.png)
Repository: go
Issue: cmd/go: poor error message with '-mod=vendor' when loading a package that is not vendored
Labels: NeedsFix,modules

(This issue is split out from #41916. #38748 is closely related.)

### What version of Go are you using (`go version`)?

```
example.com$ go version
go version devel +9449a125e Sun Oct 11 17:54:59 2020 +0000 linux/amd64
```

### What did you do?

```
go mod vendor
go list golang.org/x/tools/cmd/goimports

-- go.mod --
module example.com

go 1.16

require golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
-- main.go --
package main

import _ "golang.org/x/tools/imports"

func main() {}
```

### What did you expect to see?

An error message that explicitly mentions the user-provided path (`golang.org/x/tools/cmd/goimports`) the fact that that path is not vendored, and (perhaps) the fact that `-mod=vendor` is set by default because the `vendor` directory exists.

### What did you see instead?

```
cannot find package "." in:
        /tmp/tmp.xYGlB041oB/example.com/vendor/golang.org/x/tools/cmd/goimports
```

CC @matloob @jayconrod
Repository: go
Issue: x/mobile: output diagnostic messages when skipping variables and methods
Labels: NeedsInvestigation,FeatureRequest,mobile

The current version of the gomobile/gobind tool silently skips methods and variables that are not supported by the bridge. The only indication that this has happened is found in the comments of the resulting bridge source files.

It would be very useful for the tool to also emit diagnostic messages to the console including the location of the objects that were skipped. This could be further extended with a mechanism to return a failure error code in the command if any objects were skipped, and some way to ignore these warnings for specific objects.