sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: redesign of Dropout
Labels: feature,module: nn,triaged

## 🚀 Feature
Well, the current Dropout* implementations are confusing, and at the same time miss feature (rescaling).
Unlike Cond*d, BatchNorm*d, etc., Dropout has three variants: Dropout, Dropout2d, Dropout3d.
The Dropout can drop any tensor element with p probability. On the other hand, the Dropout2d/3d
drops complete feature subtensors.
The misleading part is that the feature channel is always the second channel, regardless of dimensions.
So, if the input is 6 dimensional, or 3, they still drop by the second dimension, and there is no shape check at all.
Also, they have identical implementation.
So 2d/3d differentiation makes no sense, if anything, it could be called DropoutChannel or DropoutFeature.

Edit: it seems that rescaling is in fact implemented, but wasn't working in one of my conda environments. I will try to identify the source of the issue, so disregard this part for now. The rest of the ticket still applies.
~~There is also a missing feature, namely, rescaling the input with the dropout probability. 
As a matter of fact, i would prefer rescaling not with `p`, but actually with
```total elements / remaining elements```.
The reason is this: you can assume cases when sometimes 2 channels are kept, sometimes 3, and rescaling based
on the probability, not on the actual kept channels lead to 50% difference in output. Of course, with higher number of channels, the variance decreases, but if the dropout is redesigned anyway, this could be taken into account.
E.g. rescale = None | "prob" (default) | "kept" 
or something like this (instead of introducing a True/False parameter which is hard to change later).
Note that this rescaling is not the same as the AlphaDropout, and both of them are required.
For instance, tensorflow implements rescaling, and has a separate AlphaDropout too.~~


## Motivation

The current situation is confusing.

## Pitch

- clarify the documentation code
- add deprecation to Dropout2d / Dropout3d, and remove them later, or rename, like DropoutChannel
- introduce new class, preferably DropoutNd or similar, where you can specify any dimension,
  or you can specify a specific noise shape (e.g. rows or columns in an image, e.g. tensorflow's noise shape)
- unify defaults:  in the functional interface, Alpha dropout has a different default than the regular dropout
  for the ```training``` parameter (False and True, respectively).

## Alternatives

Not preferred, but clarified documentation with examples how to use Dropout 2d to be used for arbitrary dimensions, 
something like this:
```
# x.shape == (A1,A2,...,An,C, B1,B2, ...Bn)
x2=x.view(A1*A2*...,C, -1)
y=Dropout2d(x2).view(x.shape)
```


cc @albanD @mruberry
Repository: storybook
Issue: Not wanted controls showed up when argTypes are defined
Labels: question / support,svelte,addon: controls

**Describe the bug**

When controls type are detailed on the `argTypes` story parameters, they are always shown even if not used.

**To Reproduce**
Steps to reproduce the behavior (see code snippet for reference):

1. Write a story with some `argTypes` 
2. Write variants using some of the args and variant without any args

**Expected behavior**

Controls should no be shown when not used as it does when you do not use `argTypes` definition.

**Screenshots**

`Default` variant without source prop:

![image](https://user-images.githubusercontent.com/1698357/95763069-df972700-0cae-11eb-9a6c-2ed50797804b.png)

`LocalData` variant without any prop:

![image](https://user-images.githubusercontent.com/1698357/95763125-ee7dd980-0cae-11eb-92b9-5e479590a952.png)

Note that we do have a "no controls" warning message.

`RemoteData` variant with only the source prop:

![image](https://user-images.githubusercontent.com/1698357/95763174-fe95b900-0cae-11eb-89f3-9f11c251e9a4.png)

**Code snippets**

```javascript
import DataView from './DataView.svelte';
import DataViewLocalView from '../views/DataViewLocalView.svelte';
import DataViewRemoteView from '../views/DataViewRemoteView.svelte';
import { users, dataSourceDefinitions } from '../props';

const sourceOptions = Object.keys(dataSourceDefinitions);

export default {
  title: 'Data|DataView',
  component: DataView,
  argTypes: {
    filter: {
      control: {
        type: 'boolean',
      }
    },
    source: {
      control: {
        type: 'select',
        options: sourceOptions,
      }
    }
  }
};

export const Default = (args) => ({
  Component: DataView,
  props: {
    ...args,
    ...users,
  },
});
Default.args = {
  filter: true,
};

export const LocalData = () => ({
  Component: DataViewLocalView,
});

export const RemoteData = (args) => ({
  Component: DataViewRemoteView,
  props: args,
});
RemoteData.args = {
  source: sourceOptions[0],
}
```

**System**

```
Environment Info:

  System:
    OS: Linux 5.6 Manjaro Linux
    CPU: (6) x64 Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz
  Binaries:
    Node: 14.5.0 - /usr/bin/node
    npm: 6.14.6 - /usr/bin/npm
  Browsers:
    Firefox: 78.0.2
  npmPackages:
    @storybook/addon-a11y: ^6.0.26 => 6.0.26 
    @storybook/addon-essentials: ^6.0.26 => 6.0.26 
    @storybook/addon-storyshots: ^6.0.26 => 6.0.26 
    @storybook/addons: ^6.0.26 => 6.0.26 
    @storybook/svelte: ^6.0.26 => 6.0.26 
```

**Additional context**

Current upgrade MR: https://gitlab.com/nexylan/svelty/-/merge_requests/64

Note: The boolean filter is not defined on the current merge request because I don't need it for a boolean. The code snippet does it to highlight the issue.
Repository: youtube-dl
Issue: Site support request: toggolino.de
Labels: site-support-request

## Checklist
- [x ] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.09.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones

## Example URLs
Single video: https://www.toggolino.de/paw-patrol/paw-patrol-mighty-pups-die-superhunde

## Description
Toggolino is part of a German TV channel and also has a website with streams for the various series.

Currently ytdl tries to use generic extractor and fails. Looking at the source code from the site, it seems to use a BrightCove player.
But it also uses DRM, as seen when opening the URL in a browser with DRM deactivated.

Any chance for it to be supported?
Repository: create-react-app
Issue: Keep webpack server alive even with a lowercase n
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
After the dev server starts listening on a port, and `<Ctrl-C>` is pressed, a prompt is raised `"Terminate batch job (Y/N)?`

Typing "n" here causes the server to shut down. 

### Describe the solution you'd like

Maybe there is some reason behind it, which I'm not aware of, but I think typing either "n" or "N" should keep the server alive.
Repository: create-react-app
Issue: An unexpected error occurred: “https://registry.yarnpkg.com/react: unable to get local issuer certificate” while create-react-app
Labels: stale,needs triage

Hi Team,

Any help on this issue : https://stackoverflow.com/questions/64125554/an-unexpected-error-occurred-https-registry-yarnpkg-com-react-unable-to-get

I have tried all possible options but nothing is working for me.

Any help on this is much appreciated

Thanks,
Santosh
Repository: TypeScript
Issue: Default generic type is improperly constrained in conditional types.
Labels: Bug

**TypeScript Version:**  4.0.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** default generic conditional erased constrained

**Code**
```ts
// Some somewhat advanced conditional types
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
type IsNullable<T> = UnionToIntersection<T> extends T & null & undefined ? T : never;
declare function onlyNullables<T>(v: IsNullable<T>): void;

// Function modeled after querySelector<E extends Element = Element>(selectors: string): E | null;
declare function defaultGeneric<E extends number = number>(unrelatedInput: number): E | null;

let normalType = defaultGeneric(1); // GOOD: defaultGeneric<number>

onlyNullables(defaultGeneric(2)); // BAD: defaultGeneric<never>
```

**Expected behavior:**
`defaultGeneric` should default to `defaultGeneric<number>` in all positions.

**Actual behavior:**
`defaultGeneric` becomes `<number>` in some positions and `<never>` in others.

I believe the compiler is misinterpreting the constraints of the function, which makes it think it needs to be `never` instead of using the default `number`.  That is, the output type is constraining the generic type, which leads to an error further down the road.  I'm not sure if there is an easy fix, as outputs being used to constrain generics is a pretty common case (though technically incorrect), and the compiler would have to "peek-ahead" some unknown distance to know that this constraint would cause an error.

**Playground Link:** https://www.typescriptlang.org/play?ts=4.0.2#code/PTAEGUHsFsFNQM41gdwBYEMAuoMBMA3DAOwGNY9RTJi8BLLOmjAG1CwE8AHWBAKE49QAVWJNiAFUgBJYllgAnBLFKMaAHmEA+UAF5QACmGhYAD3m0EuYh1AB+QwGsAXCICUenQUh1Kr4rAEih5mFnhWBi6gdMQAZoqg0h66Xj6UDtKg-oGKANwC3PDSCAByAK4sLBgARiyw6hI6+qLiUrLySipqxA06obCWoBKgAGSgxBVsY2W0sLExFPZDWeM5Cvl4KlUK8LEzquKgNCwc5ZU1dQi9BgSuxWdVtfWNbq7evvl8IKAAYvvdVmgkE2dUoGFiHVAAEcyooOOBYHVVJAFOoAKImcwDcKgNF1OByPS4-EDLBaAzKJFYFEIVwILAKGIAc1euNAAB9xpMNlsMDtQHsyN1QJtYhgKlgAOIDRR0UjozFhKwTaDVBL6FVqhTkmY7KryPCyLhlLD+Mqq4KuDGciaVHmkba7f6HajEekKDALPDSgKM+UY-qDTWKckxY2m3Gs61cu18TYOvlOoWHfY0d2egLemV+hWBnHB7UGXWI7AUI0ms0WhRRjkxlifPh1HDEFHQVgSQpE0XilhS7NygwARjcuVA30lAHkJwARVzdiU+2XygtaPh8Y6nSYXXgGee9xd+gwAJjcI7HYAAQgBBWciuY9vu+uXqAJBbVrjcPbcIAyu9Neg8BwAZlPUdxynW8-wZDMKEA+UgNXddiBOL8nh-VM3WggD+1IAwABZQPPUBJxnVwMP-TM4JfNZVyAA
Repository: pytorch
Issue: pytorch not uploading data to tensorboard page
Labels: triaged,module: tensorboard

hello,

after spending days on this issue i'm trying again starting from scratch with a new environment. i'm going to put all details since i'm not formally educated with computers so maybe i make some dumb mistakes that i'm not aware of.

1. created a conda environment myenv with python 3.8, pytorch 1.6 and tensorboard 2.3.0

2. open pycharm, create new project, create new python module, named test.py
 

3. copy paste the code from tutorial in https://pytorch.org/docs/stable/tensorboard.html

also shown here
```
import torch
import torchvision
from torch.utils.tensorboard import SummaryWriter
from torchvision import datasets, transforms

# Writer will output to ./runs/ directory by default
writer = SummaryWriter()

transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))])
trainset = datasets.MNIST('mnist_train', train=True, download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=64, shuffle=True)
model = torchvision.models.resnet50(False)
# Have ResNet model take in grayscale rather than RGB
model.conv1 = torch.nn.Conv2d(1, 64, kernel_size=7, stride=2, padding=3, bias=False)
images, labels = next(iter(trainloader))

grid = torchvision.utils.make_grid(images)
writer.add_image('images', grid, 0)
writer.add_graph(model, images)
writer.close()
```

4. run the code, check that folder was created and event files were generated. (folder path is C:\Users\david\PycharmProjects\TBtutorial\runs. inside that folder is another folder named after the moment it was generated and in it is one event file of type 0 file)

5. from windows toolbar enter anaconda prompt, activate myenv, change directory to /PycharmProjects/TBtutorial/runs.

6. type in: tensorboard --logdir==runs

7. copy paste link printed below on browser, get tensorboard blank page.

8. tried the same directly from pycharm terminal (typing tensorboard --logdir==runs ) instead of anaconda prompt

bottom line -
i always get the same result, the tensorboard web page without any image at the image thumbnail. i tried using python 3.6, tensorboard 1.15, pytorch 1.4 - all with one another. also tried to pass the writer other commands other than add_image, all to no use.

i'm clueless, will be grateful for any advice!
Repository: kubernetes
Issue: increase volume provisioning rate
Labels: sig/storage,kind/feature,lifecycle/frozen,needs-triage

**What would you like to be added**:

Performance testing showed that the volume controller is able to trigger volume provisioning at a rate of ~4 volumes/second and then bind PVs to PVCs at a rate of 6 volumes/second. Testing was done with a fake CSI driver that can deal with a much higher number of CreateVolume calls per second.

It seems that throttling of the request rate in client-go is the reason for the fixed rate because the CPU load of both apiserver and kube-controller-manager was low.

It would be nice to:
- increase the volume provisioning rate by reducing the number of requests per volume
- make the request rate configurable for those cluster admins who want a higher rate

**Why is this needed**:

Generic ephemeral volumes rely on dynamic volume provisioning. The faster volumes can get created and deleted, the more realistic it becomes to use generic ephemeral volumes for many pods.
Repository: create-react-app
Issue: react-dev-utils: WepbackDevServerUtils doesn't output stack trace on compilation errors
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

When Webpack encounters a compilation error, `react-dev-utils` dutifully logs a `Failed to compile` message with the associated `err.message`. However, without the error's stacktrace, it can be hard to track down the source of the error.

Relevant code:
https://github.com/facebook/create-react-app/blob/d5c0fe287a6bc24c60ee52ca768bdf3a10b937e1/packages/react-dev-utils/WebpackDevServerUtils.js#L117-L125

Example output:
```
Failed to compile.

compiler.plugin is not a function
```

Error messages like this make it next to impossible to track down the offending code.

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

Replace `console.log(err.message || err);` with `console.log(err.stack || err.message || err);` in https://github.com/facebook/create-react-app/blob/d5c0fe287a6bc24c60ee52ca768bdf3a10b937e1/packages/react-dev-utils/WebpackDevServerUtils.js#L122

The above example then becomes
```
Failed to compile.

TypeError: compiler.plugin is not a function
    at CaseSensitivePathsPlugin.apply (node_modules/case-sensitive-paths-webpack-plugin/index.js:136:12)
    at createCompiler (node_modules/webpack/lib/webpack.js:71:12)
    at create (node_modules/webpack/lib/webpack.js:115:15)
    at webpack (node_modules/webpack/lib/webpack.js:139:31)
    at f (node_modules/webpack/lib/index.js:35:15)
    at createCompiler (node_modules/react-dev-utils/WebpackDevServerUtils.js:118:16)
```

which is much easier to debug.

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

I've resorted to manually applying this change to track down webpack errors. I can't think of any other alternatives.

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

Also reported in this old issue: https://github.com/facebook/create-react-app/issues/4284
Repository: go
Issue: x/tools/gopls: report better error messages for invalid flags
Labels: NeedsDecision,gopls,Tools

gopls version: v0.5.1
gopls flags: -remote=aut -logfile=auto -debug=:0 -rpc.trace

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

<ANSWER HERE>


Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.

<PASTE STACK TRACE HERE>


OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>
Repository: go
Issue: cmd/go: go generate sets more variables than its documentation specifies
Labels: NeedsDecision,GoCommand

`go generate` [documentation](https://golang.org/cmd/go/#hdr-Generate_Go_files_by_processing_source) currently says:

> Go generate sets several variables when it runs the generator:
>
> ```
> $GOARCH
> 	The execution architecture (arm, amd64, etc.)
> $GOOS
> 	The execution operating system (linux, windows, etc.)
> $GOFILE
> 	The base name of the file.
> $GOLINE
> 	The line number of the directive in the source file.
> $GOPACKAGE
> 	The name of the package of the file containing the directive.
> $DOLLAR
> 	A dollar sign.
> ```
>
> Other than variable substitution and quoted-string evaluation, no special processing such as "globbing" is performed on the command line.
>
> As a last step before running the command, any invocations of any environment variables with alphanumeric names, such as $GOFILE or $HOME, are expanded throughout the command line. The syntax for variable expansion is $NAME on all operating systems. Due to the order of evaluation, variables are expanded even inside quoted strings. **If the variable NAME is not set, $NAME expands to the empty string.**

The last sentence is relevant. It leads the user to believe that if a NAME is not one of the aforementioned variables and is not set in the environment, $NAME would expand to the empty string.

This is not the case for some Go-specific variables (beyond those mentioned in the list above) because [`expandVar`](https://github.com/golang/go/blob/8994607f828e46272bae5e7959997dea8cb1a19a/src/cmd/go/internal/generate/generate.go#L418-L428) uses `os.Getenv(word)` to look up environment variables that aren't in `g.env`. To achieve the behavior as documented above, it should instead be looking up environment variables from [`cfg.OrigEnv`](https://golang.org/cmd/go/internal/cfg/#OrigEnv), since cmd/go's `main` modifies the environment at startup (see [here](https://github.com/golang/go/blob/8994607f828e46272bae5e7959997dea8cb1a19a/src/cmd/go/main.go#L146-L157)).

To reproduce, consider this program:

```Go
package main

import (
	"fmt"
	"os"
)

//go:generate echo ${DOLLAR}GOCACHE expands to '$GOCACHE'

func main() {
	v, ok := os.LookupEnv("GOCACHE")
	if !ok {
		fmt.Println("env var GOCACHE is unset")
		return
	}
	fmt.Printf("$GOCACHE = %q\n", v)
}
```

### What did you do?

```
$ unset GOCACHE
$ go run .
$ go generate
```

### What did you expect to see?

```
$ go run .
env var GOCACHE is unset
$ go generate
$GOCACHE expands to ''
```

### What did you see instead?

```
$ go run .
env var GOCACHE is unset
$ go generate
$GOCACHE expands to '/Users/gopher/Library/Caches/go-build'
```

/cc @bcmills @jayconrod @matloob
Repository: TypeScript
Issue: Adding an overload breaks inference of compositional functions
Labels: Needs Investigation

Tried fixing this, but ran into another case where an overload breaks type inference:
```ts
declare function reverse(a: ReadonlyArray<number>): ReadonlyArray<number>;

declare function incrementEvery(list: ReadonlyArray<number>): ReadonlyArray<number>;
declare function incrementEvery(x: ReadonlySet<number>): ReadonlySet<number>;

declare function compose<T>(
    second: (x: ReadonlyArray<number>) => T,
    first: (x0: ReadonlyArray<number>) => ReadonlyArray<number>,
): (x0: ReadonlyArray<number>) => T;

const works = compose<ReadonlyArray<number>>(incrementEvery, reverse);
const broke: (nums: ReadonlyArray<number>) => ReadonlyArray<number> = compose(incrementEvery, reverse);
```

```ts
src/a.ts(12,79): error TS2345: Argument of type '{ (list: ReadonlyArray<number>): ReadonlyArray<number>; (x: ReadonlySet<number>): ReadonlySet<num...' is not assignable to parameter of type '(x: ReadonlyArray<number>) => ReadonlySet<number>'.
  Type 'ReadonlyArray<number>' is not assignable to type 'ReadonlySet<number>'.
    Property 'has' is missing in type 'ReadonlyArray<number>'.
```

Unlike the above issue, this was broken in all the way back in `2.0`.

_Originally posted by @andy-ms in https://github.com/microsoft/TypeScript/issues/23352#issuecomment-380844184_
Repository: flutter
Issue: CupertinoTextField Cursor position incorrect
Labels: a: text input,platform-ios,framework,a: fidelity,f: cupertino,team-design,triaged-design

The cursor position for CupertinoTextField is off-center.

<img width="500" alt="Screen Shot 2020-10-12 at 12 54 08 PM" src="https://user-images.githubusercontent.com/11810973/95785118-068f3200-0c8a-11eb-95bf-6aedc62f27a9.png">

The top textfield is a UISearchTextField (type of UITextField) made in Swift.
The bottom textfield is a CupertinoTextField made in Flutter.

As seen above, the cursor position, relative to the first character, is about 1 px too distant.

Another example (lying on top of each other):
<img width="400" alt="Screen Shot 2020-10-12 at 1 01 06 PM" src="https://user-images.githubusercontent.com/11810973/95785655-ff1c5880-0c8a-11eb-9a22-949ee081e0cd.png">

Kinda related: https://github.com/flutter/flutter/issues/7034
Repository: pytorch
Issue: [FX]Add support for len() on Proxy
Labels: triaged,module: fx

When symbolic tracing, we do not support calling `len` on a proxied value. Example:

```
import torch

class LenTest(torch.nn.Module):
    def forward(self, x):
        return len(x)

lt = LenTest()

import torch.fx

traced = torch.fx.symbolic_trace(lt)
print(traced.graph)

"""
Traceback (most recent call last):
  File "len.py", line 11, in <module>
    traced = torch.fx.symbolic_trace(lt)
  File "/data/users/jamesreed/pytorch/torch/fx/symbolic_trace.py", line 323, in symbolic_trace
    return GraphModule(root if isinstance(root, torch.nn.Module) else torch.nn.Module(), Tracer().trace(root))
  File "/data/users/jamesreed/pytorch/torch/fx/symbolic_trace.py", line 301, in trace
    self.create_node('output', 'output', (self.create_arg(fn(*args)),), {},
  File "len.py", line 5, in forward
    return len(x)
TypeError: object of type 'Proxy' has no len()
"""
```

We should:

- Add a test case for this scenario to `test/test_fx.py`

- Make it so that the [Proxy class](https://github.com/pytorch/pytorch/blob/e3893b867fd39cf4f10a129ba9f689eebf10f82b/torch/fx/proxy.py#L112) has an implementation of `__len__`. Most likely this will entail making that method insert a `call_function` node with target `builtins.len`

cc @ezyang @SherlockNoMad
Repository: godot
Issue: ColorPickerButton with color_changed signal attached won't show color on button
Labels: bug,topic:gui

**Godot version:**
3.2.3 stable, also happens in 3.2.2 stable



**OS/device including version:**
Windows 10 20.04, Intel HD graphics 4600 with GLES 2 and 3 have this problem


**Issue description:**
When changing the color of a ColorPickerButton with a script that connects to the button's `color_changed` signal, the button will not show the selected color.


**Steps to reproduce:**
In the project I provided, simply change the color of the button without the provided script attached.
Then attach the script and do the same thing.

**Minimal reproduction project:**
[testerproject.zip](https://github.com/godotengine/godot/files/5367733/testerproject.zip)