sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Why isn't pip finding the correct pytorch dependency?
Labels: module: binaries,triaged

## ❓ Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:

- [Discussion Forum](https://discuss.pytorch.org/)

For any reason I couldn't find elsewhere, my project's Travis automated test is now failing. It looks `pip` is not being able to find the correct dependency. More info here:
https://travis-ci.org/github/DanielAtKrypton/time_series_transformer/builds/765412036

How do I workaround this problem?

cc @ezyang @seemethere @malfet @walterddr
Repository: node
Issue: Installer firewall compatibility
Labels: windows,install

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: v14.16.0
* **Platform**: Microsoft Windows NT 10.0.19042.0 x64
* **Subsystem**:


### What steps will reproduce the bug?
Run the installer and choose to automatically install additional tools
<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

### How often does it reproduce? Is there a required condition?
Every time
### What is the expected behavior?
Pause and prompt for firewall access
<!--
If possible please provide textual output instead of screenshots.
-->

### What do you see instead?
Fails, and asks for exit
<!--
If possible please provide textual output instead of screenshots.
-->

### Additional information
When running a firewall [Example [Simplewall](https://github.com/henrypp/simplewall) ] in a whitelist mode [everything blocked by default], running the install additional tools option in the installer, will fail. As both powershell.exe then later choco.exe require firewall access, the installer does not prompt for firewall access etc, the script just pauses for exit. Should prompt for access or use a loopback.
<!--
Tell us anything else you think we should know.
-->
Repository: deno
Issue: Deno cache on a lock file
Labels: cli,suggestion

I want to be able to pre-cache my dynamic dependencies, I have pre locked my dependencies but no way to cache them ahead of time.

`deno cache lock.json` should cache all dependencies specified in the file.
Repository: node
Issue: `fs.watch` failed with adding a UNIX Domain Sock file under macOS
Labels: fs,macos

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: 14.15.4
* **Platform**: macOS
* **Subsystem**: darwin

### What steps will reproduce the bug?

<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

### How often does it reproduce? Is there a required condition?

#### /tmp/temp.js

```js
'use strict';

const fs = require('fs');
fs.watch('/tmp', (eventType, filename) => {
  console.log(`event type is: ${eventType}`);
  if (filename) {
    console.log(`filename provided: ${filename}`);
  } else {
    console.log('filename not provided');
  }
});
```

#### /tmp/tempp.js

```js
'use strict';

const net = require('net');

net.createServer(() => {}).listen(`/tmp/ttt-${Date.now()}`);
```

### What is the expected behavior?

`temp.js` should have output, either `filename provided: ...` or `filename not provided`.

<!--
If possible please provide textual output instead of screenshots.
-->

### What do you see instead?

Nothing outputed.

<!--
If possible please provide textual output instead of screenshots.
-->

### Additional information

<!--
Tell us anything else you think we should know.
-->
If a UNIX Domain Sock file is removed, the event outputted. But `add` occurs no event.

btw, Linux (Ubuntu) is OK.

+ Refs: https://github.com/paulmillr/chokidar/issues/876
Repository: go
Issue: x/image/font/{sfnt,opentype}: expose more SFNT tables
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 devel +135c9f45ec Wed Mar 31 04:13:44 2021 +0000 linux/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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/binet/.cache/go-build"
GOENV="/home/binet/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/binet/dev/go/gocode/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/binet/dev/go/gocode"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/binet/sdk/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/binet/sdk/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel +135c9f45ec Wed Mar 31 04:13:44 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build354109135=/tmp/go-build -gno-record-gcc-switches"

</pre></details>

### text layouting and typesetting

in the context of text layouting and typesetting, it would be great for the `sfnt` package to expose way to access more informations from the font tables.

_e.g._ somebody trying to replicate or port (parts of) the HarfBuzz library would want to have access to the informations provided by the tables `sfnt` is currently decoding but hiding from public consumption:
- https://godocs.io/github.com/benoitkugler/textlayout/harfbuzz
- https://godocs.io/github.com/benoitkugler/textlayout/fonts/truetype#LayoutTables
- https://pkg.go.dev/github.com/tdewolff/canvas/font#SFNT

for the purpose of drawing mathematical equations, having access to the `math` table informations would also be quite useful.
- https://docs.microsoft.com/en-us/typography/opentype/spec/math
(but this might be a separate issue)

@nigeltao
Repository: pytorch
Issue: LR scheduler step() behaviour with and without epoch parameter 
Labels: module: optimizer,triaged

I have a question regarding the epoch parameter in LR scheduler. I understand passing epoch as a parameter to self.step() is deprecated, however given 

https://github.com/pytorch/pytorch/blob/c371542efc31b1abfe6f388042aa3ab0cef935f2/torch/optim/lr_scheduler.py#L157

If the epoch is not None, then _get_closed_form is called if the scheduler has it, whereas it is not the case when epoch is None.

Doesn't it mean a different behaviour with and without the epoch parameter passed in self.step ? 





cc @vincentqb
Repository: transformers
Issue: use `BaseModelOutput` as common interface for all different `BaseModelOutputWith*`?
Labels: Feature request

Hello team,

I have been taking a look at the `different` output models from your models, and I wonder if it would make sense to inherit all the `BaseModelOutputWithPool` and all the other flavours of modeling output, instead of using `ModelOutput`.

https://github.com/huggingface/transformers/blob/c301c26370dfa48f6a6d0408b5bb9eb70ca831b3/src/transformers/modeling_outputs.py#L24

We are trying to build a wrapper around many of the public models hosted on hugging face, and it would be useful to know if we can assume that all the potential `outputs` of the models will contain `hidden_states`. Since now they all only inherit from `ModelOutput`  it seems a little confusing.

Am I missing something? Is it not something that can be assumed?
Repository: godot
Issue: 2D Editor Camera Outline Flicker
Labels: bug,topic:editor,confirmed,topic:2d

**Godot version:**
3.2.3
3.3 RC 7

**OS/device including version:**
Win 10 x64
GTX 1070 8GB
Driver: Nvidia Studio 461.92 (also happened before with Game Ready Driver)
GLES3
GLES2


**Issue description:**
The camera rectangle outlines in the 2D editor behaving weird when zooming in/out. For example you can see all 4 lines forming the rectangle but if you zoom one or two lines just disappears.


**Steps to reproduce:**
Create a new project (2D), add a camera (2D) and activate "Current". Now set "Zoom" to 4,4. Zoom out/in to see the lines "flicker".
Repository: flutter
Issue: [CanvasKit] flt-clip clip-path causes invisible HtmlPlatformView on Safari
Labels: engine,platform-web,e: web_canvaskit,has reproducible steps,browser: safari-macos,P2,found in release: 2.5,found in release: 2.6,team-web,triaged-web

## Problem

My `HtmlPlatformView` is **invisible** even though it should not be _only on Safari_.

I do not know what causes this problem, i.e. how to reproduce it. It only ever happens in a specific part of the widget tree. The same setup works elsewhere.

However, it happens **consistently** (every time) on **Safari** using **CanvasKit**.

## Setup

I am simply placing a `div` element in an `HtmlElementView`. The `div` has child `div`s that host JW Player.  
I am running on Flutter `v2.1.0-12.2.pre` using `CanvasKit`.

The browser is Safari `Version 14.0.3 (16610.4.3.1.7)`. On all other browsers, it works fine.

## Cause

More importantly, I have figured out the cause of the issue. See the screen recording: as soon as I disable the `flt-clip`s `clip-path`, the platform view is visible again.

https://user-images.githubusercontent.com/19204050/113291371-777ee080-92e2-11eb-9a86-d1c68cfdb506.mov

The happens **only** on Safari on CanvasKit. As I mentioned, I am not able to produce a minimal reproducible example.

## HTML tree

Since I am not sure which circumstances in Flutter cause this, I figured the best way would probably including the HTML tree causing this. Note that I deleted everything but the path to the div that is hidden.

```
<flt-glass-pane style="position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; cursor: default;">
    <flt-scene-host aria-hidden="true" style="pointer-events: none;">
        <flt-scene>
            <flt-clip style="transform-origin: 0px 0px 0px; position: absolute; clip: rect(0px, 549px, 759px, 0px); transform: none;">
                <flt-clip style="transform-origin: 0px 0px 0px; position: absolute; clip: rect(0px, 549px, 647px, 0px); transform: matrix(1, 0, 0, 1, 0, 112);">
                    <flt-clip style="transform-origin: 0px 0px 0px; position: absolute; /* clip-path: url(&quot;#svgClip23&quot;); */ transform: matrix(1, 0, 0, 1, 0, 16);">
                        <div style="width: 517px; height: 290.8125px; position: absolute; pointer-events: auto; transform-origin: 0px 0px 0px; transform: matrix(1, 0, 0, 1, 16, 64); opacity: 1;">
                            <div id="jw-player-3-prxBxSbF"
                            class="jwplayer jw-reset jw-state-idle jw-stretch-uniform jw-flag-aspect-mode jw-skin-simpleclub jw-breakpoint-2 jw-floating-dismissible jw-flag-user-inactive"
                            tabindex="0"
                            aria-label="Video Player"
                            role="application"
                            aria-describedby="jw-shortcuts-tooltip-explanation"
                            style="width: 100%;"></div>
                        </div>
                    </flt-clip>
                </flt-clip>
            </flt-clip>
        </flt-scene>
    </flt-scene-host>
</flt-glass-pane>
```
Repository: pytorch
Issue: Add suport to torch.gather for negative indices
Labels: triaged,enhancement,module: advanced indexing

## 🚀 Feature
Add negative index support to the `torch.gather` operation. Currently, attempts to use negative indices during `gather` operations will result in an out-of-bounds error, see below:
~~~python
source = torch.tensor([[1, 2], [3, 4]])
res = source.gather(1, torch.tensor([[-1, 0], [1, 0]]))
RuntimeError: index -1 is out of bounds for dimension 1 with size 2
~~~
It would be useful to permit the use of negative indices, like so:
~~~python
source = torch.tensor([[1, 2], [3, 4]])
res = source.gather(1, torch.tensor([[-1, 0], [1, 0]]))
print(res)
tensor([[2, 1], [4, 3]])
~~~


## Motivation
Generally, indexing operations in python tend to support negative index values. The lack of such support in PyTorch's `gather` operation is unexpected. It is noted that this perception may be subjective.

This "issue" can be worked around by subtracting the dimension's size from the negative values. However, this feels like just that, a work-around. Adding the requested behavior to the `gather` operation would make it feel more *in-line* with expected python indexing behavior.
Repository: node
Issue: async_hook gives older context.
Labels: async_hooks

Hello,

We are using async hook in our node application. We want to track each and every request's context as an when it comes. we are creating a chain of request context in one map based on the trigger ID and async ID. 

Find the below code for creating a chain.

```
init(asyncId, type, triggerAsyncId, _resource) {
        if (this.tracked.has(triggerAsyncId)) {
            this.tracked.set(asyncId, this.tracked.get(triggerAsyncId));
        }
 }
```
Here in the above snippet "this.tracked" is map and we are creating a chain of context inside this map and also using this map to get the context based on the asyncID.

It works fine until we move one page to another page very quickly. 

When we move from one page to another page very quickly and try to get the context object from our map using the async ID it gives the older context, and the chain breaks. 

We believe that out page is called before async hook init finishes its job...

Let me know if you need any more information on this.

Thanks in advance
Ronak Pandya
Repository: pytorch
Issue: Parameterless model still has extra inputs when exported to ONNX + insufficient checking of argument export_params
Labels: module: onnx,triaged,onnx-triaged

Note the wrong setting of `export_params = None` - probably should be checked by PyTorch to only be `True` or `False` (if `None` is accepted, its semantics should be clearly stated in the docs). Somehow the exported model has three inputs: one tensor and two int64. Where are they coming from?

![image](https://user-images.githubusercontent.com/1041752/113300283-0baa7100-92fe-11eb-9f0e-8cd4edcdfe79.png)


Original report: https://github.com/microsoft/onnxruntime/issues/7096 

```python
import onnxruntime
from torch import nn
import torch
import torch.nn.functional as F

print(torch.__version__)


class Model(nn.Module):
	def forward(self, x):
		p = F.pad(x, (1, 1), mode='constant').squeeze(1)
		return dict(o=p)


model = Model()
model.to(device='cuda')
x = torch.rand(1, 10).to(device='cuda')
print(x.shape)
print(model(x))

torch.onnx.export(
		model, (x,),
		'fp32_squeeze_repro.onnx',
		verbose=False,
		opset_version=12,
		export_params=None,
		do_constant_folding=True,
		input_names=['x'],
		output_names = ['o']
)

runtime = onnxruntime.InferenceSession('fp32_squeeze_repro.onnx')
print(runtime.run(None, dict(x=x.cpu().numpy())))

#1.8.0
#torch.Size([1, 10])
#{'o': tensor([[0.0000, 0.7245, 0.8421, 0.7092, 0.6501, 0.6383, 0.4523, 0.5001, 0.9790,
#         0.5590, 0.3269, 0.0000]], device='cuda:0')}
#Traceback (most recent call last):
#  File "fp32_squeeze_repro.py", line 33, in <module>
#    print(runtime.run(None, dict(x=x.cpu().numpy())))
#  File "/opt/conda/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 120, in run
#    raise ValueError("Model requires {} inputs. Input Feed contains {}".format(num_required_inputs, num_inputs))
#ValueError: Model requires 3 inputs. Input Feed contains 1
```

[fp32_squeeze_repro.onnx.zip](https://github.com/pytorch/pytorch/files/6243797/fp32_squeeze_repro.onnx.zip)


cc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof @SplitInfinity
Repository: transformers
Issue: Enable multiple `eval_dataset` in `Trainer` API
Labels: Feature request

# 🚀 Feature request

Allow for two or more (equally long) validation sets to be passed to the `Trainer` API which are evaluated sequentially each `eval_steps`.

## Motivation

You can find my motivation in this [thread](https://discuss.huggingface.co/t/use-trainer-api-with-two-valiation-sets/5212) and the referenced paper. My idea would be to evaluate language model pre-training on an overlapping validation set (coming from the same data distribution as the training set) and a non-overlapping validation set (sampled from future periods or another domain). Ideally, I would like to track and log the validation loss during pre-training for both validation sets.
Repository: godot
Issue: to_json() encodes Array of Vector3 as array of strings but PoolVector3Array as single string
Labels: bug,enhancement,topic:core

<!-- 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. -->
3.2.3 stable

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Ubuntu 20.04.2 LTS

**Issue description:**
<!-- What happened, and what was expected. -->
I'm using JSON to save some custom data to a file. In my saving function, I'm creating a Dictionary containing all necessary data before using the to_json() function to convert it to a JSON string. Part of my data are a few arrays of Vector3. I was using PoolVector3Array, but those get converted to a single string, like so (backslashes because I'm copying directly from the file):
`\"[(49.571899, 0, -49.146801),(-21.5655, 0, 1.20849),(26.958, 0, 61.223)]\"`
Whereas a normal Array containing the same data converts to this:
`[\"(49.571899, 0, -49.146801)\",\"(-21.5655, 0, 1.20849)\",\"(26.958, 0, 61.223)\"]`
The values in the Array can be converted back to Vector3 using `str2var("Vector3" + array_field)`, but for the PoolVector3Array the separate values cannot be accessed as it parses to a single string.

**Steps to reproduce:**
Open the attached project and run it, it will print `{"normal_array":["(0, 0, 0)","(0, 0, 0)","(0, 0, 0)"],"pool_vector3_array":"[(0, 0, 0), (0, 0, 0), (0, 0, 0)]"}` to the console.
It uses this script:
	
	extends Node
	
	
	func _ready():
		var pool_vector3_array = PoolVector3Array()
		pool_vector3_array.append(Vector3.ZERO)
		pool_vector3_array.append(Vector3.ZERO)
		pool_vector3_array.append(Vector3.ZERO)
		
		var normal_array = Array(pool_vector3_array)
		
		var dict = {
			"pool_vector3_array" : pool_vector3_array,
			"normal_array" : normal_array
		}
		
		print(to_json(dict))



**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[Arrays in json.zip](https://github.com/godotengine/godot/files/6244543/Arrays.in.json.zip)
Repository: rust
Issue: Windows - std::fs bug - specific file name causes thread to hang or false positive on file open.
Labels: O-windows,C-bug,A-io


When trying to open a file (which in this case did not exist) that starts with con. - eg: con.txt, con.toml - fs::read_to_string will hang the thread.  File::open will incorrectly succeed, and subsequently panic when methods on the file handle are called.

I tried this code:

```rust
use std::fs::File;
use std::{fs};

fn main() {
    // 1 - this will hang the app
    let _ = fs::read_to_string("con.cxv").unwrap();

    // 2 - this returns a file (but it does not exist)
    match File::open("con.txt") {
        Ok(file) => {
            println!("length {}", file.metadata().unwrap().len()) // so this will panic
        }
        Err(err) => {
            println!("{:?}", err);
        }
    }
}
```

I expected to see this happen:  File not found error returned.

Instead, this happened: Thread hang or incorrect result as per description above.

### 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.
-->
Bug exists in nightly as well as stable.

`rustc --version --verbose`:
```
rustc 1.51.0 (2fd73fabe 2021-03-23)
binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-pc-windows-msvc
release: 1.51.0
LLVM version: 11.0.1
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>
Repository: pytorch
Issue: multiprocessing function cannot pass cuda objects use when calling inside from a DDP process
Labels: oncall: distributed,triaged,module: ddp

## 🐛 Bug

I am using PyTorch-lightning to train my model with multiple GPUs. During the training, I want to run another parallel process that updates some embeddings by sending them through a part of the network and saves them into the hard disk.  This part has nothing to do with gradient updates. From my main training process, I have to pass the part of my model to the multiprocessing function. But I can't pass any  'cuda' objects. Please refer to the following code.


```
    def training_step(self, batch, batch_idx) -> Dict:

    
        global stepCount
        global isOtherThreadBusy
        global threadHandle


        if (self.trainer.global_rank==0):

                if not isOtherThreadBusy:
         
                    ctx_encoder=self.trainer.model.module.module.model.rag.ctx_encoder
                    model_copy =type(ctx_encoder)(self.config_dpr) # get a new instance  #this will be load in the CPU
                    model_copy.load_state_dict(ctx_encoder.state_dict()) # copy weights and stuff

                    threadHandle =Process(target=self.indexed_function,args=(model_copy,))
                    threadHandle.start()
                    isOtherThreadBusy = True



```


When the model_copy being attached to a cuda_device I get errors. I tried  adding     # **multiprocessing.set_start_method('spawn')**. But no luck.


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu