sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Add name to Class Parameter()
Labels: oncall: distributed,module: nn,triaged,enhancement,module: rpc

## 🚀 Feature
Add name to Class Parameter() [link] (https://github.com/pytorch/pytorch/blob/master/torch/nn/parameter.py).


## Motivation
Currently, parameter names are available via `nn.Module.name_parameter()`, it is good enough for a model that locates on a single machine. However, once we start to pass parameters around via RPC, a stable name inside `class Parameter()`  become really handy. 
A stable name facilitate a lot of distributed use cases, say we need to save a distributed model "distributedly", an obvious key to look up a parameter (for offline manipulation or restoring) is the parameter name. And debugging a distributed model will be easier too.

There are couple requirement for this name 
1. The name should be stable. If one instantiates the same model class multiple times, the name of a particle parameter should be exactly the same.
2. The name should be readable. 
3. The name might need to reflect a certain set (not all) of operation on the parameter. e.g. a `detach()` parameter will have the keyword "detached" in it. 


P.S. I did a quick search and did not see an issue for this, feel free to dupe it if there is an open one already.

cc @albanD @mruberry @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar
Repository: flutter
Issue: [Web] Web does not support animation sheet golden tests
Labels: a: tests,c: new feature,framework,a: animation,platform-web,P3,team: skip-test,team-web,triaged-web

https://github.com/flutter/flutter/pull/55527 added animation sheet golden tests, which would be very useful when testing the animation of widgets. However it is implemented using screenshots, which is not supported by Web. It'd be great to find a way to support it.

More specifically, the current approach takes a screenshot of the target widget after every passed interval, and displays them in a grid afterwards.

Multiple solutions were considered before we ended up choosing the current one, despite knowing it was web-incompatible:
1. Move the target widget to a new position, and displays a new widget at the front. In this way, the animating widget will be displayed backwards.
   - Problem: We want to support interacting with the widget. This approach interrupts such interactions.
2. Render the target widget at both a new location and the original location, which is used for interactions.
   - Problem: Flutter does not support either cloning widget states, or rendering the same object twice.
Repository: pytorch
Issue: torch.cartesian_prod(*tensors) error when you have tensors with [x,y]
Labels: triaged,module: linear algebra

## To Reproduce

Steps to reproduce the behavior:
```
a = [[1,1], [2,3], [3,5]]

b = [[4, 5], [3,6]]

print(list(itertools.product(a, b)))

tensor_a = torch.tensor(a)

tensor_b = torch.tensor(b)

#torch.cartesian_prod(tensor_a, tensor_b)

torch.cartesian_prod(tensor_a, tensor_b)

```

## Error:

```
[([1, 1], [4, 5]), ([1, 1], [3, 6]), ([2, 3], [4, 5]), ([2, 3], [3, 6]), ([3, 5], [4, 5]), ([3, 5], [3, 6])]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-346-78fb1274668d> in <module>
      4 tensor_a = torch.tensor(a)
      5 tensor_b = torch.tensor(b)
----> 6 torch.cartesian_prod(tensor_a, tensor_b)

c:\users\hbb9279\appdata\local\programs\python\python37\lib\site-packages\torch\functional.py in cartesian_prod(*tensors)
    603                 [3, 5]])
    604     """
--> 605     return torch._C._VariableFunctions.cartesian_prod(tensors)
    606 
    607 

RuntimeError: Expect a 1D vector, but got shape [3, 2]
```

## Expected behavior

`torch.cartesian_prod` does not work like itertools.product when you have more than one dimension

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 Collecting environment information...
PyTorch version: 1.3.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Microsoft Windows 10 Enterprise
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration: GPU 0: Quadro P6000
Nvidia driver version: 426.00
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.17.3
[pip3] pytorch-transformers==1.2.0
[pip3] torch==1.3.0
[pip3] torchvision==0.4.1
[conda] Could not collect

## Additional context

<!-- Add any other context about the problem here. -->


cc @vincentqb @vishwakftw @SsnL @jianyuh
Repository: rust
Issue: Missing PartialEq<&str> impls on Path and PathBuf
Labels: T-libs-api,C-feature-request,A-str

Given that `&OsStr` is comparable to `&str`, I would expect `&Path` (and `PathBuf`) to be comparable to `&str` since `&OsStr` and `&Path` can freely convert to each other.

## Example

```rust
use std::path::{Path, PathBuf};

fn main() {
    let path = PathBuf::from("-");
    println!("{}", path == Path::new("-"));
    println!("{}", path.as_os_str() == Path::new("-"));
    println!("{}", path.as_os_str() == "-");
    println!("{}", path == "-");
    let path = Path::new("-");
    println!("{}", path == PathBuf::from("-"));
    println!("{}", path.as_os_str() == Path::new("-"));
    println!("{}", path.as_os_str() == "-");
    println!("{}", path == "-");
}
```

## Playground

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=acfe18e120c54faf105d655c12a86ea7
Repository: TypeScript
Issue: Add readonly for all possible function parameter for lib.dom.d.ts
Labels: Bug,Domain: lib.d.ts

<!-- 🚨 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

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

library, dom
## Suggestion

Add readonly for all possible function parameter for `lib.dom.d.ts`

## Examples

Here is an example for add readonly props for constructor:

```ts
declare var URLSearchParams: {
    prototype: URLSearchParams;
    new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
    toString(): string;
};
```

It should be

```ts
declare var URLSearchParams: {
    prototype: URLSearchParams;
    new(init?: ReadonlyArray<readonly [string,string]> | Readonly<Record<string, string>> | string | URLSearchParams): URLSearchParams;
    toString(): string;
};
```

then I can use
```ts
const myGlobalConfig = {
    myURLSearchParamsInit1: [['foo','bar']],
    myURLSearchParamsInit2: {foo:'bar'}
} as const;
const params = new URLSearchParams(myGlobalConfig.myURLSearchParamsInit1)
```
Repository: godot
Issue: Use Local Space doesn't work when multiple Spatials are selected
Labels: bug,topic:editor,usability

**Godot version:**

v3.2.1

**Issue description:**

Use Local Space doesn't work when more than one Spatial is selected.
![image](https://user-images.githubusercontent.com/28286961/80679034-64ed9d00-8abc-11ea-988d-31ad038580a5.png)

This shouldn't happen when every node has the same transform.

**Steps to reproduce:**

Create two MeshInstances, move them away from each other, select both and rotate them. Then select Use Local Space and move them. It will use global space.

**Minimal reproduction project:**

[LocalSpaceBug.zip](https://github.com/godotengine/godot/files/4556471/LocalSpaceBug.zip)
Repository: flutter
Issue: Native widgets should support fromMap factory
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

Someties developer need to make a dynamic decorator (wrap a widget in another widget programatiacally or style current widget with pre-defined set of styles) and with how things are implemented currently, this is not possible.

## Proposal

```dart

Map<String, dynamic> containerData = {
"margin": EdgeInsets.all(10.0),
"color": Colors.pink,
"width" : 25.0
};

Widget container = Container.fromMap(containerData);
```

The content (child) could be set either from the map or by method such as `.setChild();`

This would immensly help.
Repository: excalidraw
Issue: How to use https
Labels: support

Hi,
can I run the excalidraw docker container with https support?
Repository: PowerToys
Issue: PowerSymlink - Creates Symlinks from Context Menu ("mklink /D")
Labels: Idea-New PowerToy

Please add a **PowerToy to create Symlinks** from the Windows Explorer context menu.

For web projects, I often have to create symlinks (using `mklink /D`) from the command line. Having this feature in the Windows Explorer context menu will be a great time-saver.

The context menu should have two entries for this new PowerToy:

1) **Only, if folder/file is selected** - Context menu shows "**PowerSymlink - link to ...**"
 - (_Idea: Maybe it's possible here to use the a modified version of the existing Windows "Create new Shortcut" feature._)
 - The click opens a popup with title "Set Symlink destination name". 
 - This popup contains a text field for the Symlink destination filename, a folder selector button, and a confirm button. 

2) Context menu shows "**PowerSymlink - create new**" (visible with or without selection)
 - Implementation like the existing Windows "Create new Shortcut" functionality (See screenshot)
 - If folder is selected, this folder is automatically set in the popup.

The following command is used by me normally to created symlinks on the command-line. The context menu entry for symlinks will also help to make less mistakes while creating symlinks for sure.

`mklink /D "C:\Users\username\Local Sites\__CHANGE-PROJECT-NAME__\app\public\wp-content\plugins\__CHANGE-PLUGIN-FOLDER-NAME__" "C:\Users\username\Local Sites - Shared Project Data\plugins\__CHANGE-PLUGIN-FOLDER-NAME__"`

### More ideas:

- Popup: It should be possible to direct copy and paste of the complete path including not yet existing filename in the text field. If the file does not exits, a confirm popup asks, if you really want to create this Symlink destination.

![symlink_3](https://user-images.githubusercontent.com/827658/80686640-4d68e100-8ac9-11ea-9c73-ffebea627ac7.jpg)

![windows-shortcut](https://user-images.githubusercontent.com/827658/80685006-d599b700-8ac6-11ea-8c0a-c1463b96be2f.jpg)
Repository: flutter
Issue: [flutter_driver] Support finding/tapping gesture recognizer on TextSpan from RichText
Labels: a: tests,c: new feature,framework,t: flutter driver,a: typography,P2,team-framework,triaged-framework

I have faced this problem while writing gherkin BDD integration test for my flutter application where I am not able to get the driver tapped on TextSpan items under RichText, I know that there is no key assignment for the TextSpan as it is actually not a widget but a part of it as string styling for example.

Therefore you are requested to provide a way to detect textSpan by gherkin BDD integration test or create widget key property for TextSpan. Thank you very much in advance.
Repository: TypeScript
Issue: Inconsistency in generic parameter inference
Labels: Needs Investigation

**TypeScript Version:**  3.8.3, nightly, etc.

**Search Terms:** infer function return

**Code**

```ts
declare function h<T extends keyof HTMLElementTagNameMap>(
    tag: T,
    ...init: ((e: HTMLElementTagNameMap[T]) => void)[],
): HTMLElementTagNameMap[T];

declare function events<T extends HTMLElement>(
    handlers: Partial<{ [K in keyof HTMLElementEventMap]: (this: T, e: HTMLElementEventMap[K]) => void }>
): (e: T) => void;

declare function props<T extends HTMLElement>(
    props: Partial<T>
): (e: T) => void;

h(
    'input',
    events({
        input() {
            this.value;
        },
    }),
    props({
        value: '42'
    })
)
```

**Expected behavior:**
no errors
**Actual behavior:**
```
    Argument of type '{ value: string; }' is not assignable to parameter of type 'Partial<HTMLElement>'. Object literal may only specify known properties, and 'value' does not exist in type 'Partial<HTMLElement>'.
```
**Playground Link:** [playground](https://www.typescriptlang.org/play/?ssl=24&ssc=2&pln=1&pc=1#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwAsAeAFXhAA8MRVgBneAaxAE8dF4AJEgWQBkAohBABbGhhJQA5gDkoYnlAAOAPgAUAKHjb4GaQC54JADRadAOktZUWDIbVqQh7vyGjxk2fJCKlAbRIAXQBKeABeFXgANxwsYGC-QNNg515BYTFUCWk5BWUAwIBuDQ1QSFgEFHRsPHIo8TpScioaei40t0yMdTNtAihaYRg6QwAFWGwoCCIAb3g-AGl4ayZWdnbXDPEBeqzfQPsMAiwRo2NyVM33LJ3xX0WQ8MiYuPgAXxUNFPhHQxJQiLRWLAYqlcDQOBINCYXD4JQwHBKRpkSjUWgMFzpa7dTQ6eDwxGncYwSbTEifb6-IwA57A0EEXE6ADk1iUyAwTNMeJAuwwdDUM16eOWqDZGDUoUFwulumOdHMUSmyBAxRl7y5OjewQ12gJSIFQrxiogysMTIALAAmJlCrVfIA)

**Related Issues:** I'm pretty sure I didn't choose a decent title for the issue, so my ability to search for this is limited as well.

I can understand this could be viewed as feature request/improvement, but there are a couple of reasons that make the behaviour feel buggy:
1. The inference works correctly for the `events` call, which is resolved as `events<HTMLInputElement>`.
2. The intellisense works on the `props` argument, which means at some point, the compiler understands I'm writing a `Partial<HTMLInputElement>`. But for some reason, it resolves the call to `props<HTMLElement>`, so the code fails to typecheck. I can work around it by adding the type parameter, but it degrades de developing experience.
Repository: puppeteer
Issue: Add first level logging capability
Labels: feature,confirmed

I would like to propose a logging capability that allows Puppeteer user to be informed about events happening in Puppeteer and Chrome DevTools. Currently you have to [overwrite](https://github.com/webdriverio/webdriverio/blob/master/packages/devtools/src/utils.js#L304-L335) the `debug` package to access this. It would be great if this would be more accessible. My goals are:

- ability to receive log messages from Puppeteer for my own logging purposes
- ability to listen to all CDP communication
- __extra__ (not required): ability to recreate Puppeteer code based on command calls on its primitives

## Use Cases

1) As a WebdriverIO maintainer that [uses](https://webdriver.io/blog/2019/09/16/devtools.html) Puppeteer for Chromium based automation I would like to incorporate Puppeteer logs into the logs that are generated by WebdriverIO without having to monkey patch the debug package. This would fail if the user has the same version of the debug package installed (see webdriverio/webdriverio#5338).

2) As a reporting plugin maintainer it would be very beneficial if all CDP communication can be obtained in a single place. With that I can attach that reporting tool during initialisation and doesn't need to work with Puppeteer primitives to register unnecessary event listeners.

3) As a cloud provider that runs Puppeteer on its platform it would be ideal if Puppeteer commands can be be retraced from the test execution. For example if someone calls `wait page.keyboard.type('Hello World!')` a bunch of `Input.dispatchKeyEvent` commands are being send over to Chrome. For user not familiar with the Chrome DevTools protocol it would be much more insightful if Puppeteer commands can be logged instead of CDP events. However this is not a requirement for me as I am not sure if this should be done Puppeteer or some other instrumentation tool.

---

If you all could give me some direction I would be happy to contribute. I was looking into [Playwrights](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-logger) approach and found it very useful. Maybe it could be just ported to Puppeteer? What do you all think?
Repository: rust
Issue: slice -> array conversion function
Labels: T-libs-api,C-feature-request,A-const-generics,A-slice,A-array

See the discussion here:
https://internals.rust-lang.org/t/more-about-slice-array-conversions/12251

I suggest to add two related functions (mutable and not mutable versions) that allows to replace code similar to this:
```
row.get_mut(8*x .. 8*x + 8).unwrap().try_into().unwrap()
```
In a shorter, simpler and less bug-prone way, and with only one unwrap (in this specific case there's no need to specify the length as const generic value because it's inferred by the result. In other cases you specify it with a turbofish):
```
row.array_from_mut(8 * x).unwrap()
```
The two slice methods could be like (currently they can't be const fn):
```
pub fn array_from<const LEN: usize>(&self, pos: usize) -> Option<&[T; LEN]> {
    if let Some(piece) = self.get(pos .. pos + LEN) {
        let temp_ptr: *const [T] = piece;
        unsafe {
            Some( std::mem::transmute(temp_ptr as *const [T; LEN]) )
        }
    } else {
        None
    }
}

pub fn array_from_mut<const LEN: usize>(&mut self, pos: usize) -> Option<&mut [T; LEN]> {
    if let Some(piece) = self.get_mut(pos .. pos + LEN) {
        let temp_ptr: *mut [T] = piece;
        unsafe {
            Some( std::mem::transmute(temp_ptr as *mut [T; LEN]) )
        }
    } else {
        None
    }
}
```
Repository: flutter
Issue: Curved top edge bottom navigation Bar notch
Labels: c: new feature,framework,f: material design,P3,team-design,triaged-design

I tried curved top edge bottom navigation Bar notch .But I failed. I use [this ](https://github.com/flutter/flutter/issues/21650#issuecomment-476412335)issue for rectangle shape notch and all is good. How can i curved top edges?

![xbnrO](https://user-images.githubusercontent.com/38331149/80707509-eb938180-8a9e-11ea-8f7b-3a881c70fe7f.png)

like this

![qjIfK](https://user-images.githubusercontent.com/38331149/80707650-2d242c80-8a9f-11ea-908e-51ca8fd9239d.png)

```
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

    class MainScreen extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          extendBody: true,
          bottomNavigationBar: BottomAppBar(
              elevation: 0.3,
              notchMargin: 5,
              clipBehavior: Clip.antiAlias,
              color: Color(0xff1c1f26),
              shape: AutomaticNotchedShape(
                  RoundedRectangleBorder(
                      borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(20), topRight: Radius.circular(20))),
                  RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20)))),
              child: SizedBox(
                width: double.infinity,
                height: 60,
              )),
          floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
          floatingActionButton: FloatingActionButton(
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20))),
            onPressed: () {},
            child: Icon(Icons.add),
          ),
        );
      }
    }

```
Repository: angular
Issue: @ContentChildren() works fine with static true but according to the ts definitions it doesnt accept static true
Labels: type: bug/fix,breaking changes,hotlist: error messages,area: core,state: confirmed,core: queries,design complexity: low-hanging,P4

this is not really a bug but I didnt know what else can I qualify it as.. basically when you have a ContentChildren decorator you can pass static true and access the content children in the ngOnInit lifecycle hook however I was wondering if its safe to rely on that as it is not part of the typescript definitions for the acceptable options
Repository: youtube-dl
Issue: [h264_nvenc] How to enable decode on GPU?
Labels: question

I use ffmpeg and i can decode video on GPU using **h264_nvenc**
```
cmd = '{0}  -i "{1}" -vcodec h264_nvenc  -acodec aac  "{2}"'
# {0} - ffmpeg path
# {1} - input file
# {2} - output file
```

How can i use **h264_nvenc** in post-processing options?
Repository: rust
Issue: diagnostic: rustc points to wrong type parameters in error message
Labels: A-diagnostics,T-compiler,A-inference,C-bug,S-needs-repro

In some generic code 

https://github.com/yaahc/errtools/commit/bac775562e3450ac085b33dab3b7d35d2b12dc46

I encountered an error that I expected, but a diagnostic that I did not. Specifically I have a trait like this,

```rust
pub trait WrapErr<T, E, E2> {
    // ...

    /// Wrap the error value with a new adhoc error that is evaluated lazily
    /// only once an error does occur.
    fn wrap_err_with<D, F>(self, f: F) -> Result<T, E2>
    where
        D: Display + Send + Sync + 'static,
        E2: From<(E, String)>,
        F: FnOnce() -> D;
}
```

And I was testing this with an error kind pattern where I knew it wouldn't be able to infer the inner error type because only the outer error type is in the signature.

```rust
#[derive(Error, Debug)]
enum PrivateKind {
    #[error("{msg}")]
    Variant1 {
        source: Box<dyn Error + Send + Sync + 'static>,
        msg: String,
    },
}

#[derive(Error, Debug)]
#[error(transparent)]
struct PublicErrorStruct {
    #[from]
    source: PrivateKind,
}

fn do_thing(path: &str) -> Result<String, PublicErrorStruct> {
    let s = std::fs::read_to_string(path)
        .wrap_err_with(|| format!("unable to read file from path: {}", path))?;

    Ok(s)
}
```

However, when `wrap_err_with` actually produced a "type annotation needed error it unhelpfully pointed to the generic parameters on the function, rather than the parameters "on the trait.

![Screenshot from 2020-04-30 06-10-04](https://user-images.githubusercontent.com/1993852/80714443-cc4e2180-8aa9-11ea-9d49-01f58be09324.png)

If possible I think the compiler should attempt to pinpoint _which_ generic parameter needs a type annotation and make sure it points to the list where that parameter was declared, in this case it should point specifically to `E2`.

cc @estebank
Repository: PowerToys
Issue: [Image Resizer] Add options for effects (e.g shadow)
Labels: Idea-Enhancement,Product-Image Resizer

# Summary of the new feature/enhancement

One of my most common flows is to insert a screenshot into Outlook, Resize it (I no longer have to do this), and format it using the picture formatting options. (basic shadows, frames, etc.)

# Proposed technical implementation details (optional)

I'd like to see a feature added to PowerTools, either within the Image Resizer or somewhere else, that applies a consistent pre-selected format to an image.  Example of a drop-shadow being applied to a resized image.

![image](https://user-images.githubusercontent.com/11729602/80714512-0aa40a80-8ac3-11ea-8edd-0949a58411f5.png)