sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [JIT] Cannot iterate over nn.ModuleList in JITted code when accessed through one level of indirection
Labels: oncall: jit,days

## 🐛 Bug
`nn.ModuleList` cannot be iterated over in JIT code when it is hidden behind one layer of indirection (so that it is treated as a `SugaredValue` rather than a `PythonSugaredValue`).

## To Reproduce
```
import torch

class Submodule(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.mods = torch.nn.ModuleList([torch.nn.Linear(3, 4)])

    def forward(self, x):
        for module in self.mods:
            x = module(x)

        return x

class MyModule(torch.nn.Module):
    def __init__(self, a):
        super().__init__()
        self.submod = a

    def forward(self, x):
        stack: List[Submodule] = [self.submod]

        while len(stack) > 0:
            cur_module: Submodule = stack[-1]
            stack.pop()
            for module in cur_module.mods:
                x = module(x)

        return x


if __name__ == "__main__":
    s = torch.jit.script(MyModule(Submodule()))
    print(s.graph)
    print(s(torch.randn(4, 3)))
```
## Actual behavior
```
RuntimeError: 
'__torch__.torch.nn.modules.container.ModuleList' object is not iterable:
  File "module_list.py", line 25
            cur_module: Submodule = stack[-1]
            stack.pop()
            for module in cur_module.mods:
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...  <--- HERE
                x = module(x)

```
## Expected behavior
```
tensor([[-1.1653, -0.3536,  1.1172, -0.9032],
        [-0.1921,  0.1193, -0.2193, -0.1630],
        [-2.1276, -0.2631,  0.6108, -0.2189],
        [-0.0737,  0.2747, -0.5000,  0.0436]], grad_fn=<AddBackward0>)
```


cc @suo @gmagogsfm
Repository: pytorch
Issue: Support for Multi-Categorical in torch.distributions
Labels: module: distributions,feature,triaged

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

Support for Multi-Categorical in torch.distributions

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

As openai gym supports ``MultiDiscrete`` space, it would be nice if pytorch can support the corresponding distribution, too. This is also a common scenario, where the action consists of multiple sub-actions, each sub-action has different number of choices.

## Pitch

<!-- A clear and concise description of what you want to happen. -->
```python
# I have three sub-actions, each have 3, 5, 4 choices, respectively
dist = multi_categorical_maker([3, 5, 4])
# give it batch of logits with 5 items. 
# the first 3 logits corresponds to the first sub-action, 
# the next 5 for the second, 
# and the last 4 for the last sub-action
d = dist(logits=torch.rand(5, 12)) 

# I get 5 actions, the first sub-action ranges in [0, 3), the second in [0, 5), the last in [0, 4)
d.sample()
tensor([[0, 4, 3],
        [0, 4, 0],
        [0, 3, 1],
        [0, 0, 3],
        [0, 0, 3]])

# return the log_prob of actions, which are the sum of log_prob of sub-actions
d.log_prob(d.sample())
tensor([-3.8733, -4.3669, -4.6643, -3.5386, -4.1125])
```

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Possible implementation

The implementation is very simple and straightforward. Here is just an example:
```python
import torch
from torch.distributions import Categorical, Distribution
from typing import List


class MultiCategorical(Distribution):

    def __init__(self, dists: List[Categorical]):
        super().__init__()
        self.dists = dists

    def log_prob(self, value):
        ans = []
        for d, v in zip(self.dists, torch.split(value, 1, dim=-1)):
            ans.append(d.log_prob(v.squeeze(-1)))
        return torch.stack(ans, dim=-1).sum(dim=-1)

    def entropy(self):
        return torch.stack([d.entropy() for d in self.dists], dim=-1).sum(dim=-1)

    def sample(self, sample_shape=torch.Size()):
        return torch.stack([d.sample(sample_shape) for d in self.dists], dim=-1)


def multi_categorical_maker(nvec):
    def get_multi_categorical(logits):
        start = 0
        ans = []
        for n in nvec:
            ans.append(Categorical(logits=logits[:, start: start + n]))
            start += n
        return MultiCategorical(ans)
    return get_multi_categorical

```

cc @vincentqb @fritzo @neerajprad @alicanb @vishwakftw
Repository: vscode
Issue: Can't input backslash.
Labels: feature-request,keybindings-editor

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: 
Tested with the latest insiders edition  --> Yes.

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version:Version: 1.49.0-insider 
- OS Version: Windows_NT x64 10.0.19041
Tested with the latest insiders edition  --> Yes.

Steps to Reproduce:

Not sure what caused this to happen but I used to be able to type the backslash but all of sudden it stopped working.
Backslash works on any other input areas such as Chrome, windows search or wherever but it doesn't work in VSCode ONLY.
Tried reinstalling VSCode and also the insiders edition. I now have to copy and paste the backslash OR type it by pressing the Alt key + 92 from the num keypad. The pipe sign works without a problem in VSCode. This started with the stable version of VSCode first and when I was about to report this bug I noticed from the report template that I should check with the latest insider's edition and when I first installed the insiders edition it worked but it stopped working again after initial setup (plugins). So as described in the template I tried running with all plugins disabled but problem still exists. 
I'm using an American layout keyboard from Corsair K70 MK.2.
Please let me know if I need to provide more information. Thank you.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: three.js
Issue: Support stencilOpSeparate & stencilFuncSeparate?
Labels: Enhancement


Now the properties of Material only support `gl.stencilOp` & `gl.stencilFunc`. 
Can we add some properties to Material like `stencilZFailBack` to support separated stencil settings in webgl2 ?
Repository: go
Issue: x/pkgsite: description of x/debug repo at golang.org/pkg page is outdated
Labels: Documentation,help wanted,NeedsFix,pkgsite

![image](https://user-images.githubusercontent.com/4999471/90594870-808ac980-e1b9-11ea-887a-772397d5e77a.png)
Here, the 'x/debug' repo is listed as a repo for 'an experimental debugger for Go'.
This is outdated. Please update the repo description and this documentation.
Repository: pytorch
Issue: Adding entropy function analogous to SciPy
Labels: feature,triaged,module: numpy

## 🚀 Feature
Add an entropy function in PyTorch to compute entropy = -sum(p * log(p), axis=axis), which is analogous to scipy.stats.entropy.

## Motivation

It is a common thing to compute entropy given a distribution p in many use cases. Currently there are several ways to compute entropy in PyTorch listed as below.

1. Direct implementation which is `entropy = -((p * p.log()).sum(dim=-1))`. This one works in many cases, but not elegant and efficient enough.
2. Using torch.bmm as `entropy = -(torch.bmm(p.view(M, 1, N), p.log().view(M, N, 1))).squeeze()`. This one has better forward pass performance compared to the 1st one on CPU when MKL is enabled. However, the backward pass performance will be worse because of the backward computation of bmm.
3. Using torch.distributions.categorical.Categorical.entropy as `entropy = torch.distributions.categorical.Categorical(p).entropy()`. This one looks the most direct one. However, it is much slower than both of the previous approaches in both forward and backward pass even if we don't need logit at all.

The 1st and 2nd approaches are not a direct function to compute entropy as scipy. So we can consider either to add a scipy-like entropy function or optimize the implementation of torch.distributions.categorical.Categorical.entropy.



cc @mruberry @rgommers
Repository: go
Issue: net: some tests are skipped on Windows due to os.Getuid() always returns -1
Labels: OS-Windows,NeedsInvestigation

### Does this issue reproduce with the latest release?
Yes

### What did you do?
`go test -v net`

### What did you expect to see?
Run all tests that are applicable.

### What did you see instead?
```
=== RUN   TestIPConnLocalName
--- PASS: TestIPConnLocalName (0.00s)
    iprawsock_test.go:93: skipping ip4:icmp test
    iprawsock_test.go:93: skipping ip4:icmp test
    iprawsock_test.go:93: skipping ip4:icmp test
```
```
=== RUN   TestIPConnRemoteName
--- SKIP: TestIPConnRemoteName (0.00s)
    iprawsock_test.go:109: ip:tcp test
```
```
=== RUN   TestIPv6MulticastListener
--- SKIP: TestIPv6MulticastListener (0.00s)
    listen_test.go:619: must be root
```

### Related code
https://github.com/golang/go/blob/d5e1b7ca68e2cc484d9a1517bdc0a9862936a1eb/src/net/platform_test.go#L34-L48
https://github.com/golang/go/blob/d3a411b6debccb665da3497e7fa597c9a5ff16f1/src/net/listen_test.go#L603-L620
Repository: youtube-dl
Issue: Buzzfeed
Labels: question

It says that Buzzfeed is supported but I can't download any video from that page: https://www.buzzfeednews.com/article/salvadorhernandez/dnc-joe-biden-state-nominations

or even from their embedded video: https://video-player.buzzfeed.com/embed?transcoder_path=/hive-binaries/binaries/8e483879cb0a44018a6f3de21a718de7/DNC_Day_2-9_45_19_PM_-_9_46_01_PM-2020-08-18.mp4

I need some pointers. Thanks!
Repository: go
Issue: net: some Windows DNS tests rely on CNAME flattening
Labels: OS-Windows,NeedsInvestigation

### Does this issue reproduce with the latest release?
Yes

### What did you do?
`go test -v net`

### What did you expect to see?
Test pass.

### What did you see instead?
```
=== RUN   TestNSLookupMX
--- FAIL: TestNSLookupMX (0.04s)
    lookup_windows_test.go:37: no results
```

### Comment
When I set Google DNS (8.8.8.8) as my DNS server, the test passed.
When I set OpenDNS (208.67.220.220) as my DNS server, the test failed.
Theses tests should not rely on whether [CNAME flattening](https://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/) is available on a recursive DNS resolver.
Repository: godot
Issue: _get_configuration_warning() dialog box height does not return to normal after removing newlines
Labels: bug,topic:editor,topic:gui

**Godot version:**
v3.2.2.stable.official (on steam)


**OS/device including version:**
Windows 10
(Version 10.0.19041 Build 19041)

**Issue description:**
When you add newlines to an overridden _get_configuration_warning() tool script, the dialog box does not fit to height.
This is demonstrated when you add several "\n\n\n\n" in the message, view it, and then remove the newlines. The dialog box has the same height, and does not shrink.

***Default script message:***
![image](https://user-images.githubusercontent.com/6776092/90601131-fca40200-e1f7-11ea-96be-d235e86bb3be.png)

***Script message after adding newlines:***
![image](https://user-images.githubusercontent.com/6776092/90601157-0a598780-e1f8-11ea-8157-041b6f4cc413.png)

***Different script that does not have any newlines also show additional height:***
![image](https://user-images.githubusercontent.com/6776092/90601289-4260ca80-e1f8-11ea-8ca3-0c33d7dba81c.png)



**Steps to reproduce:**
1. Create a Node
2. Add script:

```
tool
extends Node

func _get_configuration_warning():
	var message = ""
	if(get_child_count() < 1):
		message += "Need a minimum of 1 child!"
	return message
```

3. Confirm the dialog box displays properly.
4. Add several newlines to the end of the message.
```
tool
extends Node

func _get_configuration_warning():
	var message = ""
	if(get_child_count() < 1):
		message += "Need a minimum of 1 child!\n\n\n\n\n\n\n\n"
	return message
```
5. View the dialog box, notice we have several new lines and that the height is longer.
6. Remove the newlines.
```
tool
extends Node

func _get_configuration_warning():
	var message = ""
	if(get_child_count() < 1):
		message += "Need a minimum of 1 child!"
	return message
```
7. View the dialog box, notice the new lines are not gone.

**Unfounded theory on why this is happening:** I notice that multiple dialog boxes from different scripts seem to share this extra height. Perhaps we are storing dialog box data (width/height) in places we should not? Are we ignoring empty spaces so that the newlines are being kept? 

**Minimal reproduction project:**
[Node.zip](https://github.com/godotengine/godot/files/5094449/Node.zip)
Repository: TypeScript
Issue: Completions: Suggest enum member or literal union Inside switch statement
Labels: Suggestion,Domain: Completion Lists,Experience Enhancement

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms
suggestions

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Examples
````ts
enum E {
    A,
    B,
}
declare const e: E
switch (e) {
    case /*1*/
}
````

Expected:
Suggest E.A, E.B

<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] 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).
Repository: flutter
Issue: Vertical pull down gesture for CupertinoPageRoute in fullscreenDialog mode
Labels: c: new feature,platform-ios,framework,a: fidelity,f: cupertino,c: proposal,team-design,triaged-design

The CupertinoPageRoute fullscreenDialog mode has the same horizontal backGestureDetector as the default mode.

Would be nice if the CupertinoPageRoute would also support a vertical back (pull down) gesture in the fullscreenDialog mode.
Repository: youtube-dl
Issue: Config location
Labels: question

<!--

######################################################################
  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:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x ] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x ] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

Is there a way to specify the youtube-dl.conf config file without using the command? I'm using sinusbot with pterodactyl which uses docker and the /etc/youtube-dl.conf directory does not exist, but i have to use the youtube-dl.conf file to specify the --force-ipv4 argument and --cookies because i'm getting the 429 error "Too many requests"
Repository: storybook
Issue: Typescript extended props not show v6
Labels: question / support,documentation,typescript,block: argstable

**Describe the bug**
Define typescript props for component with extending other props, doesn't show the extended props.

For example a component with
```ts
interface TProps extends ComponentPropsWithoutRef<"input"> {
  label?: string;
  state?: InputState;
  helper?: string | React.ReactElement;
}

export const TextField = forwardRef(
  (
    { label, placeholder, state, helper, ...rest }: TProps,
    ref: Ref<HTMLInputElement>
  ) => (
    ...
  )
);
```

Produces the following 

<img width="1064" alt="Screenshot 2020-08-19 at 10 55 40" src="https://user-images.githubusercontent.com/20229808/90620607-983e6e00-e20a-11ea-8ea5-913231a419d3.png">

**Expected behavior**
Its suppose to show all the props valid for the component such as type, max, min e.t.c

**System:**
```
Environment Info:
  Binaries:
    Node: 14.2.0 - ~/.nvm/versions/node/v14.2.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - ~/.nvm/versions/node/v14.2.0/bin/npm
  Browsers:
    Chrome: 84.0.4147.125
    Firefox: 77.0.1
    Safari: 13.1.2
  npmPackages:
    @storybook/addon-docs: ^6.0.6 => 6.0.6 
    @storybook/addon-essentials: ^6.0.6 => 6.0.6 
    @storybook/addon-knobs: ^6.0.6 => 6.0.6 
    @storybook/addon-links: ^6.0.6 => 6.0.6 
    @storybook/addon-notes: ^5.3.19 => 5.3.19 
    @storybook/addon-storysource: ^6.0.6 => 6.0.6 
    @storybook/addon-viewport: ^6.0.6 => 6.0.6 
    @storybook/addons: ^6.0.6 => 6.0.6 
    @storybook/preset-create-react-app: ^3.1.4 => 3.1.4 
    @storybook/react: ^6.0.6 => 6.0.6
```
Repository: youtube-dl
Issue: youtub-dl work in command line bot not work in php
Labels: question

it works when I use `youtub-dl --cookies cookies.txt --get-url $url` in LINUX terminal.

but it dose not work when I use `exec("youtub-dl --cookies cookies.txt --get-url $url");` in PHP.

and it work when I delete --cookies cookies.txt from code.

return : [youtube] yIRBMRTb260: Downloading webpage

WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[youtube] yIRBMRTb260: Downloading webpage
ERROR: yIRBMRTb260: YouTube said: Unable to extract video data

help please.
Repository: flutter
Issue: InteractiveViewer double tap to zoom
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-framework,triaged-framework

It should be easy to support double tap to zoom in InteractiveViewer, one way or another.

It's probably possible to do this currently, but it's pretty difficult:

  1. Pass a TransformationController to your InteractiveViewer.
  1. Listen to double taps by wrapping InteractiveViewer in a GestureDetector.
  1. On double tap, get the value of the TransformationController. Create a new Matrix4 by transforming the value matrix to whatever increase in zoom you want. Set value to the new matrix (or animate it).

Calculating the final matrix is probably the hardest part.  The simplest solution may be just to expose InteractiveViewer's internal transformation methods, like matrixScale in this case, that would make calculating the final matrix easy.

This came up in https://github.com/flutter/flutter/issues/63281#issuecomment-675578296.
Repository: neovim
Issue: clipboard provider is unable to invoke win32yank.exe on Cygwin
Labels: bug,io,has:plan,platform:cygwin,system

- `nvim --version`:

```
NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc.exe -march=x86-64 -mtune=generic -O2 -pipe -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/d/a/msys-repo/msys-repo/msys/neovim/src/build/config -I/d/a/msys-repo/msys-repo/msys/neovim/src/neovim-0.4.4/src -I/usr/include -I/d/a/msys-repo/msys-repo/msys/neovim/src/build/src/nvim/auto -I/d/a/msys-repo/msys-repo/msys/neovim/src/build/include
Compiled by runneradmin@fv-az177

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
```

- `vim -u DEFAULTS` (version: ) behaves differently? No
- Operating system/version: Cygwin on Windows 10
- Terminal name/version: Terminius Alpha 117
- `$TERM`: xterm-256color

### Steps to reproduce using `nvim -u NORC`

1. Build neovim on Cygwin.
2. Build and put win32yank.exe in PATH
3. Open nvim, type `"+yy`

### Actual behaviour

```
clipboard: error invoking win32yank:
```

### Expected behaviour

Current line is copied into Windows clipboard.
Repository: create-react-app
Issue: Webpack 5 support (module federation)
Labels: issue: proposal,tag: new feature

### Is your proposal related to a problem?

It would be great to be able to use federated modules in Webpack with a CRA application.

### Describe the solution you'd like

Provide support for Webpack 5 by upgrading the default Webpack version to 5. This was previously requested (https://github.com/facebook/create-react-app/issues/6081) but closed because Webpack 5 wasn't in beta at the time. It is now in beta and has had several releases.

### Describe alternatives you've considered

You could also allow an opt-in to using Webpack 5 ([just like Next.js does](https://nextjs.org/blog/next-9-5#webpack-5-support-beta)) when users initially run CRA from the command-line.
Repository: go
Issue: x/build/cmd/gerritbot: support multiple CL authors (Co-authored-by)
Labels: Builders,NeedsInvestigation,FeatureRequest,Community

The current gerrit and gerritbot workflow is designed assuming a single author for a CL. 
But we observed that often that is not always the case, and see features or changes that
involve multiple authors.

1) a PR is from the results of pair or group programming.
2) the original PR author couldn't continue for some reason so the maintainers or someone else have to finish it before merging.

Currently, gerritbot picks the last committer as the author if a PR involves multiple authors. 
(See https://github.com/golang/go/issues/38957)

Correctly checking CLA of all involved authors, and attributing contribution to 
everyone is important for open source projects.

I don't know if Gerrit supports multi-author workflows.
Github has support for multiple authors using `Co-authored-by` trailers. 
https://github.blog/2018-01-29-commit-together-with-co-authors/
Even when Gerrit wouldn't provide the support, I hope the gerritbot still can ensure 
CLA check to be run on all the authors (I think it already does) and include all the 
committers (except those merged during rebase?) with the `Co-authored-by` trailers 
before squashing.

cc @dmitshur @golang/osp-team