sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Document how to generate Pybind bindings for C++ Autograd
Labels: module: cpp,triaged

## 🚀 Feature
https://pytorch.org/tutorials/advanced/cpp_autograd.html provides a good example on how to define your own function with a forward and backward pass, along with registering it with the autograd system. However, it lacks any information on how to actually link this module to use in Python / Pytorch / Pybind. There is this one example that shows it in a hacky way (https://pytorch.org/tutorials/advanced/cpp_extension.html), but I want something I can include directly in Pybind.

Eg. something like this which doesnt work
```
  py::class_<LinearFunction, std::shared_ptr<LinearFunction>>(
    m, "LinearFunction")
    .def(py::init<>())
    .def("forward", &LinearFunction::forward)
    .def("backward", &LinearFunction::backward);
```


cc @yf225 @glaringlee
Repository: pytorch
Issue: [feature request] "Batched" index_select (i.e. simplified torch.gather with not specifying full index)
Labels: high priority,triaged,enhancement,module: scatter & gather ops

E.g. we have `I = torch.randint(0, n3, (n1, n2))` and `T = torch.rand(n1, n2, n3, n4, n5)`
We'd like to compute `O[i, j, ...] = T[i, j, I[i, j], ...]`

This is fairly frequent. Currently this is possible with a combination of multi unsqueeze + expand + gather + squeeze.

I propose a new helper function to do this in one go (and thus making this pattern less complex and error-prone) or just making gather support this directly by relaxing index tensor shape constraints

cc @ezyang @gchanan @zou3519 @mikaylagawarecki
Repository: storybook
Issue: build-storybook watch mode not working
Labels: bug,good first issue,help wanted,cli,build-storybook

**Bug**
Running build-storybook with the -w or --watch flags do not run the storybook build in watch mode. The build runs once and ends. The cli option described [here](https://storybook.js.org/docs/react/api/cli-options#build-storybook) does not produce the desired results.

It seems like the feature was added [here](https://github.com/storybookjs/storybook/issues/2762) but has since been broken.
Repository: flutter
Issue: [custom-devices] flutter devices shows `Could not load custom device from config index 0: Expected enabled to be a boolean` message
Labels: tool,d: wiki,has reproducible steps,P2,found in release: 2.6,team-tool,triaged-tool


While flutter config enable custom devices is True, I have this permanent message:

**Could not load custom device from config index 0: Expected enabled to be a boolean.**

OS: Windows _NT



```
[  +22 ms] executing: C:\Users\xxxxx\platform-tools\adb.exe devices -l
[  +23 ms] Could not load custom device from config index 0: Expected enabled to be a boolean.
[  +27 ms] List of devices attached
[   +4 ms] 4 connected devices:

[  +23 ms] Windows (desktop)       • windows • windows-x64     • Microsoft Windows [version 10.0.19043.1165]
[   +2 ms] Windows (UWP) (desktop) • winuwp  • windows-uwp-x64 •
[        ] Chrome (web)            • chrome  • web-javascript  • Google Chrome 92.0.4515.159
[        ] Edge (web)              • edge    • web-javascript  • Microsoft Edge 92.0.902.84
[   +3 ms] executing: C:\Users\xxxxxx\platform-tools\adb.exe devices -l
[  +21 ms] List of devices attached
[  +10 ms] "flutter devices" took 281ms.
[   +5 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
```
Repository: flutter
Issue: Consider no longer printing Observatory Url in `flutter run`
Labels: c: new feature,tool,c: proposal,has reproducible steps,P3,found in release: 2.6,team-tool,triaged-tool

The flutter tool when running (`flutter run`) advertizes Urls for both the Observatory and DevTools. Is it time to stop printing the Observatory Url now that DevTools is feature complete for all main use cases?

```
$ flutter run
...

An Observatory debugger and profiler on macOS is available at: http://127.0.0.1:62974/12bxPoF67Ro=/
The Flutter DevTools debugger and profiler on macOS is available at:
http://127.0.0.1:9104?uri=http%3A%2F%2F127.0.0.1%3A62974%2F12bxPoF67Ro%3D%2F
```
Repository: create-react-app
Issue: babel is generating an error about "Cannot read property 'range' of null
Labels: stale,needs triage,issue: bug report

### Describe the bug

Getting "Failed to compile" when starting my create-react-app application

### Did you try recovering your dependencies?

Yes

  Please paste the output of `npm --version` and/or `yarn --version` to confirm.

6.14.14

### Which terms did you search for in User Guide?

babel

### Environment

$ npx create-react-app --info
npx: installed 67 in 2.717s

Environment Info:

  current version of create-react-app: 4.0.3
  running from /home/durrantm/.npm/_npx/65342/lib/node_modules/create-react-app

  System:
    OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
  Binaries:
    Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
    Yarn: 1.21.1 - /usr/bin/yarn
    npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
  Browsers:
    Chrome: 91.0.4472.164
    Firefox: 91.0.2
  npmPackages:
    react: ^17.0.1 => 17.0.2 
    react-dom: ^17.0.1 => 17.0.2 
    react-scripts: 4.0.3 => 4.0.3 
  npmGlobalPackages:
    create-react-app: Not Found

### Steps to reproduce

1. type 'eslint src' and note that there are no error
2. type 'npm start' and note that the application comes up very briefly (les than 1 scond)
3. Note that the browser and the terminal then  display "Cannot read property 'range' of null
4. Saving any file without changes causes create-react to try compiling again and this timje it works to bring up the app
5. Note that this is a known and fixed babel issue but I myself can't upgfrade babel for a create-react-app

### Expected behavior

I expected that `react-scripts start` would be able to use babel (internally) to compile the app and be able to bring it up without this error.

### Actual behavior

Although eslint passes when create-react-app uses babel goes to compile and bring up the app, 
the browser and terminal gave an error "Cannot read property 'range' of null" as mentioned at at https://github.com/babel/babel-eslint/issues/815

### Reproducible demo

eslint rule (yaml) is:

```
rules:
  indent:
    - error
    - 2
```

A fellow developer ran into exactly the same issue for my private repo
I can't make the repo public however I can add you
I see this issue in babel and is mentioned at https://github.com/babel/babel-eslint/issues/815
I can't upgrade bable myself however as create-react-app manages that
Repository: material-ui
Issue: [material-ui][Tabs] Implement without cloneElement
Labels: new feature,component: tabs

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡
I have a tab set where I'd like one extra tab to only be present on xs screens.  I thought I could just wrap the `Tab` and `TabPanel` in a `Hidden` tag; something like:

```
<TabContext ... >
  <TabList ... >
    <Tab ...  />
    <Hidden smUp>
      <Tab ...  />
    </Hidden>
  </TabList>
  
  <TabPanel ... >
  <Hidden smUp>
    <TabPanel ... >
  </Hidden>
</TabContext>
```

...but that generates errors such as:

```
Warning: Failed prop type: The following props are not supported: `aria-controls`, 
`id`, `fullWidth`, `indicator`, `selected`, `selectionFollowsFocus`, `onChange`, 
`textColor`, `value`. Please remove them.
    at HiddenJs
```

## Examples 🌈

I forked the tabs example (from lab) and added the hidden use case
https://codesandbox.io/s/material-demo-forked-wmtjy?file=/demo.js

Is this something that the lab tab components can support? (assuming I'm not doing something silly)

## Your Environment 🌎

<!--
  Run `npx @material-ui/envinfo` and post the results.
  If you encounter issues with TypeScript please include the used tsconfig.
-->
<details>
  <summary>`npx @material-ui/envinfo`</summary>
  
```
System:
    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 384.38 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.9 - ~/.nvm/versions/node/v12.14.1/bin/npm
  Managers:
    Homebrew: 2.5.0 - /usr/local/bin/brew
    pip2: 20.1.1 - /usr/local/bin/pip2
    pip3: 20.1.1 - ~/.pyenv/shims/pip3
    RubyGems: 3.0.3 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.15.0 - /usr/local/bin/git
    Clang: 12.0.5 - /usr/bin/clang
    FFmpeg: 4.3.1 - /usr/local/bin/ffmpeg
  Servers:
    Apache: 2.4.46 - /usr/sbin/apachectl
  Virtualization:
    Docker: 20.10.7 - /usr/local/bin/docker
    VirtualBox: 6.1.16 - /usr/local/bin/vboxmanage
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
  IDEs:
    Atom: 1.58.0
    Nano: 2.0.6 - /usr/bin/nano
    VSCode: 1.59.1 - /usr/local/bin/code
    Vim: 8.2 - /usr/bin/vim
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Bash: 5.0.17 - /usr/local/bin/bash
    Perl: 5.30.2 - /usr/bin/perl
    PHP: 7.3.24 - /usr/bin/php
    Python: 3.8.3 - /Users/darin/.pyenv/shims/python
    Python3: 3.8.3 - /Users/darin/.pyenv/shims/python3
    Ruby: 2.6.3 - /usr/bin/ruby
  Databases:
    PostgreSQL: 9.6.18 - /usr/local/bin/postgres
    SQLite: 3.32.3 - /usr/bin/sqlite3
  Browsers:
    Chrome: 92.0.4515.159
    Firefox: 90.0.2
    Safari: 14.1.2
```
</details>
Repository: rust
Issue: `compiler-builtins` test no longer passing on `ppc64le`
Labels: A-LLVM,T-compiler,O-PowerPC,C-bug

The current HEAD of compiler-builtin's master branch no longer passes CI tests. Error reports failing at `testcrate/tests/cmp.rs:34:9` for `powerpc64le-unknown-linux-gnu` target.

Bisection shows that the test still builds in nightly-2021-08-21 but fails in nightly-2021-08-22, so I suspect the issue is from LLVM upgrade #87570.

Initially discovered in rust-lang/compiler-builtins#405.
Repository: go
Issue: archive/zip: expose fileListEntry.file via Sys
Labels: NeedsInvestigation,FeatureRequest

Currently, when `fs.WalkDir`ing over a `Reader` there is not a good way to get the `zip.File` from `fs.DirEntry`. This does not really matter for files containing data, but currently I need to interact with directory files, specifically detect if a directory exists in the archive. Because of the virtual entries that this package adds, one must iterate over `Reader.File` to see if the current `dfs.DirEntry` exists in the zip. As such, I am left to double iterate, once with `fs.WalkDir` and once through `Reader.File`, or not use `fs.WalkDir` and hit `Reader.File` directly.

It would be nice to have `zip.fileListEntry.Sys` return `fileListEntry.file`, already an exported type `zip.File`, to easier interact with the underlying data, especially in my case.
```go
package zip // import "archive/zip"

func (f *fileListEntry) Sys() interface{} { return f.file }
```

If one is to trust the implementation will never change, you could also abuse `fileListEntry.ModTime() == time.Time{}`, but this seems like a bad idea.
Repository: flutter
Issue: [New Feature] Plugin system capability in Flutter apps
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

## Context

Modern applications often offer the possibility to extend their features thanks to a plugin system. It's a great opportunity to make flexible applications and unlock the user experience as they don't have to wait the next release to get new features.

## My problem  

I want to create such application using Dart & Flutter. This framework is a great choice as I want my app to be Desktop (Windows, OSX) & Mobile (Android, iOS), but its strength (AOT compilation) is also the problem here.  

To create a plugin system in my app, I need to provide the plugin developers with interfaces they will implement to extend my application features. Once a user wants to download and activate a plugin, I want to load the plugin's implementations of my interfaces in my runtime and be able to triger them. I want to be able to load/unload these implementations as the user enable/disable the plugin.

## Existing (but not convincing) solutions  

I did not find so much solutions. I ended up with 2, that I don't like:  

- Use a script language interpreter. I found examples as [Flutter Lua](https://github.com/drydart/flutter_lua), which embeds Lua interpreter to be able to execute Lua scripts. Its very annoying as it increases the app size a lot, for a poor integration (Looks like a simple exec at the end, so no interfaces contract possible here). Also it is definitely not dev-friendly : my project would be open source, I want developers contributing to the application core in Dart to use the same language when they want to create plugins.  

- Use webviews. Its definitely a lightweight solution, but I also feel it very unsafe, I am afraid of the possibilities offered to the malicious developers to redirect my users to scams / unsafe zones.  Also, it is here again an issue as I don't know how I would integrate the notion of interfaces with this solution...  

## Proposal  

I feel I am not knowledgeable enough in Dart/Flutter to propose a tangible solution, but here is a naive proposal : 

Maybe an embedded Dart interpreter can do the job ? Once the plugin needs to be loaded It may runs AOT compilation for the current platform, and make the new Objects and Widgets available for the application runtime. 
If so, I think it also requires a "sniffing" capability into flutter to be able to discover and use the new features available and integrate them to the application system.

I hope I was clear enough, don't hesitate if any questions !
Repository: pytorch
Issue: How to optimize jit-script model performance (backend device is gpu)
Labels: oncall: jit

I have lots of script models, Now I want to optimize their performance, the bacnkend is gpu && project is written in c++ api(torch::jit::load). 
Does there any ways to do this optimize?
Recently, I find that pytorch support cuda-graph now, maybe this should be a way to optimize performance.
But there are few documents about how to use this feature in c++. Can you give me some examples about how to use cuda-graph in c++ api with script model? 
Thanks very much!   :)
Repository: flutter
Issue: Mixing PlatformView and Texture(Camera) on Android causes the Texture to freeze
Labels: platform-android,a: platform-views,p: camera,package,has reproducible steps,P2,found in release: 2.6,team-android,triaged-android


## Steps to Reproduce

repro git:
https://github.com/tomkulaga/flutter_mixing_platform_image

1. Camera runs
2. Hit 'Show', 
3. Bottom bar shows up with the native view.
4. Camera preview has stopped
5. Hit 'Close This bottom sheet'
6. Camera preview resumes 
Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 2.5.0-5.2.pre, on Microsoft Windows [Version 10.0.19042.1165], locale en-AU)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[√] VS Code (version 1.59.1)
[√] Connected device (1 available)
Repository: tauri
Issue: Support for vercel/pkg executable dependencies
Labels: type: bug,priority: 2 medium,status: needs more info,scope: bundler

I am currently bundling a Linux AppImage, macOS app and Windows msi off which includes has a sidecar that is compiled with [vercel/pkg](https://github.com/vercel/pkg) and utilises the library [lovell/sharp](https://github.com/lovell/sharp).

During compilation of the sidecar executable I receive the following warnings:
```
> Warning Cannot include directory %1 into executable.
  The directory must be distributed with executable as %2.
  %1: node_modules/sharp/build/Release
  %2: path-to-executable/sharp/build/Release
> Warning Cannot include directory %1 into executable.
  The directory must be distributed with executable as %2.
  %1: node_modules/sharp/vendor/lib
  %2: path-to-executable/sharp/vendor/lib
```

In order for the executable to work properly I require the above directories in the resulting Tauri bundle next to the sidecar executable. Including the folder in the Tauri bundles resources does not work either.

At this point in time, I am not sure how to get this to work with Tauri, or if it is even possible.
Repository: go
Issue: x/exp/shiny: memory corruption on windows
Labels: OS-Windows,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17 windows/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
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=%LocalAppData%\go-build
set GOENV=%AppData%\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\dev\lang\go_path\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\dev\lang\go_path
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\dev\lang\go\1.17
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\dev\lang\go\1.17\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\dev\cygwin64\tmp\go-build1333133088=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

https://gist.github.com/theinternetftw/95151dd990fe955644275e13993ef69e

### What did you expect to see?

To never see the "memory corruption!" Println

### What did you see instead?

The "memory corruption" Println appears quite regularly. (As did memory corruption of large slices in my actual program)

### Discussion

I have [stopped this behavior](https://github.com/theinternetftw/exp/commit/604dcd3a9aea140305d03f565f31b3fa92aa9a1f) by having shiny not call SendMessage outside of the main os thread.

I stopped major investigation once I fixed it for myself and didn't see any recurrence, but a few thoughts on what might be causing it that may help:

* Perhaps somehow waiting for SendMessage when it involves a window in particular is what causes the corruption, or when SendMessage takes some time to return a result.

* It might be relevant that the os thread lock is permanently grabbed by the main driver thread, but [lockOSThread is nonetheless called later](https://cs.opensource.google/go/go/+/refs/tags/go1.17:src/runtime/syscall_windows.go;l=472) when the syscall.Syscall family of functions is used.
Repository: angular
Issue: ZoneAwareError preserves a zone-related frame at the top of the stack trace
Labels: area: zones,P3

### Which @angular/* package(s) are the source of the bug?

Don't known / other

### Is this a regression?

No

### Description

We have `zone-error` imported in our project. It indeed removes many zone-related frames from errors stacks. Yet, the top of the stack trace always has the `new ZoneAwareError` call. In the minified prod bundle it typically looks like
``` at new d (polyfills.186cfc5503ab1d57b04d.js)```

This frame makes is hard to use with Sentry. Sentry [analyzes the top frame](https://github.com/getsentry/sentry-javascript/blob/19ef32c0f1a4617bc708842f24180129dc38a17a/packages/core/src/integrations/inboundfilters.ts#L193) in order to tell whether the error comes from 3rd party code or our own code (and then omitting the former). This `new ZoneAwareError` frame makes Sentry believe all errors are always our code.

### Please provide a link to a minimal reproduction of the bug

```throw new Error("test")``` from your component, see the stack trace of the error inside your custom ErrorHandler
Repository: pytorch
Issue: [feature request] New copyseq_ method 
Labels: feature,triaged,module: tensor creation

To be a faster version of `tensor[...].copy_(torch.as_tensor(small_python_tuple))` without having to do `torch.as_tensor` (for large Python list the motivation would rather be saving memory that would be spent on the copy)

Motivation: https://github.com/pytorch/pytorch/issues/46138#issuecomment-731453946 and https://github.com/pytorch/pytorch/issues/29973#issuecomment-889351000

Alternative: make `copy_` and assignment do this directly

For hot-path assignments of small sequences (e.g. 2 or 3 elements), the cost of constructing a temp tensor could be as costly as the memory write itself...

cc @gchanan @mruberry @rgommers @heitorschueroff
Repository: rust
Issue: Introducing a GAT parameter leads to a false positive E0207 for another parameter constrained by Fn type
Labels: T-compiler,requires-nightly,GATs-triaged,S-bug-has-test,A-GATs

I tried this code:

```rust
#![feature(generic_associated_types)]

trait A {
    type I<'a>;
}

pub struct TestA<F>
{
    f: F,
}

impl<F> A for TestA<F> {
    type I<'a> = &'a F;
}

struct TestB<Q, F>
{
    q: Q,
    f: F,
}

impl<'q, Q, I, F> A for TestB<Q, F>
where
    Q: A<I<'q> = &'q I>,
    F: Fn(I),
{
    type I<'a> = ();
}
```

I expected it to compile. Instead, I've got the following error:
```
error[E0207]: the type parameter `I` is not constrained by the impl trait, self type, or predicates
  --> src/lib.rs:22:13
   |
22 | impl<'q, Q, I, F> A for TestB<Q, F>
   |             ^ unconstrained type parameter

For more information about this error, try `rustc --explain E0207`.
error: could not compile `playground` due to previous error
```

If I remove the GAT, the code compiles successfully. I've created the following two playground examples to play around with (the first one compiles, the second one doesn't):
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=15548086c5da59870ffbf5b4fe4de27a
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=725c4e36f367bd3b1ba30917cfc38b65

I'm not 100% sure that this is a bug, but the fact, that adding a GAT parameter to (as it seems) an unrelated type produces such an error, looks strange to me.

### 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.56.0-nightly (5eacec9ec 2021-08-28)
binary: rustc
commit-hash: 5eacec9ec7e112a0de1011519a57c45586d58414
commit-date: 2021-08-28
host: x86_64-pc-windows-msvc
release: 1.56.0-nightly
LLVM version: 13.0.0
```