sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proxy.golang.org: don't cache /@latest for modules that no longer exist at the upstream head revision
Labels: NeedsInvestigation,modules,proxy.golang.org

In gomodule/redigo#440, a nested `github.com/gomodule/redigo/redis` module was created and subsequently removed from the `github.com/gomodule/redigo` repository: today, the nested module does not exist at the head revision of that repo, and also does not exist in the latest tagged release of the parent module (`github.com/gomodule/redigo`).

In https://github.com/gomodule/redigo/pull/440#issuecomment-621892705 and https://github.com/gomodule/redigo/pull/440#issuecomment-621930004, I noted that `proxy.golang.org` was still serving an old commit for `/@latest` for the nested module over an hour later, even though `GOPROXY=direct` correctly reported that there was no `latest` version of that module, and even though `proxy.golang.org` did know about a higher (and later) pseudo-version of that module.

As a workaround, the owners of the repo had to tag an explicit release of the nested module, even though they did not intend for anyone to actually use that release.

I don't think that workaround should have been necessary: I think `proxy.golang.org` should not serve known-stale contents for the `/@latest` endpoint. That endpoint should be invalidated whenever a newer version of the named module is successfully fetched, even if that version is not itself `latest` (as interpreted by the `go` command).

That may mean that `/@latest` transitions from advertising a version of the module to no longer advertising any such version, but that behavior is no worse than what would happen if the repo owner took some other drastic action to remove the module — such as publishing a commit on the default branch with all of the source code deleted, or publishing a commit with the `module` line declaring some other path. Regardless of the reason, `proxy.golang.org` should view the affirmative non-existence of a module as a valid “latest” state for that module, and not get stuck advertising “the last version that did exist”.

This only really matters for modules that never explicitly tagged any release or pre-release version, since the `go` command does not consult the `/@latest` endpoint unless the list of release and pre-release versions is empty.

(Note that, even if the `/@latest` endpoint itself does not advertise any version, the proxy _should_ continue to serve all previously-fetched versions of any module with a suitable license. I am _not_ proposing that we evict any explicit versions from the cache — only the `/@latest` endpoint itself.)

CC @jayconrod @matloob @katiehockman @heschik @hyangah @stevenh
Repository: go
Issue: x/build/cmd/gopherbot: generalize issue gardening tasks to work on all subrepos
Labels: Builders,NeedsInvestigation

Some of the subrepos maintain their own issue trackers, so it would be useful to have the general issue gardening tasks work on the subrepos. I've narrowed these tasks down to:

- Freezing old issues and closing issues in the WaitingForInfo state
- Automatically labeling proposals and documentation issues
- Applying labels from comments
Repository: TypeScript
Issue: Using classes in jsdoc comments results in different behaviors depending on how the class was required
Labels: Bug


*TS Template added by @mjbvz*

**TypeScript Version**: 3.9.1

**Search Terms**
- javascript
- jsdoc

---

Issue Type: <b>Bug</b>

I have a class Foo in a file deep in my project. 

Everything works fine if I require it directly: intellisense understands that when I use `Foo` in my jsdoc comments, I mean that I want instances of Foo:

![image](https://user-images.githubusercontent.com/17253950/81443634-0ee0bf80-9176-11ea-961c-38bcc56b9853.png)

But if I require the same file through other files, intellisense thinks I want the Foo class:

![image](https://user-images.githubusercontent.com/17253950/81443764-536c5b00-9176-11ea-818b-75b6d114cb55.png)


I have created an example repo that reproduces the problem here:
https://github.com/gaelhameon/vscode-intellisense-issue

Is this the expected behavior ? 
If it is, is there a way to have the "instance" behavior without having to require the file directly ?

Thanks in advance!

VS Code version: Code 1.45.0 (d69a79b73808559a91206d73d7717ff5f798f23c, 2020-05-07T16:18:48.860Z)
OS version: Windows_NT x64 10.0.18362

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1800)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: enabled<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off_ok<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.82GB (1.53GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (5)</summary>

Extension|Author (truncated)|Version
---|---|---
javascript-test-runner-reloaded|ale|2.2.1
vscode-eslint|dba|2.1.5
gitlens|eam|10.2.1
vscode-pull-request-github|Git|0.16.0
vscode-commitizen|Kni|0.8.4


</details>
<!-- generated by issue reporter -->
Repository: pytorch
Issue: PyTorch's flip returns a new tensor, but NumPy's flip returns a view
Labels: triaged,module: numpy

PyTorch's flip returns a new tensor, which is inconsistent with NumPy's behavior of flip returning a view and PyTorch's own transpose behavior. 

cc @mruberry
Repository: pytorch
Issue: PyTorch's rot90 returns a new tensor, inconsistent with NumPy's returning a view
Labels: triaged,module: numpy

PyTorch's rot90 returns a new tensor, which is inconsistent with NumPy's returning a view and PyTorch's own handling of similar operations, like transpose. 

cc @mruberry
Repository: pytorch
Issue: Adding model metadata in TorchScript model file
Labels: triage review,oncall: jit,module: serialization

## 🚀 Feature
Adding model metadata in TorchScript model file including:
1. Number of inputs and outputs
2. Datatype of inputs and outputs
3. Shape of inputs and outputs

It would greatly simply and improve model deployment and error handling for TorchScript models and add to the stability of the C++ Backend. 

## Motivation

We are working on the [Triton Inference Server](https://github.com/NVIDIA/triton-inference-server) and support PyTorch (Libtorch) as one of the backends. The TorchScript model file (*.pt) does not contain sufficient metadata about the model such as the number, shape and datatypes of inputs and outputs. Our current workaround is for the user to specify this information manually.

As I understand, the shape data is not retained to allow for the model to be more generic. It would however be useful for us to have as much information about the model available in the model file itself. Without this we require the user to manually specify these details which can often be tedious and prone to error.

## Pitch

Both TensorFlow and ONNX models store such information and it makes it easier to verify this information and deploy these models. 

In addition to this it might be useful to have an option for shape specific information to be retained. In cases where certain dimensions are allowed to be variable these dimensions could be represented with a dummy value such as -1. All this information would allow us to validate that the data being passed to the model for inference is indeed valid.

## Alternatives

I noted that there is a way to [add additional metadata](https://pytorch.org/docs/stable/notes/large_scale_deployments.html#attaching-metadata-to-saved-torchscript-models) manually to the model but that too is a manual process. 

## Additional context

I had a discussion on the PyTorch Slack where I was informed that there exists function `inputs()` and `outputs()` [At least in Python] for the model that contains information about the number and datatype of the inputs however this required the `@torch.jit.script` decorator. Since there are two ways to export a model to torchscript (the second one using tracing) it could be useful and more user friendly to have this metadata _always_ added to the model file (as in TensorFlow and ONNX) since it would add negligible size.


cc @suo
Repository: neovim
Issue: shada: ignore files based on suffix (or pattern/regex)
Labels: enhancement,editor-state

The `'shada'` options lets you ignore files based on the start of their paths, e.g. `set shada='10,r/tmp` will tell Neovim to only store ten items and ignore the ones that live in `/tmp`.

I would also like to be able to tell Neovim to ignore files the path of which ends with a specific string, for example `COMMIT_EDITMSG`. I can imagine two ways of doing this, either add a `$` at the end of the current `r` option (e.g. `set shada='10,rCOMMIT_EDITMSG$`) to "anchor" the string to the end of the path, or create a new option, for example `R` (e.g. `set shada='10,RCOMMIT_EDITMSG`).

If this feature makes sense to you, I think implementing it would only require adding a check to this function:

https://github.com/neovim/neovim/blob/55b62a937c27715f7e6c299ae312c38edf08fa74/src/nvim/shada.c#L4057-L4078

I'm absolutely willing to work on this myself.
Repository: go
Issue: container/list: Remove of invalid Element after Init / reset leads to negative Len
Labels: 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.14.2 darwin/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
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
</pre></details>

### What did you do?
```go
var l list.List
el := l.PushBack(42)
l = list.List{} // Reset the list.
l.Remove(el)
fmt.Println(l.Len())
```

### What did you expect to see?
```bash
0
```


### What did you see instead?
```bash
-1
```
Repository: pytorch
Issue: Compiling errors when trying to cross-compile the C++ API for RTOS (QNX)
Labels: module: build,module: cpp,triaged

I am currently trying to implement the Pytorch C++ API into production. RTOS are indispensable in production environments so I'm trying to cross-compile with cmake for QNX Neutrino 7.0.0 (x86_64). 
However, when compiling a simple test program (empty main() function just including "#include <torch/torch.h>") 
I get the following compiler errors:

https://github.com/shyney7/libtorch-cross-RTOS-test/blob/master/Compilerlogs/comperr-without-stdlib-flag.md

I had to set the following command so that cmake finds the torch library in the host path.

` SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)`

This is how my **cmake Toolchain File** looks like:

https://github.com/shyney7/libtorch-cross-RTOS-test/blob/master/cmake/qnx_7.0.0_linux_x86_64.cmake

This is my **CMakeLists.txt** file:

https://github.com/shyney7/libtorch-cross-RTOS-test/blob/master/CMakeLists.txt

Unfortunately I am not a computer scientist but a mechanical engineer working at a research lab of a german university trying to implement libtorch into production. So I am not sure what the compiler errors mean. Thats why I searched the web for similar errors and found an issue of another repo here: 
https://github.com/eProsima/Fast-RTPS/issues/300
There it is mentioned that it is also needed to prevent the qcc compiler from using the LLVM Compiler Infrastructure from v1/memory by using the `-stdlib=libstdc++` flag.
I also tried this by changing my CMakeLists.txt file to use the following flags:
`set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -stdlib=libstdc++ ${TORCH_CXX_FLAGS}")` 

But then I'm getting the following **compiler errors**:

https://github.com/shyney7/libtorch-cross-RTOS-test/blob/master/Compilerlogs/comperr_with-stdlib%3Dlibstdc%2B%2B_flag.md

In the announcement videos where Libtorch and the C++ API were introduced, it was always said that the C++ API is specifically for production environments. The fact is that in production environments you mostly work with real-time operating systems like QNX or FreeRTOS, so I'm sure that there is somehow a way to get libtorch working on QNX.

Here is the repo with all the files:
https://github.com/shyney7/libtorch-cross-RTOS-test

Here is also a link to my first post on the discussion forums where I faced some issues with setting up the cmake toolchain file correctly:
https://discuss.pytorch.org/t/cross-compiling-with-cmake-for-embedded-systems-qnx/79681

## Environment

 - Libtorch Version : 1.5 Release
 - OS : cross-compiling on Ubuntu 18.04 (VM) for **QNX 7.0.0 (x84_64)**
 - How you installed PyTorch : libtorch 1.5 zip from pytorch.org (for linux tried with both Pre & cxx11 ABI)
 - Build command you used : 

`cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/qnx_7.0.0_linux_x86_64.cmake ..`
`make`
 - GNU version: 5.4.0
 - CUDA/cuDNN version: none
 - GPU models and configuration: none
 - cmake version: 3.10.2 


cc @malfet @yf225 @glaringlee
Repository: pytorch
Issue: Status of support for training on mobile
Labels: oncall: mobile

Hi,

I need to build a prototype for federated learning on mobile (initially iOS). I have succeeded to transfer the pytorch model with torchscript and running inference of the dataset works perfectly in iOS (using version 1.5.0).

Now for the next step I would need to actually train the model on the device and according to this:
https://github.com/pytorch/pytorch/pull/34958

it seems it might not yet be possible?

I did ask a similar question in November:
https://github.com/pytorch/pytorch/issues/29652
and got a reply from @dreiss that this was in progress but since that specific problem was different and 6 months have passed I closed the stale ticket and ask more concisely here instead if there is any new info.

I did notice there is a train() function on the model so I tried that like this:
```
at::Tensor tensor = torch::from_blob((void*)buffer, {1, 10}, at::kFloat);
_impl.train();
torch::autograd::AutoGradMode guard(true);
//at::AutoNonVariableTypeMode non_var_type_mode(true);
auto outputTensor = _impl.forward({tensor}).toTensor();
```

but it crashes with this output message:
```
Could not find any similar ops to aten::_adaptive_avg_pool2d_backward. This op may not exist or may not be currently supported in TorchScript.
:
  File "<string>", line 9
                grad_self = grad.expand(self.size()) / (self_size[-1] * self_size[-2])
            else:
                grad_self = torch._adaptive_avg_pool2d_backward(grad, self)
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE

            return grad_self
```
Repository: rust
Issue: Suggest some usage of super:: in modules?
Labels: C-enhancement,A-diagnostics,A-resolve,T-compiler

This is wrong code:
```rust
use std::iter::once;

mod foo {
    fn bar() {
        let _ = once(1);
    }
}

fn main() {}
```
Rustc currently (1.45.0-nightly 99cb9ccb9 2020-05-11) gives:
```rust
error[E0425]: cannot find function `once` in this scope
 --> ...\test.rs:5:17
  |
5 |         let _ = once(1);
  |                 ^^^^ not found in this scope
  |
help: consider importing one of these items
  |
4 |     use core::iter::once;
  |
4 |     use std::iter::once;
  |

warning: unused import: `std::iter::once`
 --> ...\test.rs:1:5
  |
1 | use std::iter::once;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error: aborting due to previous error; 1 warning emitted
```
But I think it could suggest to write `super::once(1);` instead.
Repository: deno
Issue: Add URLs to `--allow-net`
Labels: cli,permissions,suggestion

Deno should allow URLs to be allowed in `--allow-net` and or other than domain names and ports pair.

As of current to run this simple JavaScript file:
```javascript
fetch('http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/').then( (resp) => {
    console.log(resp)
} )
```

I would need to allow all URLs possible with `gist.githubusercontent.com`, or allow any Domain names URL(which both are not fully secure):

All URLs possible with `gist.githubusercontent.com`:
```bash
deno --allow-net="gist.githubusercontent.com" test.js                                 Does compile
Response {
  responce data...
}
```

Allow any Domain names URL:
```bash
deno --allow-net test.js
Does compile
Response {
  responce data...
}

```

And if I try running the secure way, I get en error:
```bash
$ deno --allow-net="http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh" test.js
Does compile
error: Uncaught PermissionDenied: network access to "http://gist.githubusercontent.com/KSXGitHub/62cb052060dc169796ab3698ff53c33b/raw/9d7d84910b344eb8580be8b91cf539e18e565e5d/init.sh/", run again with the --allow-net flag
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
    at async fetch ($deno$/web/fetch.ts:591:27)
```

Thanks,
Dex Devlon
Repository: pytorch
Issue: c10/macros/cmake_macros.h not exists
Labels: triaged,oncall: mobile

Hi,
I'm trying to include pytorch/script.h in my CPP android project. 
I'm using ndk21 and C++14.
I cloned the repository and used "git submodule update --init --recursive" to update sub=modules.
I'm getting the following compilation error:

In file included from C:\REPOS\pytorch\torch/script.h:3:
In file included from C:\REPOS\pytorch\torch/csrc/api/include/torch/types.h:3:
In file included from C:\REPOS\pytorch/aten/src\ATen/ATen.h:3:
In file included from C:\REPOS\pytorch\c10/core/Allocator.h:6:
In file included from C:\REPOS\pytorch\c10/core/Device.h:3:
In file included from C:\REPOS\pytorch\c10/core/DeviceType.h:8:
C:\REPOS\pytorch\c10/macros/Macros.h:21:10: fatal error: **'c10/macros/cmake_macros.h' file not found**
#include <c10/macros/cmake_macros.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I do see that there is a file c10/macros/cmake_macros.h**.in**, an it specifically says:
 _Do not include this file directly. Instead, include c10/macros/Macros.h._
So what is the problem?
Repository: terminal
Issue: Support to transfer files from/to Azure Cloud Shell
Labels: Issue-Feature,Help Wanted,Product-Terminal,Area-AzureShell

Please support to transfer files from/to Azure Cloud Shell.

Thanks!
Repository: node
Issue: REPL with package.json "type":"module"
Labels: repl

Just as having "type":"module" in package.json in the current directory implies that .js files can do `import x from 'y'`, typing `node` (and then some code) in the directory, where that package.json is, shall also understand `import x from 'y'`.

In addition there shall be a way to pass a command line switch to node, so that on REPL it understands ES6 `import`.
Repository: pytorch
Issue: Support alternate casting rules
Labels: triaged,module: numpy,module: type promotion

torch.can_cast only supports one default casting rule:
https://pytorch.org/docs/master/generated/torch.can_cast.html

Numpy supports multiple kinds of casting rules:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.can_cast.html

We should define and implement alternatives for more flexibility and improved numpy parity.

Alternate casting rules could potentially also eventually be used to define an alternate "smallest common dtype" in type promotion, which could be useful in cases where we wish to preserve precision to a greater degree than in our default rules. E.g. in https://github.com/pytorch/pytorch/pull/37294 there was a desire to be more precise when comparing tensors of differing dtypes in assertEquals.

This ticket may need multiple sub-tasks, e.g.:
* Define new casting rules
* Add casting kwarg to can_cast
* Add casting kwarg to various in-place promoting ops
* Potentially define alternate promotion logic based on preserving precision under alternate casting rules.

cc @mruberry @nairbv
Repository: go
Issue: x/build/cmd/gomote: "--i-will-not-break-the-host" flag breaks argument order
Labels: Builders,NeedsInvestigation

`gomote ssh` currently requires an extra flag, `--i-will-not-break-the-host`, when connecting to a non-hermetic builder.

Unlike all of the other `gomote` flags, this one must be positioned ahead of the subcommand instead of behind it. That needlessly breaks scripts that wrap `gomote` for more ergonomic use (#29037).

Honestly, this flag is pretty obnoxious anyway — I think it should probably be replaced with a warning at login rather than an explicit flag. But if we keep the flag, it should at least be fixed so that it parses in the usual order for subcommand flags.

```
~/go$ mote ssh --i-will-not-break-the-host
+ SUBCMD=ssh
+ shift
+ '[' -z ssh ']'
+ '[' ssh == create ']'
+ '[' -z '' ']'
+ '[' -e /usr/local/google/home/bcmills/.gomote ']'
+ GOMOTE=user-bcmills-dragonfly-amd64-5_8-0
+ '[' -z user-bcmills-dragonfly-amd64-5_8-0 ']'
+ gomote ssh user-bcmills-dragonfly-amd64-5_8-0 --i-will-not-break-the-host
ssh usage: gomote ssh <instance>
  -i-will-not-break-the-host
        required for older host configs with reused filesystems; using this says that you are aware that your changes to the machine's root filesystem affect future builds. This is a no-op for the newer, safe host configs.
```

CC @andybons @bradfitz
Repository: pytorch
Issue: Provide an issubdtype API
Labels: triaged,module: numpy,module: type promotion

We should provide an issubdtype API, similar to that in numpy:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.issubdtype.html

We often want to determine if a dtype is of a particular kind:
https://github.com/pytorch/pytorch/pull/34312

But the approach of adding is_xxx for complex, quantized, floating, integral, etc is complicated and not mutually exclusive. An API that provides "sub" dtype semantics would provide more flexibility and better account for overlap.

To do this we'll need to define a type that complements ScalarType/dtype which can be used in subdtype APIs in both Python and C++.

We will probably base our type hierarchy on numpy, but should specify the details in this ticket in case there are areas where we need to deviate, or where we have types not supported by numpy.

cc @mruberry @nairbv
Repository: pytorch
Issue: Clicking "Click here to view docs for latest stable release." on some pages leads to nowhere
Labels: module: docs,triaged

## 📚 Documentation

To reproduce:
- go to https://pytorch.org/docs/master/generated/torch.geqrf.html?highlight=geqrf#torch.geqrf
- Click  "Click here to view docs for latest stable release."
- Watch as it leads to a 404 page.