sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: transformers
Issue: rfc: new benchmark tool
Labels: Benchmarks,WIP

This issue is to collect notes and ideas on creating a new benchmarking tool.

This is not about the other speed/memory regression project we have been discussing elsewhere. 

This is about integration and various comparisons that we need to run in order to give users the best advice on how to deploy transformers in the most efficient way.

Please share the comments ideas/suggestions/concerns/needs, and I will compile them here. 

- important: not part of examples - the goal is performance and integration tooling and not user-facing - totally different needs and priorities
- the cmd line has to continue working the same months later - so that old benchmarks could be re-run - ok to change interface with back-compat option so that the old benchmarks can be still re-validated and compared to
- ideally work with any transformers model - a single tool to rule them all
- minimal amount of arguments - just the important ones
- ability to generate markdown table entries directly and json files that contain not just the outcome but also the key variables that are being tested - 
- the report to include critical hardware/software params as well in a compact form and allow these to be merged from multiple recordings - i.e. if the hw/sw are the same - they can be merged into a single report. will need to figure out how to record hardware nuances 
    *  e.g. the same DDP test with 2 gpus connected w/ NVLink gives dramatically different results than the same 2 gpus w/o NVLink.
    * not sure how to record CPU-capacity/ free RAM, etc., since all these impact the outcome
- crucial to be able to truncate the dataset
Repository: node
Issue: Possible node interfering with console color?
Labels: stdio

There's a whole lot of things I don't understand here, so please let me apologize in advance for this ticket as a shambles.

Initially I was trying to work with a high quality console color library, and I was confounded because I had just switched to the modern Win10 console, with its 24 bit color support, and it wasn't 24 bit coloring.  It's a big library by a big programmer, so I was surprised.

So I thought "it's just ansi codes, I'll do it myself," and tried to do it myself.  Worked them out in console printf, looked good, `node -e`, and ... and ... wha?

![image](https://user-images.githubusercontent.com/77482/106328171-33b12180-6234-11eb-94cd-953b18ac64b7.png)

The same string in the same console was working with `printf` and not with `node -e console.log`.  The latter was getting downgraded to a different color range.

Okay, `node` must just not know it's 2-- wha?

![image](https://user-images.githubusercontent.com/77482/106328388-93a7c800-6234-11eb-82b0-854c689f4e0f.png)

So I tried using the `FORCE_COLOR` flag as a leader.  No.

![image](https://user-images.githubusercontent.com/77482/106328232-4e839600-6234-11eb-92f9-dd52bc552b03.png)

So I tried using it as an envvar.  No.

![image](https://user-images.githubusercontent.com/77482/106328269-60fdcf80-6234-11eb-94cf-8bed9f24125e.png)

So I switched to `process.stdout`.  No.

![image](https://user-images.githubusercontent.com/77482/106328652-09ac2f00-6235-11eb-913d-709b059f1289.png)

And then I looked up my `TERM` setting.  `xterm-color-256`.  Initially I thought "aha!", except then I realized that's not the color you'd get from my testcase in a 6-cube.

Oh, dear.  Am I in ... am I in 4-bit color in `node`, despite having a 24-bit terminal?

Wrote this to find out

```javascript
const seq = n => new Array(n).fill(false).map( (_, i) => i );
const col = (r,g,b) => 16 + b + (g*6) + (r*36);

seq(6).map(b => {
  seq(6).map(g => {
    seq(6).map(r => process.stdout.write(`\x1b[38;5;${col(r,g,b)}m*`) );
  process.stdout.write(' '); });
process.stdout.write('\n'); });
```

Yep.

![image](https://user-images.githubusercontent.com/77482/106327775-8f2edf80-6233-11eb-961e-31793d5d14d8.png)

Gulp.

Am I missing something?  It seems like my terminal is set up for 24 bit, and `node` is manually downsampling my terminal output for me despite `FORCE_COLOR`.  It couldn't be doing that, could it?  That wouldn't make any sense.

What exists between node and the console which could be doing this?

So I thought I'd be tricky and see if some other language on the machine would get it right, yeah?

Tried `python`.  ... lol

![image](https://user-images.githubusercontent.com/77482/106329402-357be480-6236-11eb-95c2-d7f4753f517b.png)

So then, yes, there *is* something between the language and the console, which is capable of screwing ansi codes up.

How do I find what that something is for `node`, so that I can find what's misconfigured in it, please?

Thanks
Repository: angular
Issue: Public API guard should cover zone.js
Labels: help wanted,area: dev-infra,P3

The current set of public API golds does not capture zone.js. We should include this to apply the same safeguards as we do for other packages.
Repository: pytorch
Issue: Huggingface model not being torch scriptable
Labels: oncall: jit

## ❓ Questions and Help
Referring to the recommendation of trying script API for Huggingface (HF) models in [issue](https://github.com/pytorch/pytorch/issues/50971), here this has been tried and facing the issue as reported in the logs. Generally, HF models are not scriptable, there has been [feature request ](https://github.com/huggingface/transformers/issues/5067) to achieve this, some work has been started in this [PR](https://github.com/huggingface/transformers/pull/6846), however there is not much progress updated. Here is code snippet to reproduce the issue with latest transformers version. Any thoughts/suggestions is appreciated. 
```
import transformers
import torch
from transformers import (AutoModelForSequenceClassification, AutoTokenizer, AutoModelForQuestionAnswering,
 AutoModelForTokenClassification, AutoConfig)

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
config = AutoConfig.from_pretrained('roberta-base',num_labels=2,torchscript=True)
model = AutoModelForSequenceClassification.from_pretrained('roberta-base', config=config)
tokenizer = AutoTokenizer.from_pretrained('roberta-base',do_lower_case=True)
dummy_input = "This is a dummy input for torch jit script"
max_length = 20
inputs = tokenizer.encode_plus(dummy_input,max_length = int(max_length),pad_to_max_length = True, add_special_tokens = True, return_tensors = 'pt')
input_ids = inputs["input_ids"]
attention_mask = inputs["attention_mask"]
outputs = model(**inputs)
model.to(device).eval()
scripted_model = torch.jit.script(model)
```
Error logs 
[HF-scripting-error.logs.txt](https://github.com/pytorch/pytorch/files/5896492/HF-scripting-error.logs.txt)



cc @gmagogsfm
Repository: pytorch
Issue: TorchScript class compilation failure with pybind11-2.6.2
Labels: oncall: jit

## 🐛 Bug

Now that `master` seems to return to upstream [pybind11](https://github.com/pybind/pybind11), it turns out, that some of the TorchScript-enabled classes fail to be compiled during the run. I tried my best to find something similar here in issues, but failed.

## To Reproduce
The simplest way to reproduce it that I found is just importing [timm](https://github.com/rwightman/pytorch-image-models) of recent versions (0.3.4 will do). Steps to reproduce the behavior:

1. `pip install timm`
1. `import timm` in Python interpreter.
1. The output is something like that:
```bash
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ray/.local/lib/python3.8/site-packages/timm/__init__.py", line 2, in <module>
    from .models import create_model, list_models, is_model, list_modules, model_entrypoint, \
  File "/home/ray/.local/lib/python3.8/site-packages/timm/models/__init__.py", line 1, in <module>
    from .cspnet import *
  File "/home/ray/.local/lib/python3.8/site-packages/timm/models/cspnet.py", line 20, in <module>
    from .helpers import build_model_with_cfg
  File "/home/ray/.local/lib/python3.8/site-packages/timm/models/helpers.py", line 17, in <module>
    from .layers import Conv2dSame, Linear
  File "/home/ray/.local/lib/python3.8/site-packages/timm/models/layers/__init__.py", line 4, in <module>
    from .anti_aliasing import AntiAliasDownsampleLayer
  File "/home/ray/.local/lib/python3.8/site-packages/timm/models/layers/anti_aliasing.py", line 22, in <module>
    class DownsampleJIT(object):
  File "/usr/lib/python3.8/site-packages/torch/jit/_script.py", line 924, in script
    _compile_and_register_class(obj, _rcb, qualified_name)
  File "/usr/lib/python3.8/site-packages/torch/jit/_script.py", line 64, in _compile_and_register_class
    torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb)
TypeError: Object of type 'module' is not an instance of 'function'
```

With pybind11<=2.6.1 it works just fine (without any output). I guess it's somehow connected with pybind/pybind11#2701 mentioned in the release 2.6.2.

## Environment

PyTorch version: 1.7.0a0+57bffc3
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Gentoo/Linux (x86_64)
GCC version: (Gentoo 9.3.0-r2 p4) 9.3.0
Clang version: 11.0.0
CMake version: version 3.17.4

Python version: 3.8 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.4
[pip3] pytorch-sphinx-theme==0.0.24
[pip3] torch==1.7.0a0
[pip3] torchvision==0.8.0a0
[conda] Could not collect

## Additional context

Pytorch compiled using [ebuild here](https://github.com/aclex/pytorch-ebuild).


cc @gmagogsfm
Repository: terminal
Issue: Preview - Mouse cursor doesn't reappear when switching workspaces during mouse hide
Labels: Needs-Repro,Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-3

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

<!--
This bug tracker is monitored by Windows Terminal development team and other technical folks.

**Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**.
Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible.

-->

# Environment

```none
Windows build number: 10.0.19042.0
Windows Terminal version (if applicable): 1.6.10272.0

Any other software?
Hopefully none applicable, but:
* Switching between tasks in Terminal and Edge
* Lenovo Vantage and/or ELAN TrackPoint
* PowerToys
```

# Steps to reproduce

* In a WSL 2 bash terminal, begin typing
* Watch the mouse cursor disappear
* Switch workspaces without moving the mouse (Ctrl-Win-Left/Right)

# Expected behavior

Mouse cursor reappears on workspace switch

# Actual behavior

Mouse cursor remains invisible (unless you change the size in mouse settings, or find the title bar and maximize/restore the window)
Repository: pytorch
Issue: DataParallel copies the model onto GPUs sequentially
Labels: module: performance,triaged,enhancement,module: data parallel

I have 8 GPUs and can see it graphically with `watch -n 0.1 nvidia-smi`. It could save some time by doing the parallel async copy?

Same seems for distributing the batch size, but less sure

P.S. I know that DP is not recommended in favor of DDP, but for legacy code and simplicity reasons (also for easier recovery from OOMs, exceptions and easier logging), DP still remains important

cc @VitalyFedyunin @ngimel
Repository: youtube-dl
Issue: Increment Autonumber If There's An Error and Ignore Error Parameter Is Present
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.01.24.1. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.01.24.1**
- [ ] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

Hey guys,

While downloading a playlist, `autonumber` is a great way to mark files and since downloading a playlist usually takes long, I keep my computer open during nigh-time. For ensuring that the download keeps going, I give the `-i` parameter. But while using `autonumber`, if there's an error and the program simply ignores it, the number doesn't increment/decrement which leads to the issue that after I wake up, it's a little bit of a problem to rename the downloaded files' numbers with the correct values which they should've been. So, if the autonumber was incremented/decremented when there's an error and `ignore error` parameter was given, it would be great.
Repository: godot
Issue: The property input box in the tween.interpolate_property function in Visual Script opens the window to select a scene node instead of the window to select a node's property
Labels: bug,topic:editor,topic:visualscript

<!-- 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.4 beta 6


**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->

- Windows 10 Home 64-bit, Version 20H2, OS build 19042.746
- Intel® UHD Graphics 620, Version 27.20.100.9168


**Issue description:**
<!-- What happened, and what was expected. -->
The property input box in the **tween.interpolate_property** function in Visual Script opens the window to select scene node instead of the window to select a node's property, as shown in my screen recording below:

https://user-images.githubusercontent.com/1403194/106340223-d0e17980-6277-11eb-9b06-2f6658e61635.mp4

This function is meant to interpolate properties. Therefore it should accept a property as an input, not a scene node. I expect the property box to open the window to select a node's property as shown below:

![Screenshot 2021-01-29 205722](https://user-images.githubusercontent.com/1403194/106340292-0a19e980-6278-11eb-9e56-0f31c8f909a7.jpg)

Currently, to make this function work, I have to create a string node of which I had to type the name of the property manually, then constructed it into a path to be able to connect to the port as shown below:

![Screenshot 2021-01-29 205620](https://user-images.githubusercontent.com/1403194/106340450-975d3e00-6278-11eb-92c2-26039a9c43f0.jpg)


**Steps to reproduce:**

1. Open the reproduction project.
2. Go to the script.
3. Try to assign a property without a string node and a construct node.


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[Visual Script Tween.zip](https://github.com/godotengine/godot/files/5897027/Visual.Script.Tween.zip)
Repository: excalidraw
Issue: handwriting incomplete
Labels: bug

When strokeWidth is wide enough (gt 16px、20px.....) and  opacity is 0.5;  handwriting is incomplete;
![draw](https://user-images.githubusercontent.com/20507909/106351771-33d71d00-6319-11eb-8736-1485fbe832dd.png)
Repository: youtube-dl
Issue: How to get youtube downloadable url without downloading the video
Labels: question

Hi guys,
I want to extract just the downloadable url of an Youtube's video... 
The command `youtube-dl -g url` works but I want the equivalent syntax for scripting
Repository: go
Issue: x/tools/go/ssa/ssautil: enable reuse of buildssa.Analyzer.Run with different ssa.BuilderModes
Labels: NeedsInvestigation,Tools,Analysis

Hi👋  
I propose to enable change ssa.BuilderMode on buildssa Analyzer.
https://github.com/golang/tools/blob/master/go/analysis/passes/buildssa/buildssa.go

There is currently no way to change BuilderMode, and buildssa Analyzer runs with no BuilderMode.
The comment on the buildssa Analyzer says that

> // Some Analyzers may need GlobalDebug, in which case we'll have
// to set it globally, but let's wait till we need it.

With the variety of great static analysis tools being developed, I think it should be possible to change the mode so that more creative tools can be developed. (The static analysis tool I am developing, [wastedassign](https://github.com/sanposhiho/wastedassign), also requires BuilderMode change...)
Repository: pytorch
Issue: [numpy] `round` and `trunc` not supported for Integral Type while Python and NumPy supports them
Labels: triaged,module: numpy

```python
>>> import torch
>>> import numpy
>>> import math
>>> t = torch.ones(3, dtype=torch.int)
>>> numpy.trunc(t.numpy())
array([1., 1., 1.])
>>> numpy.round(t.numpy())
array([1, 1, 1], dtype=int32)
>>> math.trunc(1)
1
>>> round(1)
1
>>> torch.trunc(t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: "trunc" "_vml_cpu" not implemented for 'Int'
>>> torch.round(t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: "round" "_vml_cpu" not implemented for 'Int'
```

cc: @mruberry 

cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Additon of levenberg-marquardt optimizer in TORCH.OPTIM
Labels: module: optimizer,triaged,enhancement

## 🚀 Feature
Additon of levenberg-marquardt  algorithm  in TORCH.OPTIM

## Motivation

The Levenberg-Marquardt (LM) algorithm is a classical and standard algorithm used to solve non-linear least squares problems. Though the scipy.optimize.curve_fit provides a great implementation of it, it is serial and runs of CPU. The curve_fit from SciPy becomes very slow in case of large problems, and therefore a GPU version is needed.  

## Pitch

GPU version of scipy.optimize.curve_fit


cc @vincentqb
Repository: pytorch
Issue: C++ load model error
Labels: oncall: jit

I am having issues deserializing a torch model (not trained by me) into a C++ executable. I was just taking this pre-trained model `.pth` file and deserializing following your [minimal example](https://pytorch.org/tutorials/advanced/cpp_export.html) like..

```
#include <torch/script.h> // One-stop header.

#include <iostream>
#include <memory>
#include <string>
#include <sys/stat.h>
#include <unistd.h>

inline bool file_exists(const std::string& name){
    struct stat buffer;
    return (stat(name.c_str(), &buffer) == 0);
}

int main(int argc, const char* argv[]){
    if (argc != 2) {
        std::cerr << "usage: example-app <path-to-exported-script-module>\n";
        return -1;
    }

    if (!file_exists(argv[1])) {
        std::cerr << "file: " << argv[1] << " | does not exists!" << std::endl;
        return -1;
    }
    torch::jit::script::Module module;
    try {
        // Deserialize the ScriptModule from a file using torch::jit::load().
        module = torch::jit::load(argv[1]);
    } catch (const c10::Error& e) {
        std::cerr << "error loading the model\n";
        return -1;
    }
    std::cout << "ok\n";
}

```
The `cerr` message "error loading the model" popes out in the terminal. I was reading that there might be some issues related to the python version used to train the model and the C++ version of `libtorch`. Unfortunately, as I already said I did not train the model by myself and don't how to check the version of `pytorch` used for training in the model itself. What I've tried was to load the model in `pytorch` and this works smoothly.  These are my info:

```
libtorch  C++ (not working, does not load the model) version : 1.7.1+cpu 
pytorch (working, loads the model) version : 1.7.1

```
I would really appreciate some help, thank you in advance

cc @gmagogsfm
Repository: pytorch
Issue: Caffe2 RNN Cell Names not rectified
Labels: caffe2,triaged

## 🐛 Bug

In caffe2 the `extra_input_names` is not rectified.

## To Reproduce

Run the function [here](https://github.com/pytorch/pytorch/blob/e26fccc22b1f1fa28bceb076567d3e53c92a4c77/caffe2/python/rnn_cell.py#L177), with non-empty `extra_inputs`.

## Expected behavior

The `extra_input_names` should be rectified.

## Additional context

Most probably [L177](https://github.com/pytorch/pytorch/blob/e26fccc22b1f1fa28bceb076567d3e53c92a4c77/caffe2/python/rnn_cell.py#L177) should be replaced to `extra_input_names = _RectifyNames(extra_input_names)`
Repository: rust
Issue: Can rustc support to call llvm intrinisc API which contains type like llvm_v4i1_ty?
Labels: A-LLVM,T-compiler,C-feature-request,A-intrinsics

During the intrinsic APIs implementation in stdarch, I find some llvm intrinsic APIs may contain types like llvm_v4i1_ty (4 bits), llvm_v2i1_ty (2 bits) for which I fail to find the corresponding types in Rust. What I learned Rust's type has 8 bits at least.
I'm a beginner of Rust and I have no idea about whether rustc can support to call a llvm intrinisc API which contains type like llvm_v4i1_ty, llvm_v2i1_ty ?
Repository: neovim
Issue: fnamemodify() incorrectly expands drive-relative paths under Windows
Labels: bug,platform:windows,filesystem

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: NVIM v0.5.0-dev+1048-g69103ff0c (doesn't matter)
- `vim -u DEFAULTS` (version: 8.2.2398 or any other) behaves differently? Yes, as expected
- Operating system/version: Windows 7 x64 (any Windows OS)

### Actual behaviour

    :echo fnamemodify("D:", ":p")
 
    C:/CurrentDir/D:

    :echo fnamemodify("D:SubDir", ":p")

    C:/CurrentDir/D:SubDir

### Expected behaviour

    :echo fnamemodify("D:", ":p")

    D:/D_CurrentDir/

    :echo fnamemodify("D:SubDir", ":p")

    D:/D_CurrentDir/SubDir/