sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.jit saves nonpersistent buffers
Labels: oncall: jit,days

## 🐛 Bug

nonpersistent buffers were added recently: https://github.com/pytorch/pytorch/issues/18056 [doc](https://pytorch.org/docs/master/generated/torch.nn.Module.html?highlight=buffer#torch.nn.Module.register_buffer)

A fantastic addition, but alas it doesn't work with torchscript. It doesn't skip this type of buffer when saving the trace. as a result `loaded_model.state_dict()` contains non-persistent buffers. Please see the example below:

## To Reproduce

```
import torch
from torch import nn
class NonPersistant(nn.Module):
    def __init__(self):
        super().__init__()
        self.register_buffer("test", torch.zeros(1), persistent=False)
    def forward(self, inputs):
        return inputs

model = NonPersistant()
if "test" in model.state_dict():
    print("pytorch: test is in state_dict")
traced_gpt2 = torch.jit.trace(model, [torch.zeros(1)])
pt_file_name="module-test"
torch.jit.save(traced_gpt2, pt_file_name)
loaded_model = torch.jit.load(pt_file_name)
if "test" in loaded_model.state_dict():
    print("jit: test is in state_dict")
```

prints:
```
"jit: test is in state_dict"
```

## Expected behavior

`torch.jit` shouldn't save non-persistent buffers/not have them in the `state_dict`.

## Environment

```
PyTorch version: 1.7.0.dev20200910
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.0.130
GPU models and configuration:
GPU 0: GeForce GTX TITAN X
GPU 1: GeForce GTX TITAN X

Nvidia driver version: 440.95.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.2
[pip3] pytorch-lightning==0.8.5
[pip3] torch==1.7.0.dev20200910
[pip3] torchvision==0.8.0.dev20200910
[conda] blas                      1.0                         mkl
[conda] cudatoolkit               10.2.89              hfd86e86_1
[conda] mkl                       2020.2                      256
[conda] mkl-service               2.3.0            py38he904b0f_0
[conda] mkl_fft                   1.1.0            py38h23d657b_0
[conda] mkl_random                1.1.1            py38h0573a6f_0
[conda] numpy                     1.19.2                   pypi_0    pypi
[conda] numpy-base                1.19.1           py38hfa32c7d_0
[conda] pytorch                   1.7.0.dev20200910 py3.8_cuda10.2.89_cudnn7.6.5_0    pytorch-nightly
[conda] pytorch-lightning         0.8.5                    pypi_0    pypi
[conda] torchvision               0.8.0.dev20200910      py38_cu102    pytorch-nightly
```

cc @gmagogsfm
Repository: rust
Issue: Tracking Issue for feature(unix_socket_ancillary_data)
Labels: T-libs-api,C-tracking-issue,A-io,Libs-Tracked,O-unix

Tracking issue for `feature(unix_socket_ancillary_data)` to extend  `UnixStream` and `UnixDatagram` to send and receive ancillary data. For example file descriptors.

### Unresolved Questions
- Review the `SocketAncillary` struct before stabilization to ensure it is compatible with all OSes.
- `fuchsia`, `haiku`, `illumos`, `ios`, `macos` and `solaris` does not have `MSG_CMSG_CLOEXEC` constant in `libc`
- `fuchsia` and `uclibc`(`x86_64`) does not have  `cmsghdr` struct in `libc`
- The current version of rust `libc` does not have `ucred` struct for the target OS `emscripten`, but `emscripten` has this struct in the [standard C library](https://github.com/emscripten-core/emscripten/blob/421eda7f3e4f82a2a28e09cb73a5f21ee13b156a/system/include/libc/sys/socket.h#L23)

### Implementation history

PR #69864, #82589, #83374
Repository: deno
Issue: feature proposal: Deno builtin function & ops to create an anonymous pipe.
Labels: cli,public API,suggestion

I propose idea of an additional builtin function `Deno.pipe` to open a new anonymous pipe.  The call result ultimately would provide two resource ids which could be used to assemble process pipelines.

The key benefit compared to alternatives:
* Compared to using `Deno.run` with stdout and stdin using the piped option & using `Deno.copy` to copy between one stdout and the next stdin:  Using direct "anonymous" pipes between child processes means that the data would not be handled in the deno process.   It therefore would use less CPU.
* Compared to making a pipe on the filesystem using `mkfifo` and opening the fifo for read and write using `Deno.read` and `Deno.write`:  Using an anonymous pipe avoids having to expose the pipe to the filesystem (cleanup issues, security issues?, inconvenient), avoids platform dependent hacks.
* Compared to using `Deno.run({cmd:'bash','-c','process1 | process2'})`:  Using an anonymous pipe in the deno process avoids the overhead and inconvenience of a shell subprocess.

Use case sketch:
```
// prepare a pipe: (proposed new function).
const anonpipe = await Deno.pipe();

// start a process (esp if it will produce a lot of stdout output)
const producer = Deno.run({cmd:['producer'], stdout: anonpipe[0].rid});

// start next process in a pipeline of processes:
const consumer = Deno.run({cmd:['consumer'], stdin: anonpipe[1].rid});

// await processes status' and close all etc
```

The proposed function could have types as follows:
```
function Deno.pipe(): Promise<[AnonPipe,AnonPipe]>;

/// (one end of) an anonymous pipe
class Deno.AnonPipe {
// properties and methods similar to Deno.File but omitting seek & seekSync
readonly rid: number;
write(p: Uint8Array): Promise<number>;
writeSync(p: Uint8Array): number;
read(p: Uint8Array): Promise<number | null>;
readSync(p: Uint8Array): number | null;
close(): void;
};
```


The implementation in rust would be to call one of the platform depdendent functions for create an anonymous pipe
eg https://github.com/rust-lang/rust/blob/f4e4485a052857e5dd32ea29ceb7b1a8223e83cc/library/std/src/sys/unix/pipe.rs#L12
```
fn anon_pipe() -> io::Result<(AnonPipe, AnonPipe)>
```
or
https://github.com/rust-lang/rust/blob/f4e4485a052857e5dd32ea29ceb7b1a8223e83cc/library/std/src/sys/windows/pipe.rs#L48
etc


Note:
* The existing `piped` io options on `Deno.run` already internally create anonymous pipes for reading/writing stdio. (In `tokio::process::Command` and `std::process::Command`).  In order to pipe between two processes it needs an API to create the anonymous pipes separately from the processes.
* Assuming the existing `Deno.run` option for stdio to & from a resource id number works.
Repository: TypeScript
Issue: Custom array index types
Labels: Suggestion,Awaiting More Feedback

## Search Terms
custom array index type

## Suggestion
Arrays are indexed by integers, cool. But they could also be indexed by something equivalent to an integer, like an enum-like class or wrapper around a number. For example:

```ts
class PlayerNumber { constructor(readonly n: number); valueOf() { return this.n; } }
let currentTurn = 3;
const players: Player[];
let currentPlayer = new PlayerNumber(4);

// correct
players[+currentPlayer]
// oops, typo, but no protection
players[+currentTurn]
```

Imagine we had a TypedArray<K extends { valueOf(): number }, V> that in all respects was like Array, except all array indices in any function signature were of type K, and all arrays in any function signature were instead TypedArray<K, ...>. And the + wouldn't be necessary. Then:

```ts
// correct AND AWESOME
players[currentPlayer]
// compiler error
players[currentTurn]
```

## Use Cases
I am writing a game framework in TypeScript and there are just lots of arrays everywhere indexed by players, token types, round number, etc and it's easy to mess up which index goes where.

## 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, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

I'm unclear on the last bullet. There is a bit of "operator overloading" involved in the proposal as suggested. I am not sure if that is disqualifying and/or if there is an alternative that would work.
Repository: rust
Issue: Tracking Issue for feature(unix_socket_peek)
Labels: T-libs-api,C-tracking-issue,A-io,Libs-Tracked,O-unix

This is a tracking issue for methods `peek` and `peek_from` on `UnixStream` and `UnixDatagram`  (#73761).
The feature gate for the issue is `#![feature(unix_socket_peek)]`.

### Public API
```rust
impl UnixStream {
    pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize>
}

impl UnixDatagram {
    pub fn peek(&self, buf: &mut [u8]) -> io::Result<usize>
    pub fn peek_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)>
}
```


### Steps / History

- [x] #73761 - initial implementation
- [ ] Final Commitment Period (FCP)
- [ ] Stabilization

### Unresolved Questions

- None yet.
Repository: material-ui
Issue: [Autocomplete] With `autoComplete` + `autoHighlight` the highlighted option should appears inline
Labels: component: autocomplete,ready to take

<!-- Provide a general summary of the issue in the Title above -->

Hi,there. I'm not sure this is a bug or feature. When `<Autocomplete autoComplete autoHighlight />`, the first option not appears inline after the input cursor immediately. It work as expected when selection move up/down.

<!--
  Thank you very much for contributing to Material-UI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [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.

## Current Behavior 😯

If this is a bug, the default highlighted option NOT inline after the input cursor immediately when autoHighlight is on.

<!-- Describe what happens instead of the expected behavior. -->

## Expected Behavior 🤔

If this is a bug, the default highlighted option should inline after the input cursor immediately when autoHighlight is on.


<!-- Describe what should happen. -->

## Steps to Reproduce 🕹

<!--
  Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug.
  Include code to reproduce, if relevant (which it most likely is).

  You should use the official codesandbox template as a starting point: https://material-ui.com/r/issue-template

  If you have an issue concerning TypeScript please start from this TypeScript playground: https://material-ui.com/r/ts-issue-template

  Issues without some form of live example have a longer response time.
-->

Steps:

1. https://codesandbox.io/s/material-demo-forked-pifom
2. type a
3. the input should be become Andorra
Repository: vscode
Issue: Add support for new `editor.renderWhitespace` in the View menu
Labels: feature-request,menus

Issue Type: <b>Feature Request</b>

Currently the View menu only supports a boolean `Render Whitespace` menu option. It would be nice if it was improved to support all the new values that the config option `editor.renderWhitespace` supports.

VS Code version: Code 1.49.1 (58bb7b2331731bf72587010e943852e13e6fd3cf, 2020-09-16T23:21:17.533Z)
OS version: Darwin x64 19.6.0


<!-- generated by issue reporter -->
Repository: PowerToys
Issue: [PowerRename] Add option to merge folders with conflicting names after a rename
Labels: Idea-Enhancement,Product-PowerRename

## 📝 Provide a description of the new feature

There should be an option to merge folders with conflicting names after renaming.

Given the following folder structure:
```
05-01
05-02
05-03
05-04
06-01
06-02
06-03
06-04
```

I want to remove the dash and the last two digits from the folder names.

I can do this via regex: `(-[0-9]{2})$` and leaving the `Replace with` field empty.

This operation will result in conflicting folder names.

## Expected behavior

With an option to merge folders with conflicting names, the resulting folder structure would be:

```
05
06
```

## Current behavior

A suffix with a number is added to the folders with conflicting names, resulting in the following folder structure:

```
05
05 (1)
05 (2)
05 (3)
06
06 (1)
06 (2)
06 (3)
```
---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: flutter
Issue: Enforce consistency of UI attached to FlutterEngine
Labels: team,platform-android,engine,P3,team-android,triaged-android

We currently have a concept of having Android UI components being attached to the FlutterEngine and its subcomponents. But they have parallel implementations. 

On the one hand, FlutterEngine.getActivityControlSurface expect custom FlutterView-holding activity implementers to register its activity lifecycle via attachToActivity/detachFromActivity. 

On the other hand, the FlutterEngine.getRenderer also expect custom FlutterView-holding activity implementers to register the view's lifecycle via the FlutterView's attachToFlutterEngine (the 2 have opposite directions but the same semantic). 

Yet nothing enforces that these 2 parallel tracks are applied against the same activity/FlutterView group instance. 

The attach mechanisms could use a lot more assertions and perhaps unify the 2 APIs. 

@mehmetf please let me know if you see symptoms manifesting from this potential footgun. Otherwise, I'm letting this refactor be low-priority at the moment.
Repository: godot
Issue: 2 active directions when controller D-Pad quickly changes direction
Labels: bug,platform:linuxbsd,confirmed,needs testing,topic:input

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
Godot 3.2.3 and 3.2.2

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Arch Linux

**Issue description:**
<!-- What happened, and what was expected. -->
Change quickly the direction on D-Pad of gamepad doesn't released the first direction.
Tested with Xbox Controller, Dualshock 4 and Nintendo Switch Controller

**Steps to reproduce:**
Download the "Joypads Demo / Tools" and quickly switch from left to right or top to bottom for example, both directions remain pressed :
![gamepad](https://user-images.githubusercontent.com/71564949/93687811-fa67e880-fac0-11ea-9892-ff6d667ef5d5.png)
Repository: rust
Issue: Consider making `htmldocck` more specific
Labels: A-testsuite,T-rustdoc

Currently `htmldocck` allows the text in rustdoc tests to be shorter, but not longer than the expected test. So if the actual text were `Option<T` and you wrote `Option<T>`, it would fail the test. But if the actual were `Option<T>` and the expected were `Option<T`, it would pass the test.

This behavior is not super intuitive and seems like it could lead to false negatives where it didn't catch regressions. Rustdoc should consider changing it.

_Originally posted by @jyn514 in https://github.com/rust-lang/rust/pull/76934#discussion_r491520801_
Repository: You-Dont-Know-JS
Issue: Chapter 2: Functions, Confusing Grammar
Labels: errata

Last sentence in the 7th paragraph is phrased in a confusing way:

> Not all languages treat functions as values, but it's essential for a language to support the functional programming pattern, as JS does.

Some suggested alternatives:
- Not all languages treat functions as values, but it's essential for a language that supports the functional programming pattern, as JS does.
- Not all languages treat functions as values, but it is essential for languages that support the functional programming pattern, like JS.

----
**Edition:** 2nd

**Book Title:** YDKJSY

**Chapter:** 2

**Section Title:** Functions

**Problem:** Grammar
Repository: go
Issue: cmd/doc: match major module versions greater than 1 without needing a /vN suffix
Labels: help wanted,NeedsFix,modules

### What version of Go are you using (`go version`)?

I'm using Go 1.15, but I confirmed that none of the behavior I describe below is any different as of

    go version devel +a3868028ac Sat Sep 19 09:43:15 2020 +0000 linux/amd64

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

N/A

### What did you do?

I have a module which uses `github.com/go-chi/chi/v4` as a dependency. The `go.mod` contains

```
require (
        // ...
        github.com/go-chi/chi/v4 v4.0.0-rc1
        // ...
)
```

(And it doesn't involve any other module or package named `chi`.)

Inside this module, I was trying to use `go doc` to review some documentation for this dependency.

### What did you expect to see?

I should be able to use the name `chi` to call up package docs for `github.com/go-chi/chi/v4`:

```
$ go doc chi.get
package chi // import "github.com/go-chi/chi/v4"

func (mx *Mux) Get(pattern string, handlerFn http.HandlerFunc)
    Get adds the route `pattern` that matches a GET http method to execute the
    `handlerFn` http.HandlerFunc.

```

### What did you see instead?

The name `chi` is not enough to get `go doc` to bring up package docs for `github.com/go-chi/chi/v4`. I need to refer to it as `chi/v4`:

```
$ go doc chi.get
doc: symbol chi is not a type in package main installed in "."
exit status 1
$ go doc chi/v4.get
package chi // import "github.com/go-chi/chi/v4"

func (mx *Mux) Get(pattern string, handlerFn http.HandlerFunc)
    Get adds the route `pattern` that matches a GET http method to execute the
    `handlerFn` http.HandlerFunc.

```

By the way, is there some other issue tracking more general `go doc` improvements to better work with modules? I notice that `go help doc` only mentions `GOPATH`, not modules, so I suspect that there might be more work required in this area.
Repository: deno
Issue: Deno.exit terminates entire process when using run --watch
Labels: bug,cli,help wanted,--watch

I'm running my script with `deno run --watch --unstable myscript.ts`. When it encounters a call to `Deno.exit`, the script terminates, including the file watcher.

I expected `Deno.exit` to terminate the script, but keep the file watcher alive. This is how Node's `process.exit` behaves when used with nodemon.

It seems culprit is [the current implementation, which is just a passthrough to `std::process::exit`](https://github.com/denoland/deno/blob/104aebdfb5d01f7482bacef6d58c2ce16da44334/cli/ops/os.rs#L117). I'm still familiarizing myself with Deno and V8, but is the solution something like tearing down the active runtime without exiting the main process?
Repository: pytorch
Issue: torch.distributed launch.py is hanged.  (pid, sts) = os.waitpid(self.pid, wait_flags)
Labels: oncall: distributed,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1.running in the terminal :python3.5 -m torch.distributed.launch --nproc_per_node=2 --master_addr 127.0.0.2 --master_port 29501 train.py
1.after many epochs training, it randomly hanged, The procedure still exists but hanged
1.This often happens on weight models, a light-weight model that only runs for several hours or one day usually don't have this bug.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/torch/distributed/launch.py", line 235,
 in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/torch/distributed/launch.py", line 228,
 in main
    process.wait()
  File "/usr/lib/python3.5/subprocess.py", line 1658, in wait
    (pid, sts) = self._try_wait(0)
  File "/usr/lib/python3.5/subprocess.py", line 1608, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
The program should continue to run, but has been suspended, as if the child process died

## 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
```

 - PyTorch Version (e.g., 1.0):1.1
 - OS (e.g., Linux):ubuntu 16.04.6
 - How you installed PyTorch (`conda`, `pip`, source):pip
 - Build command you used (if compiling from source):
python3.5 -m torch.distributed.launch --nproc_per_node=2 --master_addr 127.0.0.2 --master_port 29501 train.py

 - Python version:3.6.7
 - CUDA/cuDNN version:CUDA Version 10.0.130  cudnn:7.5.0
 - GPU models and configuration:four rtx 2080ti
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski
Repository: rust
Issue: Move the doc directory to separate repo
Labels: A-docs,T-infra,A-meta,A-contributor-roadblock

The doc directory contains documentation for various tools and also submodules for various other learning resources. I think it should be moved out to be on its own separate repo. This would help documentation writers like us to clone only the docs without cloning the entire compiler sources. Plus it has become a quite large directory with many files