sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Registering a global fallback for all operators that defaults us to assuming that autograd is not implemented
Labels: module: bc-breaking,feature,module: autograd,module: molly-guard,triaged,better-engineering,topic: bc breaking

## 🚀 Feature

As originally pointed out here: https://github.com/pytorch/pytorch/issues/62032

> The boxed fallback has an added benefit that we could then consider, at a later point in time, to register it as the universal Autograd fallback key, thus automatically marking all custom operators as not supporting autograd unless they explicitly register an Autograd implementation (this would be quite BC breaking and there would be quite a bit of fallout to clean up afterwards).

## Pitch

The first part of this task is to investigate the fallout that we would need to clean up

Some notes from discussion with @ezyang and @albanD
1. Many third-party operators may (incorrectly) rely on the operator to be composite even though it is registered to be non-composite (e.g. CPU/CUDA)
   - In these cases, we should ask user should actually register as composite
 2. There will be a perf hit for certain cases (the user would have to realize this themselves):
    - Using inference mode may help bypass the new Autograd kernel (but may also hurt in some cases because we would no longer skip the ADInplaceOrView kernel, which does some FunctionSchema checking).
    - In the cases where inference mode may hurt, the original workaround in the manual case is that the user should just not register the ADInplaceOrView kernel. How would that translate here?



cc @ezyang @gchanan @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: pytorch
Issue: Unification of model initialization methods / naming across domain libraries + support of skip_init
Labels: triaged,enhancement,module: initialization

E.g. torchvision often calls it `_init_weights` / `_initialize_weights` etc ,  https://github.com/pytorch/vision/issues/3410

New guidance is also using nn.init methods for supporting skipinig instead of direct use of `normal_` and `fill_`:
https://pytorch.org/tutorials/prototype/skip_param_init.html#updating-modules-to-support-skipping-initialization

Right now it's often done ad-hoc.
Repository: pytorch
Issue: [feature request] Jagged / padding version of torch.stack / torch.cat + some general nested tensor discussion
Labels: module: sparse,feature,triaged,module: nestedtensor,module: padding

This is a frequent primitive for collation: https://github.com/pytorch/pytorch/issues/1512

```python
import torch

def stack_jagged(tensors, fill_value = 0):
    # does not use F.pad to not allocate, could as well use F.pad's arg names instead 
    shape = [len(tensors)] + [max(t.shape[dim] for t in tensors) for dim in range(len(tensors[0].shape))]
    res = torch.full(shape, fill_value, dtype = tensors[0].dtype, device = tensors[0].device)
    for r, t in zip(res, tensors):
        r[tuple(map(slice, t.shape))] = t
    return res

if __name__ == '__main__':
    print(stack_jagged([torch.zeros(3, 4, 5), torch.zeros(3, 5, 6)]).shape)
```

Also, having a better indexing function than `u[tuple(map(slice, t.shape))] = t` would be nice - e.g. multi-dim narrow/slice function

Similar function (but also returning masks) is at https://github.com/facebookresearch/detr/blob/eb9f7e03ed8e2ed2cd55528989fe7df890bc3fc0/util/misc.py#L306

Related to this are various NestedTensors implementations

Also one useful features is to be able to provide multiples for padding, e.g. to always pad to multiples of 64 (per dimension)

cc @nikitaved @pearu @cpuhrsch
Repository: TypeScript
Issue: The sample given at for `Writing-a-Language-Service-Plugin` doesn't compile.
Labels: Docs

# Bug Report

### 🔎 Search Terms
plugin
language-service
compile

- I was unable to test this on prior versions because _there are no earlier versions of the documentation______

### 💻 Code

This is copied from the guide at
https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

```function init(modules: { typescript: typeof import("typescript/lib/tsserverlibrary") }) {
  const ts = modules.typescript;

  function create(info: ts.server.PluginCreateInfo) {
    // Set up decorator
    const proxy: ts.LanguageService = Object.create(null);
    for (let k of Object.keys(info.languageService) as Array<
      keyof ts.LanguageService
    >) {
      const x = info.languageService[k];
      proxy[k] = (...args: Array<{}>) => x.apply(info.languageService, args);
    }
    return proxy;
  }

  return { create };
}
```

### 🙁 Actual behavior
I am entering the code sample from `https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin` and I am getting compile errors while setting up the decorator:

![image](https://user-images.githubusercontent.com/19295354/133662230-2819caeb-78bd-4dea-962c-24cc3be0adb6.png)


### 🙂 Expected behavior

I was hoping I could copy/paste the sample and it would work.

NOTE: It's also possible the documentation around this just needs to be clearer.  How do you go about starting the plugin?  Do you run `yo code`?  Do you run `npm init`?  Do you just create a single file `index.js`?  I am very unclear how to begin development of this plugin.
Repository: pytorch
Issue: Parametrization cannot be parametrized
Labels: module: nn,triaged

The Parametrization that contains the original Tensor is not traversing itself properly during the forward.
In particular here:
https://github.com/pytorch/pytorch/blob/96cb05b49a194a9b486c2af193dec825410d65ae/torch/nn/utils/parametrize.py#L265

We use all the `_modules` even the ones that are not indexed by integers.
This prevent parametrization of parametrization because it would add a `parametrizations` submodule to this and the forward would try to traverse it.

cc @albanD @mruberry @jbschlosser @walterddr
Repository: rust
Issue: same-crate reexports lose documentation added to cross-crate reexports
Labels: T-rustdoc,E-help-wanted,C-bug,A-cross-crate-reexports

I tried this code ([ZIP of project](https://github.com/rust-lang/rust/files/7180122/repro.zip)):

```
├── Cargo.lock
├── Cargo.toml
├── regular-items
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
└── src
    └── lib.rs
```

**src/lib.rs**

```rust
/// This documentation for `CONSTANT` comes from a cross-crate re-export.
pub use regular_items::CONSTANT;

/// This documentation for `function` comes from a cross-crate re-export.
pub use regular_items::function;

pub mod prelude {
    pub use crate::{CONSTANT, function};
}
```

**regular-items/src/lib.rs**

```rust
pub const CONSTANT: u8 = 0;
pub fn function() {}
```

I then viewed the documentation for

- the crate:

    <img width="589" alt="the crate documentation" src="https://user-images.githubusercontent.com/174509/133665425-ddbe8348-c486-4725-8252-18a769e3fce2.png">

- the `prelude` module:

    <img width="311" alt="the prelude documentation" src="https://user-images.githubusercontent.com/174509/133665579-411f5df8-103c-4670-9767-f8053e3e6b3b.png">

- `crate::CONSTANT`:

    <img width="570" alt="documentation for crate::CONSTANT" src="https://user-images.githubusercontent.com/174509/133665789-14db3313-c0b1-4824-8835-07f413d722cb.png">

- `crate::prelude::CONSTANT`:

    <img width="475" alt="documentation for crate::prelude::CONSTANT" src="https://user-images.githubusercontent.com/174509/133665848-2a1fcf18-19dd-4697-b2fe-afe5460d5749.png">

I expected:

- That the documentation added to `crate::CONSTANT` would be present on `crate::prelude::CONSTANT`.
- That `crate::prelude::CONSTANT` would redirect to `crate::CONSTANT`.

Instead:

- No documentation is present on `crate::prelude::CONSTANT`.
- `crate::prelude::CONSTANT` appears to be a different item than `crate::CONSTANT`.

### Meta

`cargo +nightly --version --verbose`:
```
cargo 1.56.0-nightly (e515c3277 2021-09-08)
release: 1.56.0
commit-hash: e515c3277bf0681bfc79a9e763861bfe26bb05db
commit-date: 2021-09-08
```

### Potentially related

- #84619
Repository: flutter
Issue: ParagraphTxt::PaintDecorations uses an undefined SkDiscretePathEffect::Make(0, 0)
Labels: engine,dependency: skia,P2,team-engine,triaged-engine

The factory for the discrete path effect returns a nullptr with those parameters so this operation is essentially a NOP and the composition with the dash effect is also a NOP, just returning the non-null parameter. There's not much wasted code here, but it's a mystery that doesn't need to exist in the source base.

See: https://github.com/flutter/engine/blob/d80caf5f38890f62e6efded4d07d094edc878204/third_party/txt/src/txt/paragraph_txt.cc#L1498

and: https://github.com/flutter/engine/blob/d80caf5f38890f62e6efded4d07d094edc878204/third_party/txt/src/txt/paragraph_txt.cc#L1512
Repository: flutter
Issue: Provide a "default background" for BackdropFilter
Labels: c: new feature,framework,c: proposal,P2,team-framework,triaged-framework

There are a number of cases where the BackdropFilter has no background to filter. One such case is when a parent widget is doing an operation that requires compositing, such as group opacity (Opacity, AnimatedOpacity, FadeTransition, etc.). Another case is when an embedded widget is used on some platforms and that platform requires us to move further content to an overlay surface (iOS for example).

See https://github.com/flutter/flutter/issues/50183

Because these cases can be unpredictable, and because the workaround can be complicated (use a completely different technique to obscure the background requiring a new widget tree composition) it might be better to provide an alternate means of obscuring the background in the BackdropFilter widget itself.

For example, a Color could be provided as an attribute for the BackdropFilter widget which will be composed with the underlying surface using a dstAtop or dstOver blend mode which will only fill in the color where the background is not opaque. For the common case of a BackdropFilter appearing on a screen with no underlying compositing layer, the operation would have no effect.
Repository: vscode
Issue: Allow the OS to handle custom URIs. Cannot open links with custom URL schema (e.g. slack://)
Labels: feature-request,opener

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No
Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.60.1
- OS Version: All

Steps to Reproduce:

1. **Obtain a custom URI.**
   For Mac users an easy way to test a custom URI is with [Hook](https://hookproductivity.com) from a file or email.
Or you could create a bearbones app with a custom URI [with a few lines of AppleScript](https://kaihao.dev/posts/Make-your-own-custom-URI-scheme-resolver). These types of links are common e.g. `slack://`, Zoom, OmniFocus, and [several more](https://en.wikipedia.org/wiki/List_of_URI_schemes) so you should be able to find a URI that works. You can test these in your browser.
2. **Add the link to a markdown file open in VSCode**
3. **Try to click it in the code editor and markdown preview. Observe the error.**

### Additional Info

Poking around I see vscode only handles a limited list. If a schema is unknown, VSCode must delegate to the OS to handle it. It also occurs to me that mailto doesn't require special treatment on this list and should be handled by the OS.

https://github.com/microsoft/vscode/blob/021071ff74a53038dae299db2fe1328beed13da0/extensions/markdown-language-features/src/util/links.ts#L9-L16



This was [reported before](https://github.com/microsoft/vscode/issues/104429) and fell through the cracks. The same console errors where VSCode attempts to resolve a markdown file with a filename that is a substring of the url it does not understand:
```md
Testing custom scheme:
[p.ideas.test.md](hook://file/3NE0H471r?p=RGVuZHJvbi92YXVsdA==&n=p.ideas.test.md)
```
```
Unable to open '3NE0H471r.md': Unable to read file '/Users/brandon/Dendron/vault/hook:/file/3NE0H471r.md'
(Error: Unable to resolve non-existing file '/Users/brandon/Dendron/vault/hook:/file/3NE0H471r.md').
```

https://github.com/microsoft/vscode/issues/104429
Repository: flutter
Issue: Remote Flutter Widgets (rfw) package feedback thread
Labels: package,team-ecosystem,P3,p: rfw,triaged-ecosystem

This issue is intended to collect feedback regarding the [rfw package](https://pub.dev/packages/rfw).

If you have found a bug with RFW, please [file a new issue](https://github.com/flutter/flutter/issues/new?assignees=Hixie&labels=p:%20rfw,package,P4). This issue is specifically for discussing the package's general applicability to your use cases, to determine if this is a useful direction for us to follow, and to report experiences you may have with writing applications with this package. Thanks in advance.
Repository: PowerToys
Issue: Image resizer not changing size
Labels: Issue-Bug,Product-Image Resizer,Priority-2

### Microsoft PowerToys version

0.45.0

### Running as admin

- [ ] Yes

### Area(s) with issue?

Image Resizer

### Steps to reproduce

I've had issues with the resizer before, but the last few versions have been fine. Now, it's acting up again. I select an image, select custom, specify a width of 800, and height blank (so constrain width, not height). I select resize original pictures and ignore orientation. I hit OK and then the dialog goes away, but my image is not touched.

Not sure if related, but in the past, if I specified a custom resize, the next time I ran it it remembered my custom values. I'm seeing that it's not doing this now.

### ✔️ Expected Behavior

Resize the image to a max of 800 wide (or whatever), and set height to the right proportion.

### ❌ Actual Behavior

It's doing nothing I can see. :) 

### Other Software

_No response_
Repository: pytorch
Issue: Review the Tensor and Operator Basics Onboarding page
Labels: module: docs,triaged

## 📚 Documentation

Over at https://github.com/pytorch/pytorch/wiki/Tensor-and-Operator-Basics. Offline @mruberry and I discussed things like making sure people really understand what a Tensor is and what an Operator is by clearly defining them, because as we've seen from the forums it's difficult to newcomers to figure out what is going on.


cc @brianjo @mruberry
Repository: flutter
Issue: Investigate running test suites in a single isolate
Labels: a: tests,tool,team-infra,P3,triaged-infra

Context: https://github.com/flutter/flutter/issues/86722

Running all the tests in a test suite in a single isolate would [significantly improve performance](https://github.com/flutter/flutter/issues/86722#issuecomment-914688482) when gathering coverage data. It might be possible to refactor the test framework to do this automatically. If not, we should add documentation about the wrapper test pattern, for users who are running into significant performance issues when testing with coverage.
Repository: rust
Issue: Confusing error message for borrow rule mismatch on `Result::map`
Labels: C-enhancement,A-diagnostics,T-compiler,D-papercut

[`playground link with all the code`](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9210b8a71e4eecbcdbb61716393913b9).

# Confusing message

When compiling:

```rust
use serde_json::*;
use Value as JsonValue;

fn main() {
    let text = r#"
    {
        "key": "value"
    }
    "#;

    let _formatted = from_str::<JsonValue>(text).map(to_string_pretty);
}
```

The compiler gives this error:

```txt
error[E0631]: type mismatch in function arguments
  --> src/main.rs:11:54
   |
11 |     let _formatted = from_str::<JsonValue>(text).map(to_string_pretty);
   |                                                      ^^^^^^^^^^^^^^^^
   |                                                      |
   |                                                      expected signature of `fn(serde_json::Value) -> _`
   |                                                      found signature of `for<'r> fn(&'r _) -> _`
```

Which is confusing, specially for people who do not understand what `for<'r>` means.

# How to fix the code

This function requires `&T` but `T` was given, so the solution is adding `.as_ref()`:

```rust
// Fixed
let _formatted = from_str::<JsonValue>(text).as_ref().map(to_string_pretty);
```

# Rust can give nice message for the same error

The same code, but with a redundant closure inside of `.map()`.

```rust
// Same error, but now the compiler gives a very nice message
let _formatted = from_str::<JsonValue>(text).map(|x| to_string_pretty(x));
```

A very helpful message:

```txt
error[E0308]: mismatched types
  --> src/main.rs:11:75
   |
11 |     let _formatted = from_str::<JsonValue>(text).map(|x| to_string_pretty(x));
   |                                                  ---                      ^ expected reference, found enum `serde_json::Value`
   |                                                  |
   |                                                  help: consider using `as_ref` instead: `as_ref().map`
   |
   = note: expected reference `&_`
                   found enum `serde_json::Value`
```
Repository: deno
Issue: lsp: no cache detection after running "deno cache <script>"
Labels: bug,design limitation

**Describe the bug**
After caching a not yet downloaded dependency, the extension doesn't realize the dependency was cached. It still shows the error, even though the dependency was downloaded into the cache. After a reload of VS Code the dependency is resolved correctly.

**To Reproduce**

1. Try to use a new dependency. Example code in file server.ts:
```
import { Application, Router } from "https://deno.land/x/oak/mod.ts"

const app = new Application()

app.listen({ port: 5000 })
```
2. in the console run `deno cache server.ts`

**Expected behavior**

The extension shouldn't mark the import as not cached anymore but understand that I just updated the cache with the dependency.

**Versions**

vscode: 1.60.1
deno: 1.14.0 (release, x86_64-unknown-linux-gnu)
v8 9.4.146.15
typescript 4.4.2
extension: v3.9.1
Repository: flutter
Issue: Collect analytics for 'flutter run -d chrome --debug' users
Labels: tool,a: debugging,platform-web,P2,team-web,triaged-web

We would like to understand the size of our user base and track the (hopefully) growth of the users for flutter web debugger overtime.
Repository: flutter
Issue: [iOS] TextField causing system keyboard freezing
Labels: platform-ios,framework,engine,P2,c: fatal crash,team-ios,triaged-ios

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->
We are using `TextField` with a `TextEditingController` for controlling newline cursor position and textfield selection updates. 
While using this setup we are seeing our Flutter app causes a user's entire iOS device (iPhone or iPad) to freeze and the keyboard becomes unusable in any application even outside of ours. The issue requires a hardware restart to clear it.

In terms of repro steps the full-iPhone keyboard freeze happens when in a text field, after a few newlines, and when the keyboard type switches - this could be as simple as switching from text to an emoji keyboard or switching between a physical, external keyboard on an iPad and then back to the software keyboard.

For logs when we see this happening :
- We dont see anything in flutter logs
- Crashlytics doesnt show any crashes
- iOS system logs show us process `kbd` getting killed.

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 2.5.0, on macOS 11.5.2 20G95 darwin-x64, locale en-US)
    • Flutter version 2.5.0 at /Users/ahetawal/thatch/flutter/flutter_2.2.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cc385b4b8 (9 days ago), 2021-09-07 23:01:49 -0700
    • Engine revision f0826da7ef
    • Dart version 2.14.0

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.11.2

```
Repository: flutter
Issue: Cupertino content-aware floating button
Labels: c: new feature,platform-ios,framework,f: cupertino,c: proposal,team-design,triaged-design

## Use case

Buttons and other widget overlays could adapt to the content below them to increase visibility, like in Apple's native App Store.

## Proposal

See this video of the close button in App Store promos:

https://user-images.githubusercontent.com/6323077/133703604-38d499fd-0dc2-4297-9bc6-606a72de2c88.mp4
Repository: rust
Issue: Custom Fn* trait implementation doesn't properly fallback from Fn to FnMut, or FnMut to FnOnce
Labels: T-compiler,C-bug,requires-nightly,F-unboxed_closures

<!--
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.
-->

I tried this code:

```rust
#![feature(unboxed_closures)]
#![feature(fn_traits)]

struct Wrapper<F>(F);

impl<Args, F:FnOnce<Args>> FnOnce<Args> for Wrapper<F> {
    type Output = F::Output;
    extern "rust-call" fn call_once(self, args: Args) -> Self::Output {
        self.0.call_once(args)
    }
}

// Uncomment this implementation and the code in main() breaks... what?
/*
impl<Args, F:FnMut<Args>> FnMut<Args> for Wrapper<F> where Self:FnOnce<Args, Output=F::Output> {
    extern "rust-call" fn call_mut(&mut self, args: Args) -> <Self as FnOnce<Args>>::Output {
        self.0.call_mut(args)
    }
}
*/

fn main() {
    struct Stuff;
    let stuff = Stuff;
    let f = ||drop(stuff);
    let g = Wrapper(f);
    g();
}
```

I expected to see this happen: Whether the commented code is commented or not, the code should compile

Instead, this happened: If the commented code is uncommented, it fails to compile. The error is 
```
error[E0525]: expected a closure that implements the `FnMut` trait, but this closure only implements `FnOnce`
  --> src/main.rs:25:13
   |
25 |     let f = ||drop(stuff);
   |             ^^^^^^^-----^
   |             |      |
   |             |      closure is `FnOnce` because it moves the variable `stuff` out of its environment
   |             this closure implements `FnOnce`, not `FnMut`
26 |     let g = Wrapper(f);
27 |     g();
   |     --- the requirement to implement `FnMut` derives from here

For more information about this error, try `rustc --explain E0525`.
```

From my understanding, the error message kind of makes sense. `f` indeed doesn't implement `FnMut`, so `g` doesn't either. However, `g` still implements `FnOnce`, which can be used here. It seems that the existence of `FnMut` implementation makes the compiler blind to the `FnOnce` implementation.

Similar thing can happen when both `FnMut` and `Fn` implementation exists but `Fn` is not implemented due to unsatisfied trait bound.

### 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`:
```
1.57.0-nightly

(2021-09-15 2c7bc5e33c25e29058cb)
```