sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.unique signature is not descriptive
Labels: module: docs,triaged

## 📚 Documentation

![image](https://user-images.githubusercontent.com/5652049/135527775-09214080-b6aa-4824-b053-66d8e7bddf2b.png)

It should not say *args and *kwargs


cc @brianjo @mruberry
Repository: pytorch
Issue: Storage `is` should work if the storages "are the same"
Labels: feature,triaged

## 🚀 Feature
If two storages are the same, Python `is` should work (or there should be some way of testing this).

## Motivation

See https://github.com/pytorch/pytorch/pull/65819#discussion_r719460653.
Repository: TypeScript
Issue: tsc --init-basic
Labels: Suggestion,Awaiting More Feedback

# Suggestion

As a professional TypeScript developer, I start new TS projects all the time. I use `tsc --init` sometimes, but more often than not I copy `tsconfig.json` files from other projects because I find the `tsconfig.json` file that is generated to be horribly spammy.

Having a `tsc --init` command *is* valuable to me, because quite often I want to bootstrap a project quickly, but the comments get in my way, as they make it harder to read what the actual config of a project is, and generally look really messy. If I ever run `tsc --init` the first thing I do is strip out these comments.

I'd really appreciate a `tsc --init-basic` (or something like it) that provides the same basic configuration set but without any comments.

* Note; I suspect this would be super simple to implement, and I'm looking for opportunities to start contributing, so if anyone can point me towards the appropriate area in the codebase, I'd be happy to submit this change myself.

## 🔍 Search Terms

tsconfig comments init 

## ✅ Viability 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
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: Remove the Android embedding v1 
Labels: platform-android,engine,c: proposal,P2,team-android,triaged-android

This issue tracks the removal of the Android embedding v1
Repository: godot
Issue: Mipmap generation generates incomplete mip-chains and has inconsistent internal formats
Labels: bug,topic:rendering

### Godot version

3.x

### System information

iPhone 11, macOS

### Issue description

Some discovered via https://github.com/godotengine/godot/pull/53275

The code for mipmap generation is mis-aligning internal level formats (at least between level0 and level1).    Verified in `RasterizerCanvasBaseGLES3::_copy_texscreen` but could be in `RasterizerSceneGLES3::_blur_effect_buffer` as well.

When accessing these texture two openGL warnings below:

![Screen Shot 2021-09-30 at 11 23 29 PM](https://user-images.githubusercontent.com/323868/135569658-c7a601d7-81e5-41ab-9f3c-c57d0936f378.png)

I believe @clayjohn has an idea of the cause, surrounding how the rendertarget allocation is setup.

### Steps to reproduce

Check opengl errors and state with external tool, when using a shader program which accesses SCREEN_TEXTURE (which causes a screen texture mipmap gen).

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: traced EmbeddingBag cannot be used with different batch size, functional.embedding_bag is not de
Labels: oncall: jit

## 🐛 Bug

Traced `nn.EmbeddingBag` cannot be used with input of different batch size.

* `nn.EmbeddingBag` works, so I expect `nn.EmbeddingBag` should work.
* Wrapping `torch.jit.script` to `F.embedding_bag` solves the problem.
But in here in the [doc](https://pytorch.org/docs/1.9.1/jit_builtin_functions.html#builtin-functions) it says `F.embedding_bag` is supported pytorch function for TorchScript.

## To Reproduce

Steps to reproduce the behavior:

1. `docker pull pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel`
2. Run the following code.
```python3
import unittest
from typing import Optional

import torch
import torch.nn.functional as F
from torch import Tensor, nn


def traced_forward(
    self, input: Tensor, offsets: Optional[Tensor] = None, per_sample_weights: Optional[Tensor] = None
) -> Tensor:
    """this is copied & modified from nn.EmbeddingBag.forward"""
    fn = torch.jit.script(F.embedding_bag)
    return fn(
        input,
        self.weight,
        offsets,
        self.max_norm,
        self.norm_type,
        self.scale_grad_by_freq,
        self.mode,
        self.sparse,
        per_sample_weights,
        self.include_last_offset,
        self.padding_idx,
    )

old_forward = nn.EmbeddingBag.forward
input1 = torch.tensor([[0, 1, 2]])
input2 = torch.cat([input1, input1], dim=0)


class Test(unittest.TestCase):
    def test_Embedding_works(self):
        model = nn.Embedding(num_embeddings=3, embedding_dim=5)
        cpu_traced = torch.jit.trace(model, input1, check_inputs=[input2])

    @unittest.expectedFailure
    def test_EmbeddingBag_does_not_work(self):
        nn.EmbeddingBag.forward = old_forward
        model = nn.EmbeddingBag(num_embeddings=3, embedding_dim=5)
        cpu_traced = torch.jit.trace(model, input1, check_inputs=[input2])

    def test_EmbeddingBag_traced_forward_works(self):
        nn.EmbeddingBag.forward = traced_forward
        model = nn.EmbeddingBag(num_embeddings=3, embedding_dim=5)
        cpu_traced = torch.jit.trace(model, input1, check_inputs=[input2])


if __name__ == "__main__":
    unittest.main()
```
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

```
/opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py:974: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error:
expected tensor shape torch.Size([2, 5]) doesn't match with actual tensor shape torch.Size([1, 5])!
  _module_class,
x..
----------------------------------------------------------------------
Ran 3 tests in 0.127s

OK (expected failures=1)
```
## Environment

```
docker pull pytorch/pytorch:1.9.0-cuda11.1-cudnn8-devel
```

cc @albanD @mruberry @jbschlosser @walterddr
Repository: pytorch
Issue: libtorch: collate_fn equivalent
Labels: module: cpp,module: dataloader,triaged,enhancement

## 🚀 Feature
In PyTorch one can use `collate_fn` of/in a `DataLoader` in order to modify the batch sampling of the DataLoader. As far as I know, this is not possible in the C++-API / libtorch.

## Motivation

In order to support different dimensional input (like in my case images) this would be helpfull, because:

* One could apply some preprocessing steps like padding or cropping
* Or use the conv-layers of the CNN/NN in question performing a feature extraction resulting in an equally sized batch samples.

Right now there will occur some error in the batch sampling process (stack will throw an error because of different sized tensors).

## Pitch

It would be ideal, if it would be possible to

* Either define some `collate_fn` function like in PyTorch, or
* Get some tutorial-like instructions how to do this correctly.

## Alternatives

In the end I ended up overriding `get_batch(at::ArrayRef<size_t> indices)` ([stackoverflow-post](https://stackoverflow.com/questions/69358675/how-to-use-collate-fn-in-libtorch/69372321#69372321)) which is not ideal causing an error if the number of the dataLoders workers is greater than 0.

cc @yf225 @glaringlee @SsnL @VitalyFedyunin @ejguan @NivekT
Repository: pytorch
Issue: torch.cuda.power_usage (ESG 🌱)
Labels: module: cuda,oncall: profiler

## 🚀 Feature

`torch.cuda.power_usage` is required to track current power consumption.

## Motivation

It would be great to be able to calculate the power consumption while training the neural network.

We can track the current energy consumption after each batch and multiply it by the time for each batch. This way we can get an approximate total energy consumption.

For example, Cloudflare tracks [carbon emissions per byte](https://blog.cloudflare.com/introducing-smart-edge-revalidation/#:~:text=carbon%20emissions%20per%20byte).

PyTorch = ESG machine learning framework 

Related:
https://github.com/pytorch/pytorch/issues/65870
https://discuss.pytorch.org/t/energy-consumtion-per-layer

cc @ngimel @ilia-cher @robieta @chaekit @gdankel @bitfort @orionr @nbcsm @guotuofeng @guyang3532 @gaoteng-git
Repository: rust
Issue: Unrelated generic parameter causes "unconstrained generic constant"
Labels: C-bug,A-const-generics,requires-nightly,F-generic_const_exprs,requires-incomplete-features

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

The following code will not compile on the latest nightly (aa7aca3b9 2021-09-30):

```rust
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

fn foo<const A: usize>(a: [u32; A]) -> [u32; A + 1] {
    panic!()
}

const LEN: usize = 1;

fn bar<const N: usize>() {
    foo::<LEN>([123]);
}
```

Removing the unused parameter `<const N: usize>` on line 11 makes the example compile again.

Error:

```
Compiling playground v0.0.1 (/playground)
error: unconstrained generic constant
  --> src/lib.rs:11:5
   |
11 |     foo::<LEN>([123]);
   |     ^^^^^^^^^^
   |
   = help: try adding a `where` bound using this expression: `where [(); A + 1]:`
note: required by a bound in `foo`
  --> src/lib.rs:4:46
   |
4  | fn foo<const A: usize>(a: [u32; A]) -> [u32; A + 1] {
   |                                              ^^^^^ required by this bound in `foo`

error: unconstrained generic constant
  --> src/lib.rs:11:5
   |
11 |     foo::<LEN>([123]);
   |     ^^^^^^^^^^^^^^^^^
   |
   = help: try adding a `where` bound using this expression: `where [(); A + 1]:`
note: required by a bound in `foo`
  --> src/lib.rs:4:46
   |
4  | fn foo<const A: usize>(a: [u32; A]) -> [u32; A + 1] {
   |                                              ^^^^^ required by this bound in `foo`

error: could not compile `playground` due to 2 previous errors
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.57.0-nightly (aa7aca3b9 2021-09-30)
binary: rustc
commit-hash: aa7aca3b954131720df725e70d12e902eb3be1de
commit-date: 2021-09-30
host: x86_64-apple-darwin
release: 1.57.0-nightly
LLVM version: 13.0.0
```
Repository: youtube-dl
Issue: thedailybeast.com
Labels: site-support-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 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support 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 new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [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.thedailybeast.com/john-lithgow-nails-total-embarrassment-rudy-giuliani-on-colbert

## Description

Plays OK on Firefox.  youtube-dl reports "ERROR: Unsupported URL"
Repository: material-ui
Issue: TypeScript option --exactOptionalPropertyTypes is not supported
Labels: new feature,typescript


## Current Behavior 😯

Trying to compile (TypeScript) any example from the section about the Autocomplete component fails with type errors like:

![billede](https://user-images.githubusercontent.com/3158580/135598108-f3696de2-0fdc-438a-b2e9-be41f43897c0.png)

It is obviously not absolutely necessary to be able to use that option, but it would be nice if it worked. Otherwise it should probably be well documented, that you can not use --exactOptionalPropertyTypes with MUI.

## Your Environment 🌎

<details>
  <summary>

**@mui/envinfo**

System:
    OS: Windows 10 10.0.19043
  Binaries:
    Node: 16.5.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 7.19.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1023.0), Chromium (94.0.992.31)
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/core:  5.0.0-alpha.49
    @mui/icons-material: ^5.0.1 => 5.0.1
    @mui/material: ^5.0.2 => 5.0.2
    @mui/private-theming:  5.0.1
    @mui/styled-engine:  5.0.1
    @mui/styles: ^5.0.1 => 5.0.1
    @mui/system:  5.0.2
    @mui/types:  7.0.0
    @mui/utils:  5.0.1
    @types/react: ^17.0.26 => 17.0.26
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript: ^4.4.3 => 4.4.3

**tsconfig.json**

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "exactOptionalPropertyTypes": true,
    "noImplicitOverride": true,
    "useUnknownInCatchVariables": true
  },
  "include": ["src"]
}

</summary>

</details>
Repository: PowerToys
Issue: Long inputs in PowerToys Run cause the grey preview text to not line up.
Labels: Issue-Bug,Product-PowerToys Run,Area-User Interface

### Microsoft PowerToys version

0.47.0

### Running as admin

- [X] Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

Open PowerToys run with alt + space.
Type in a long input with a suggestion (e.g. Registry locations)

### ✔️ Expected Behavior

The grey preview text lines up with the already inputted text.

### ❌ Actual Behavior

It doesn't line up, but starts at the start of the box despite the inputted text scrolling.
![image](https://user-images.githubusercontent.com/54776821/135603476-f0c8a418-91b5-404a-a58a-c0e4716380ef.png)

### Other Software

_No response_
Repository: electron
Issue: [Bug]: Window resizes when setting resizable: false
Labels: platform/windows,bug :beetle:,status/confirmed,component/BrowserWindow,25-x-y,26-x-y,27-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] 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

13.5.1

### What operating system are you using?

Windows

### Operating System Version

Windows 10 21H1

### What arch are you using?

x64

### Last Known Working Electron version

13.4.0

### Expected Behavior

Window should keep size when calling setResizable(false).

### Actual Behavior

Window (and content size) increases by 10px when calling setResizable(false).

### Testcase Gist URL

https://gist.github.com/CliffReimers/cfc4784579006b79cef11c34c3a042b5

### Additional Information

Probably caused by https://github.com/electron/electron/pull/31078.
Repository: godot
Issue: Invalid cross includes that do not respect area encapsulation rules
Labels: bug,topic:core,topic:buildsystem,tracker

### Godot version

4.0.dev (06c1b40b)

### System information

Any

### Issue description

The engine codebase is compartmentalized in areas/folders which have a defined dependency order to prevent both cyclic dependencies and general bad design patterns.

To ensure this encapsulation, we need to make sure that we don't include headers from high level areas in low level areas. For example `core` is the lowest level area, so it shouldn't include headers from any other folder (aside from `thirdparty`, which is independent from Godot code).

We should add CI checks to prevent adding such invalid includes, but first we need to fix the problems we already have in the codebase (#29730 is related, this issue is the same but for the whole codebase/dependency path).

The dependency order should follow the build order as defined here:
https://github.com/godotengine/godot/blob/06c1b40b84645b4460dd49d95694a7779d636f92/SConstruct#L724-L737

- core
- servers
- scene
- drivers (no issue)
- editor
- modules
- tests (no issue)
- main
- platform (no issue since last)

I'll list invalid includes in comments for each folder/area.

### Steps to reproduce

n/a

### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: PDF Preview can be a 100%
Labels: Idea-Enhancement,Product-File Explorer

### Description of the new feature / enhancement

Could be possible that the preview of PDF files will be at 100% view ?

### Scenario when this would be used?

In file explorer preview pane

### Supporting information

_No response_
Repository: flutter
Issue: [video_player] Azure Media File is not streamable
Labels: platform-web,p: video_player,package,P2,team-web,triaged-web

## Use case

I'm trying to reproduce an Azure Media File like this 'https://myURL.ism/manifest' but I have not been able to reproduce the live streaming. I'm using the dash URL because I'm trying to reproduce it in a web page(chrome)

`@override`
`void initState() {`
`super.initState();`
` videoPlayerController = VideoPlayerController.network(`
`'https://myURL.ism/manifest(format=mpd-time-csf)', formatHint: VideoFormat.dash);`
` videoPlayerFuture = videoPlayerController.initialize();`
`    }`
## Question

Is there any configuration I am missing for this to work properly? I have seen this in stackoverflow but it did not help much.

[stackAnswer](https://stackoverflow.com/questions/58844066/azure-media-services-flutter)
Repository: deno
Issue: Provide option to disable automatic `content-encoding` handling for `fetch`
Labels: suggestion

By default we follow the `fetch` specification's implementation of body compression: we automatically set setting `accept-encoding` on outgoing `fetch` requests, and automatically decompress bodies when a `content-encoding` header is present.

We should support disabling this behaviour for advanced usecases and to prevent double compression. I imagine this could be added through `Deno.HttpClient`:

```js
const client = Deno.createHttpClient({
  contentEncoding: "off", // default of "auto"
});
const resp = await fetch("https://example.com/foo.gz", { client }); // would be sent without `accept-encoding`

// the body is a gzipped file
const gzipBody = resp.body;
const clearBody = gzipBody.pipeThrough(new DecompressionStream("gz");
```
Repository: go
Issue: x/pkgsite: missing functions for unexported embedded struct
Labels: NeedsInvestigation,pkgsite

The [wui library documentation](https://pkg.go.dev/github.com/gonutz/wui/v2) is missing some functions.

Take the `Button`: it has an embedded `textContol` struct which in turn embeds `control` which has exported function `SetX`. Here are the code links: 

[Button](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/v2/button.go#L9)
[textControl](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/control.go#L267)
[control](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/control.go#L71)
[control.SetX(x int)](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/control.go#L141)

Now the documentation does not list `SetX` under the `Button` type.

This is true for a number of types but not for all of them.

As a counter example, `SetX` is [documented](https://pkg.go.dev/github.com/gonutz/wui/v2#FloatUpDown.SetX) to be part of `FloatUpDown` which has one more indirection by embedding `textEditControl`, which then embeds `textControl` as above.

[FloatUpDown](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/v2/float_up_down.go#L20)
[textEditControl](https://github.com/gonutz/wui/blob/af3a18b4cafc0e9113787deccd2809c0ded0de27/v2/control.go#L356)

I suspect this might be a corner case with unexported embedded structs which have exported functions.