sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Add Dirichlet Multinomial to PyTorch Distributions
Labels: module: distributions,triaged,function request

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

The [Dirichlet-Multinomial distribution](https://en.wikipedia.org/wiki/Dirichlet-multinomial_distribution) is something I need for my research. TensorFlow has this distribution implemented (https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/DirichletMultinomial). Can someone please implement this distribution in PyTorch, or point me towards how I might implement it myself?

## Motivation

Common probabilistic language models (e.g. mixtures of unigrams) require using Dirichlet-Multinomial distributions.

## Pitch

Add the distribution to Pytorch. That is, there should be a distribution `torch.distributions.dirichlet.DirichletMultinomial`.


cc @fritzo @neerajprad @alicanb @vishwakftw @nikitaved
Repository: flutter
Issue: [local_auth] sticky auth causes the authentication prompt to display twice on some devices
Labels: e: device-specific,platform-android,p: local_auth,package,P2,team-android,triaged-android

I came across this issue using the example code from the plugin package page: https://pub.dev/packages/local_auth/example on the One Plus 7 Pro device running Android 10. When sticky auth is enabled it causes the prompt to display twice, even if you're correctly authorized the first time, after the second prompt, it goes back to your app view, see screen recording:

https://user-images.githubusercontent.com/1798070/114744432-fac21c80-9d4d-11eb-9886-b76ab9fdbfb7.mp4

```
environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter_bloc: ^7.0.0
  bloc: ^7.0.0
  provider: ^5.0.0
  equatable: ^2.0.0
  http: "^0.13.1"
  shared_preferences: "^0.5.3+4"
  flutter_flavorizr: ^1.0.9
  url_launcher: ^5.0.3
  json_annotation: ^3.0.1
  path_provider: ^1.6.14
  local_auth: ^1.1.4
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.0

dev_dependencies:
  build_runner: ^1.8.0
  flutter_launcher_icons: "^0.8.0"
  json_serializable: ^3.2.5
  flutter_test:
    sdk: flutter
```
Repository: terminal
Issue: Allow passing runtime tab parameters to _CreateNewTabFromSettings
Labels: Area-UserInterface,Product-Terminal,Issue-Task,Area-CodeHealth

# Description of the new feature/enhancement
Followup for https://github.com/microsoft/terminal/pull/9813 that manually sets the runtime tab text on the duplicated tab.
Instead of doing this we should allow passing a runtime state to `_CreateNewTabFromSettings.`
Repository: flutter
Issue: Automate commenting on issues when they are cherrypicked to a release channel
Labels: team,P2,team-release

Would be nice if cocoon monitored github webhooks on pushing commits to release branches, and commented to each issue affected the version that it had been merged in.

To get this, we would likely need to track issues in flutter conductor (right now it tracks the commits of the fix.
Repository: electron
Issue: [API design]: Consistency of platform-specific methods: no-op vs error
Labels: enhancement :sparkles:,discussion,bug :beetle:,api-review/requested 🗳

### Preflight Checklist

I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

12.0.0

### What operating system are you using?

macOS

### Operating System Version

11.2.3

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

_No response_

### Expected Behavior

Methods that are platform-specific, such as `app.dock` and `systemPreferences.getUserDefault`, should either be complete no-ops on other platforms, or should be missing/undefined, or trying to call them should throw an error.

If an error is to be thrown, ideally rather than "cannot read property 'x' of undefined", the user would get an explicit error such as "this method is only available on [platform]".

### Actual Behavior

As discussed [in this issue](https://github.com/electron/typescript-definitions/pull/183#pullrequestreview-635161043), currently there is some inconsistency between various platform-specific methods. The TypeScript definitions advertise that these methods are **not** optional, leading to runtime crashes that otherwise the TS compiler could've helped avoid. If the decision is to make these methods missing/errors on other platforms, then the TS definitions can be updated to help users avoid calling them on the wrong platform (actually this could be done even if they are no-ops).

### Testcase Gist URL

_No response_
Repository: terminal
Issue: Additional commands could be previewable
Labels: Help Wanted,Product-Terminal,Needs-Tag-Fix,Issue-Scenario,Area-CmdPal

This is a follow-up to #9794

### Potential follow-ups
* [ ] changing the font size
* [ ] changing the font face
* [x] changing the opacity of acrylic (#11205)
* [ ] Toggling acrylic?  (#2531)
* [ ] SetPixelShaderPath?
* [ ] SetWindowTheme (light/dark/system/<some theme from #3327>)?
* [x] `sendInput`, see 60f63b09c

Each of these could have default nested commands that have some example values. Like

```jsonc
{
    // Font size
    "name": { "key": "SetFontSizeCommandKey" },
    "commands": [
        { "command": { "action": "setFontSize", "size": 8 } },
        { "command": { "action": "setFontSize", "size": 10 } },
        { "command": { "action": "setFontSize", "size": 12 } },
        { "command": { "action": "setFontSize", "size": 16 } },
        { "command": { "action": "setFontSize", "size": 18 } },
        { "command": { "action": "setFontSize", "size": 24 } },
        { "command": { "action": "setFontSize", "size": 32 } },
        { "command": { "action": "setFontSize", "size": 48 } }
    ]
},

```
Repository: pytorch
Issue: [Meta] PyTorch features build/test matrix
Labels: module: build,module: ci,triaged

PyTorch build system has numerous controls to enable/disable integration with certain features. 
This issue will be used to track which options exists, which are CI tested and which are known broken.

- `USE_CUDA` - CI build and tests exists
- `USE_CUDNN` - Not tested
- `USE_DISTRIBUTED` - Implicitly tested in Mobile Bulds
- `USE_NNPACK` - Not tested
- `USE_QNNPACK` - Implicitly tested by Apple M1 builds
- `BUILD_CAFFE2` - CI build exits
- `USE_NUMPY` - Not tested

cc @malfet @seemethere @walterddr @ezyang @pytorch/pytorch-dev-infra
Repository: vscode
Issue: Allow execution of markdown cells
Labels: under-discussion,notebook-execution

There are a few related issues, but not sure they're the same.
https://github.com/microsoft/vscode/issues/120587
https://github.com/microsoft/vscode/issues/105933

If they are duplicates, please feel free to close this.

Requirement:
* Allow users to create markdown cells that can be executed.
* Currently markdown cells cannot be executed. I think we need to device a new language that looks and feels like markdown, but not executed.

Requirement is coming from here (Jupyter Kernel named SOS, https://vatlab.github.io/sos-docs/doc/user_guide/expand_capture_render.html)
I'm working on a separate extension that builds on top of Jupyter extension and VS Code API.

The only way I've managed to get this working in the past is to create a new language named `sos-markdown`.

Is the following possible:
* User installs Extension XYZ
* User has selected kernel `SOS` (this kernel is contributed by Jupyter extension)
* Extension XYZ, then updates the metadata in the document that allows markdown to be executed
* Now user can run markdown cells against the SOS Jupyter kernel (again kernel is provided by Jupyter extension).

Based on the current model in VS Code, the VS COde Kernel needs to tell VS COde what cells (languages) can & cannot be executed. 
However the problem with this is the (our official) Jupyter extension doesn't know about all different types of Jupyter Kernels out in the wild, hence cannot determine what cells can & cannot be executed. 

Probably best discussed offline in detail.

@rebornix @jrieken /cc
Repository: terminal
Issue: Remaining tabs are not resized when closing tabs
Labels: Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3,Tracking-External

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

1.8.1032.0

### Other Software

_No response_

### Steps to reproduce

Open a bunch of tabs, close all but a few with the keyboard.

### Expected Behavior

I expect tabs to be restored to their original size when the space allows for it.

### Actual Behavior

Tabs remain compacted indefinitely. The only way to get the tabs back to their expected size seems to be to grab the mouse and hover over the tab bar and then move the mouse off the tab bar again.
Repository: flutter
Issue: Debugging one isolate in multi-engine scenario
Labels: c: new feature,tool,a: existing-apps,a: debugging,P2,team-tool,triaged-tool

I'm using multiple flutter and try to connect to one of them, and i try to follow the link
[debugging-specific-instances-of-flutter](https://flutter.dev/docs/development/add-to-app/debugging#debugging-specific-instances-of-flutter) 
but the command line tool can not work as the website.
anyone can help?


## platform 
OS: windows 10
Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b1395592de (13 days ago) • 2021-04-01 14:25:01 -0700
Engine • revision 2dce47073a
Tools • Dart 2.12.2


## Steps to Reproduce
1. Run `flutter attach --isolate-filter='debug'`


```shell
PS D:\work\foo> flutter --version
Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b1395592de (13 days ago) • 2021-04-01 14:25:01 -0700
Engine • revision 2dce47073a
Tools • Dart 2.12.2

PS D:\work\foo> flutter attach --isolate-filter='debug'
Could not find an option named "isolate-filter".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.

```

```
$flutter doctor -v
[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.867], locale zh-CN)
    • Flutter version 2.0.4 at D:\tools\flutter_windows_2.0.1-stable\flutter
    • Framework revision b1395592de (13 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\wungcq\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: D:\tools\AndroidStudio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at D:\tools\AndroidStudio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (3 available)
    • MIX 2 (mobile) • 6f7c29fd • android-arm64  • Android 9 (API 28)
    • Chrome (web)   • chrome   • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)     • edge     • web-javascript • Microsoft Edge 89.0.774.75

• No issues found!

```
Repository: pytorch
Issue: Optionally include padding_idx items in the EmbeddingBag reduction
Labels: feature,module: nn,triaged,module: embedding

## 🚀 Feature
The current implementation of `EmbeddingBag` specifically excludes the embedding vector at `padding_idx` from the sum / mean / max reduction to avoid skew. This issue proposes a new flag (default False) that toggles this behavior and optionally includes the embedding vector at `padding_idx` in the reduction.

## Motivation
It's possible for both `Embedding` and `EmbeddingBag` to have a non-zero embedding vector at `padding_idx`. If this has some semantic meaning within the embedding space, perhaps it's important for some use cases to include these in the sum / mean / max reduction?

## Pitch
Add a new, default False flag (`reduce_padding`? name TBD) to toggle inclusion / exclusion of `padding_idx` items in the sum / mean / max reduction.
```python
from torch import nn

emb = nn.EmbeddingBag(..., padding_idx=0, reduce_padding=True)
emb2 = nn.EmbeddingBag.from_pretrained(
    ..., padding_idx=0, reduce_padding=True)
```

## Alternatives
No flag; keep current behavior of excluding embedding vector at `padding_idx` from the `EmbeddingBag` reduction.

cc @albanD @mruberry @jbschlosser
Repository: pytorch
Issue: A more flexible torch.hub search strategy
Labels: feature,triaged,module: hub

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

A more sophisticated search strategy for `torch.hub` as initially described on the [discussion group](https://discuss.pytorch.org/t/hub-search-path/116793), allowing multiple directories to be searched for downloaded model weights.


## 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 -->

I’m part of a larger team of researchers and I’m trying to establish how we can share a repository of pre-trained model weights. In general, we do not have unrestricted internet access.

As things currently stand the pytorch hub checks one location for model weights - defined either by `$TORCH_HOME/hub/checkpoints` or the path provided to an earlier call to `torch.hub.set_dir()`.

Individual developers may also want to install various models from third-party sources, so presently each researcher has to make their own local copy of the shared model weights as we cannot isolate models shared among researchers from their local sandbox.

Having multiple copies of what are meant to be the same models could lead to subtle reproducibility issues.

## Pitch

<!-- A clear and concise description of what you want to happen. -->

One possible solution would be a colon-separated search path, configurable via environment variable, which would be searched sequentially by `torch.hub.load_state_dict_from_url()` (and related functions) for cached weights. This would be analogous to `PYTHONPATH` or `LD_LIBRARY_PATH`.

Therefore, “standard” models (such as those provided by torchvision) can be manually downloaded _once_ into an area (which will generally be read-only for most users), and that location would likely be specified towards the front of the proposed search path.

Weights downloaded (because they cannot be found in the search path) would be saved into the first such path which has the appropriate access rights. This would ordinarily be the user's local sandbox.

Thus, organizations could configure this environment variable such as to allow a hierarchy of locations (e.g. company -> project -> user) from which models can be sourced and stored with a degree of flexibility.

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

No specific alternatives considered. 

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->

torch.hub [documentation](https://pytorch.org/docs/stable/hub.html#where-are-my-downloaded-models-saved).


cc @ailzhang
Repository: go
Issue: cmd/compile: unnecessary slice literal zeroing
Labels: Performance,NeedsFix,compiler/runtime

Keyless slice literals zero the backing array and then immediately overwrite it. https://godbolt.org/z/5bx9TPo7n

### What operating system and processor architecture are you using?

linux amd64

### What did you do?

``` go
package main

func main() {
    a := []int{1, 2, 3, 4}
    println(a)
}
```

### What did you expect to see?

```
movq    $1, ""..autotmp_2+24(SP)
movq    $2, ""..autotmp_2+32(SP)
movq    $3, ""..autotmp_2+40(SP)
movq    $4, ""..autotmp_2+48(SP)
```

### What did you see instead?

```
leaq    ""..autotmp_2+24(SP), AX
xorps   X15, X15
movups  X15, (AX)
leaq    ""..autotmp_2+40(SP), CX
xorps   X15, X15
movups  X15, (CX)
movq    $1, ""..autotmp_2+24(SP)
movq    $2, ""..autotmp_2+32(SP)
movq    $3, ""..autotmp_2+40(SP)
movq    $4, ""..autotmp_2+48(SP)
```
Repository: react
Issue: Bug: ESLint react-hooks/exhaustive-deps rule false positive on constants made with constant expressions
Labels: Type: Enhancement,Status: Unconfirmed,Component: ESLint Rules

<!--
  Please provide a clear and concise description of what the bug is. Include
  screenshots if needed. Please test using the latest version of the relevant
  React packages to make sure your issue has not already been fixed.
-->

React version: 16.14.0 & 17.0.2

## Steps To Reproduce

1. Create a constant variable with an expression made of only constants.
2. Run ESLint

<!--
  Your bug will get fixed much faster if we can run your code and it doesn't
  have dependencies other than React. Issues without reproduction steps or
  code examples may be immediately closed as not actionable.
-->

Code example:

```jsx
const a = 1
const b = 2 / 3
const c = -1
const d = +1

useEffect(() => {
  void a
  void b
  void c
  void d
}, [])
```

CodeSandbox: https://codesandbox.io/s/funny-wilson-33zxb

<!--
  Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
  repository on GitHub, or provide a minimal code example that reproduces the
  problem. You may provide a screenshot of the application if you think it is
  relevant to your bug report. Here are some tips for providing a minimal
  example: https://stackoverflow.com/help/mcve.
-->

## The current behavior
I see the following ESlint warning:
> React Hook useEffect has missing dependencies: 'b', 'c', and 'd'. Either include them or remove the dependency array. (react-hooks/exhaustive-deps)

## The expected behavior
I see no warning.

In my example the `a` variable is skipped in the ESlint warning, but not the other three variables even those they are all constant expressions.
Repository: go
Issue: x/net/http2: no way to set timeouts on http2.Transport
Labels: NeedsInvestigation

I'm using the http2.Transport with a h2c client, which works fine, but there is no way to set timeouts which are normally inherited from regular http.Transport - for example ExpectContinueTimeout, which when using manually constructed http2.Transport{} is always set to 0, and therefore the client doesn't wait for the 100-continue response.

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.2 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
</pre></details>

### What did you do?

Sent a h2c client request with `Expect: 100-continue`, but the client doesn't wait to send the body because there's no way to set the ExpectContinueTimeout, which means it ends up being 0.

### What did you expect to see?

There should be a way to set the timeouts, so the client would have waited to send the request body.
Repository: pytorch
Issue: Converting float16->bool causes an internal compiler error with llvm
Labels: NNC

This test: https://github.com/pytorch/pytorch/blob/master/test/test_jit_fuser_te.py#L1322 exposes an LLVM bug in trying to vectorize half->bool conversion.  The error looks like:
```
LLVM ERROR: Cannot select: 0x6210017cd258: v16i8 = truncate 0x6210017cd7a0
  0x6210017cd7a0: v16i1 = concat_vectors 0x6210017d60c8, 0x6210017d6200
    0x6210017d60c8: v8i1 = or 0x6210017d6408, 0x6210017d08a8
      0x6210017d6408: v8i1 = insert_subvector 0x6210017d2e38, 0x6210017d5500, Constant:i64<0>
        0x6210017d2e38: v8i1 = BUILD_VECTOR Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>, Constant:i8<0>
          0x6210017d2d68: i8 = Constant<0>
          0x6210017d2d68: i8 = Constant<0>
...
```

I don't think this is NNC misusing LLVM IR, either, since this can be reproduced via clang: https://gcc.godbolt.org/z/sfxPoa19z.  It appears to be fixed in llvm 11.

It's possible to work around, I think, by directly using platform specific half->float intrinsics.  As an example of how to do this @ajtulloch pointed me to his optimization in tvm for vectorizing half floats: https://github.com/apache/tvm/pull/2925
Repository: pytorch
Issue: [JIT] Merge/reconcile `__jit_unused_properties` and `__jit_ignored_attributes__`
Labels: oncall: jit

`__jit_unused_properties__` -> used for ignoring class type properties
`__jit_ignored_attributes__` -> used for skipping compilation of any module attribute (including submodules and properties)

Confusingly, both can be used to ignore module properties and [sometimes, only one works](https://fb.workplace.com/groups/329222650990087/permalink/872482303330783/).

Proposal: `__jit_unused_properties__` should not work for modules at all.

cc @gmagogsfm
Repository: pytorch
Issue: [package] implicit externing can miss cases where the stdlib depends on further stdlib modules
Labels: triaged

Our implicit externing logic says: "we encounter a dependency on the Python standard library, automatically extern it."

However, we do not search the standard library module for *its* dependencies. So we are potentially missing externs that are necessary for the packaged module to work.

Here is a small example of how this might happen.
```
from textwrap import dedent
from io import BytesIO

import torch

buffer = BytesIO()
with torch.package.PackageExporter(buffer) as pe:
    pe.save_source_string(
        "foo",
        dedent(
            """\
            import datetime  # depends on the `time` module

            revision_epochtime = 1618444857
            local_tzinfo = datetime.datetime.now().astimezone().tzinfo
            revision_datetime = datetime.datetime.fromtimestamp(revision_epochtime, local_tzinfo )
            revision_datetime_str = revision_datetime.strftime("%Y-%m-%d %H:%M:%S %Z")
            """
        ),
    )

buffer.seek(0)
importer = torch.package.PackageImporter(buffer)
importer.import_module("foo")  # error!
```
Repository: godot
Issue: Button is stuck in hovering state after tapping on touch screen
Labels: bug,confirmed,topic:input,topic:gui

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.3 rc 8

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
<!-- What happened, and what was expected. -->
tap a button on touch device, it show the hover state. the normal state is expected after tap.


**Steps to reproduce:**



**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: storybook
Issue: CLI: `sb add` should update main.js
Labels: feature request,cli

When we use `sb add` to add an addon, it should also update the `addons` field in `.storybook/main.js`

>  edit `main.js` to enable the a11y addon (why isn't it done by  `sb add`?)

_Originally posted by @stof in https://github.com/storybookjs/storybook/issues/14538#issuecomment-819799037_