sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: update protobuf version
Labels: category: build/install,category: 3rdparty

current used version is v3.5.2, while the latest upstream version is 3.15.8
Repository: pytorch
Issue: The multi-fc losses calculating in DistributedDataParallel.
Labels: oncall: distributed,triaged

The labels of classes are in 0~9. In a batch, some labels are 255, so we need to ignore the loss of these labels.

I calculate the loss in two ways:

Way1: 

      y_pred = y_pred[y_true!=ignore_index].view(-1, si)
      y_true = y_true[y_true!=ignore_index].view(-1, si)
      loss_sum = ........
      if loss_sum.size(0) == 0:
          loss_sum = loss_sum + 0
          bs = torch.Tensor([0])
      else:
          bs = torch.Tensor([y_true.size(0)])
          loss_sum = torch.**sum**(loss_sum)
      return loss_sum, bs

      loss = None
      ....
      In each fc:
          bs = **reduce_tensor_sum**(bs) #sum all gpus
          loss_sum = **reduce_tensor_sum**(loss_sum) #sum all gpus
          if len(loss_sum.shape) != 0: loss_sum = torch.Tensor([0]).cuda(gpu, non_blocking=True)
          if bs != 0:
              loss_sum = loss_sum / bs
              loss = loss + loss_sum
       return loss

Way2:

        y_pred = y_pred[y_true!=ignore_index].view(-1, si)
        y_true = y_true[y_true!=ignore_index].view(-1, si)
        loss_sum = ........
        if loss_sum.size(0) == 0:
            loss_avg = loss_sum + 0
        else:
            loss_avg = torch.**mean**(loss_sum)
        return loss_avg

        loss = None
        ....
        In each fc:
            ............
            if loss is None:
                loss = loss_m
            else:
                loss = loss + loss_m
        
        loss = reduce_tensor_mean(loss)


The way1 should be right, but the acc of way1 is always lower than way2 in four experiments.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: rust
Issue: Moving aarch64-unknown-netbsd to Tier 2
Labels: C-feature-request

AArch64 NetBSD (Tier 3) is fast approaching x86_64 NetBSD (Tier 2) in popularity among NetBSD users.

Is there any way we (speaking on behalf of the NetBSD project) can help in moving it to Tier 2? It may be possible to provide access to an AArch64 server for automated builds and testing, for example.
Repository: realworld
Issue: Make it possible to click tags from article view and global/favorite feed index
Labels: v2

Currently on https://github.com/gothinkster/react-redux-realworld-example-app/tree/9186292054dc37567e707602a15a0884d6bdae35 and https://github.com/gothinkster/angular-realworld-example-app/tree/9e8c49514ee874e5e0bbfe53ffdba7d2fd0af36f the only place where you can click to view articles under a given tag is from Popular Tags on the home page.

Tags also show on the following other places:

- from the global/favorite index (`/#/`) on a given article: clicking it opens the article, not the tag
- when viewing the article itself (`/#/article/test-l9ah7`). Clicking it does nothing.

Both of those above would be better if they actually opened the list of posts with the tag, otherwise it's quite unintuitive, and I start to wonder if the frontend is broken and have to compare with others :-) 

Two off-topic things come to mind:

- automated frontend testing setup in this repo is a must: https://github.com/gothinkster/realworld/issues/269
- it would be better to have corresponding URLs for tags and for global feed, those currently just have the same root url as the global feed
Repository: realworld
Issue: Give a clear 404 on all URLs that don't exist, currently they silently redirect to the home page
Labels: Status: RFC,v2 changelog

E.g.:

- for agular  currently they silently redirect to the home page: https://demo.realworld.io/#/editor/ is the editor, but if I hack it: https://demo.realworld.io/#/editorasdfqwer/ it just immediately redirects to: https://demo.realworld.io/#/ It would be better to have a clear 404 this page does not exist error instead
- for https://github.com/gothinkster/react-redux-realworld-example-app at 9186292054dc37567e707602a15a0884d6bdae35 , http://localhost:4101/editorasdf just gives a blank page without redirects. I'm glad react doesn't use the terrible `/#/` thing however!

I often type stuff wrong on the address bar, or I delete my dev database and articles are gone, and I'm left wondering what's up :-)
Repository: pytorch
Issue: Support `expand_dims`
Labels: triaged,module: numpy,function request,module: python array api

## 🚀 Feature
Support `torch.expand_dims`.
(cc: @mruberry, @rgommers, @emcastillo and @kmaehashi)

## Motivation and Pitch

To enhance the compatibility with NumPy’s interface (c.f. https://github.com/pytorch/pytorch/issues/38349).

Currently PyTorch supports the same functionality with a different function name: `torch.unsqueeze`, but I would like to support an alias to improve compatibility with NumPy and  Python array API standard (#54581).

## References

* [NumPy numpy.expand_dims](https://numpy.org/doc/stable/reference/generated/numpy.expand_dims.html)
* [Python Data API expand_dims(x, axis,  /)](https://data-apis.org/array-api/latest/API_specification/manipulation_functions.html#expand-dims-x-axis)


cc @mruberry @rgommers @heitorschueroff @pmeier
Repository: TypeScript
Issue: noUnusedParameters incorrectly triggers with @interface JSDoc in JS files
Labels: Suggestion,Awaiting More Feedback

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->
noUnusedParameters @interface

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly


### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?noUnusedParameters=true&jsx=0&useJavaScript=true#code/PQKhAIAEEsDsBcCmAnAZgQwMaPCYAoTAG3QGdTwAxAe2oEkEUNtwBvfccUCSAB3WToAtm1LxkcAOYBfcNAAmuAp3nUAytSGJ4ACykAKBQEo20-NKA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
/** @interface */
class FooInterface {
  /** @param {string} id */
  doSomething(id) {}
}
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
Throws the following error
```
'id' is declared but its value is never read.
```

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
There  should be no error thrown, as this is the correct (and only?) way to declare interfaces with JSDoc in JavaScript files (and also with Closure Compiler)
Repository: vscode
Issue: Consider using focus-within for showing actions in scm
Labels: ux,scm,under-discussion

I just mostly copied the behavior of actions showing up with keyboard focus in terminal tabs, however one change I made was to use `:focus-within` for the _non-hover_ styles to avoid showing the actions unless keyboard focus is there. I think this would be a nice change for SCM as well.

<img width="219" alt="Screen Shot 2021-04-23 at 5 26 17 AM" src="https://user-images.githubusercontent.com/2193314/115870783-97428980-a3f4-11eb-8653-44b7ad863634.png">

See https://github.com/microsoft/vscode/commit/cfb866ac5337405606caa401c123ecc85ca7ebb5
Repository: pytorch
Issue: can't find user's fuser method in quantization.fx.fusion_patterns.py when run fx graph qat.
Labels: triaged,module: fx

when run qat by fx graph method, i used some custom fusion methods like this:
 
![image](https://user-images.githubusercontent.com/17848425/115883377-4b3d2680-a480-11eb-9e1d-76b8ee81ab14.png)

horizon_fuser_method_mapping = {
    (nn.MaxPool2d, nn.ReLU): horizon_nni.PoolingReLU2d,
}

but i get error like this:
![image](https://user-images.githubusercontent.com/17848425/115882341-40ce5d00-a47f-11eb-9f68-5d163e6089f1.png)
i guess that the "fuse_custom_config_dict" is forget to pass in, in quantization.fx.fuse.py, line 58? like this??:
![image](https://user-images.githubusercontent.com/17848425/115882833-bb977800-a47f-11eb-9f30-79072d22d575.png)
 when i modified the code like above, i got the correct result.


cc @ezyang @SherlockNoMad
Repository: pytorch
Issue: Named Tensors in C++ Is Undocumented
Labels: module: cpp,triaged,module: named tensor

## 📚 Documentation

The C++ API is currently lacking any documentation of the named tensor API, I'm planning to use named tensors in a C++ extension, the tensors are created in C++ and then passed to Python. As far as I could figure out this is quite difficult to do with the current API:

```
torch::DimnameList dimnames{torch::Dimname::fromSymbol(torch::Symbol::dimname("channels")), torch::Dimname::fromSymbol(torch::Symbol::dimname("dimensions"))};
auto dimensions = torch::empty({srcinfo.num_components, 2}, dimnames, torch::kInt);
```

but for all I know there is a much nicer API to construct the `Dimnamelist` and I wasn't able to find it since I had to dig through the code to get even this to work.

So it would be great if the documentation was updated on the proper way to use named tensors from C++ and if this is the only API the currently exists for it, it should be simplified. 

CC @zou3519 who seems to have done the most recent work on this, although because of a [rename](https://github.com/pytorch/pytorch/pull/25280) it's hard to tell who actually authored the API


cc @yf225 @glaringlee @zou3519
Repository: go
Issue: crypto: provide guidance on how to interchange keys
Labels: Documentation,NeedsDecision

Here's a blog post from Tim Bray describing his experience trying to do something that should be fairly simple: interchange an Ed25519 public key between a Go and a Java app.

https://www.tbray.org/ongoing/When/202x/2021/04/19/PKI-Detective

This ended up being quite a struggle, and on the Go side he ended up basically implementing his own versions of `x509.MarshalPKIXPublicKey` and `x509.ParsePKIXPublicKey`.

The Godocs for crypto/ed25519, crypto/rsa, and crypto/ecdsa don't provide any guidance for this, and it's not very intuitive that you have to look in crypto/x509 for functions to marshal and unmarshal keys.  Perhaps the Godocs should mention the functions in crypto/x509?
Repository: godot
Issue: Camera2d smoothing sprite position jittering
Labels: topic:rendering,topic:2d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version: 3.3**
<!-- Specify commit hash if using non-official build. -->


**OS/device including version: Windows 10 20H2**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
When the camera2d with the smoothing option enabled is the child of player, the player sprite jitters despite I enabled pixel snap.
This bug occurs in both 2d and viewport rendering mode
<!-- What happened, and what was expected. -->
![Animation](https://user-images.githubusercontent.com/43544435/115889871-a35e3380-a454-11eb-9b7c-a0987c50747a.gif)

The player sprite should be perfectly aligned with the wall


**Steps to reproduce:**

1. Use pixel sprites
2. Add camera2d as child to player
3. Enable smoothing
4. Collide the player with wall and observe


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[Nowy projekt gry2.zip](https://github.com/godotengine/godot/files/6366281/Nowy.projekt.gry2.zip)
Repository: godot
Issue: Preloading Not Working in a VERY Odd Way which Leaves Stuff Loaded Between Executions...?!
Labels: bug,topic:core

**Godot version:**
3.3.stable.official


**OS/device including version:**
Windows 10 Pro 2004 - Build 19041.423


**Issue description:**
So I tried loading up my project in the latest stable build of Godot and while most everything is functionally working fine, preloading of assets seems... broken in a way that's extremely difficult to describe... I'm going to try my best though.

So, what's happening at first after loading a project and running it is that NOTHING is preloading. When the game first starts up, every single thing which appears on screen causes a huge delay of several frames to load in, including environment effects like the sun, suggesting this might be shader related,

HOWEVER, when you stop running the project, go back to the editor, then run the project again, certain things will STILL be loaded, even things which are NOT being preloaded, and thus they won't trigger those same delays, however, it seems to be entirely random what stays loaded and what doesn't, with more things persisting with each run until you ultimately get to the point where every time you run your game, everything is already loaded into memory, regardless of whatever is being preloaded or not.

If you quit the editor to the project list and go back in, stuff stays loaded. ONLY if you quit the editor ENTIRELY will everything get unloaded, leading to those massive delays again the next time you load the editor.

Suffice to say, this is making it impossible to know what's preloading properly or not, plus is completely disrupting the ability to have a stable framerate when starting a game; the loading delays are several frames long, longer than I remember them being without preloading back in 3.2.

For reference, I'm using GLES3. No idea if this is happening on GLES2. I also tested to see if the nVidia "Shader Cache" feature was to blame but no, turning that off had no effect on this issue. I have an 8-Core AMD FX-8350 4 GHz CPU, a GTX 1070 video card, and 16 GB of RAM, so I doubt my specs are the issue either.


**Steps to reproduce:**
1. Load ANY project which has enough content to warrant preloading.
2. Run the project and experience all the delays from things loading only when they come on screen.
3. Quit back into the editor.
4. Run the project again and notice that some things but not everything is causing delays.
5. Repeat 3 and 4 until you notice no delays anymore.
6. Quit the editor entirely and the state of everything should go back to step 1.


**Minimal reproduction project:**
So far on my end this happens with literally ANY project which needs to preload numerous assets and will be far more noticeable with large projects as opposed to small projects for that reason.
Repository: godot
Issue: TouchScreen working wrong way inside a ScrollContainer
Labels: topic:gui


**Godot version:**
3.3


**OS/device including version:**
Windows 10 64 bits/Android/iOS


**Issue description:**
If you touch a TouchsScreenButton outside of a ScrollContainer it get touched, with normal buttons this behaviour doesn´t happen.


**Steps to reproduce:**
Download the project and touch/click the screen below the last TouchScrennButton visible, the TouchScreenButton below that is not visible will be pressed.

**Minimal reproduction project:**
https://drive.google.com/drive/folders/1n6g-pTMQqbZcDyp3B_Hw_GKTlLpEcRzt?usp=sharing
Repository: flutter
Issue: Cupertino ContextMenu improved onTap support
Labels: c: new feature,framework,f: cupertino,f: gestures,c: proposal,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

Many of the native iOS apps that support the `CupertinoContextMenu` use it on items that already have an existing `onTap` implementation.

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->


Currently, `CupertinoContextMenu` can trigger while also triggering `onTap` of the child element (depending on the exact duration of the tap) so it'd be nice to rework this such that a single `GestureDetector` is controlling both.
Repository: pytorch
Issue: No tensor operations allowed inside at::parallel_for
Labels: high priority,triaged,module: multithreading

Since at::parallel doesn't preserve TLS state to worker thread, we actually don't support tensor operations inside at::parallel. Only direct working on data_ptr is allowed. But we have a few cases e.g https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/ConvolutionMM2d.cpp#L273 (and ConvolutionMM3d.cpp) using tensor operations and hacked around the TLS issue by setting TLS inside worker thread. This is not ideal as we have more TLS (InferenceMode/RecordFunction) and not preserving those TLS state lead to unexpected diverged behavior between parent & worker threads. 
We agreed on getting rid of tensor operations inside these kernels as a solution. 
There's also followup discussion going on about how to prevent developers from accidentally using tensor operations inside at::parallel block, we'll open another issue for it. 

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411
Repository: godot
Issue: Visual Scripting Set Animation Field opens to Create Object
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. -->
3.3

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Ubuntu 20.10/Atermiter dual Xeon motherboard, gtx 970 nvidia package 460

**Issue description:**
<!-- What happened, and what was expected. -->
When I click on the value field of a set animation node a create object window opens. I was expecting to be able to type in an animation name. 

**Steps to reproduce:**
Add a set animation node to a project, click on the field, attempt to type in an animation name  
[Set_Anim_Bug.zip](https://github.com/godotengine/godot/files/6367393/Set_Anim_Bug.zip)
.

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: pytorch
Issue: Implement random SeedSequence
Labels: triaged,module: random

## 🚀 Feature
Add a SeedSequence in `torch.random` module to generate higher quality seeds.

## Motivation

When users implement their own Dataset, they may utilize any 3rd party library for random operation. In order to provide reproducibility for these operations, we need to provide a way to set seed for each library. For single-processing, users can set seed before DataLoader starts running. For multiprocessing, users can use `worker_init_fn` to set different seed within each worker to prevent same result across worker.

In most cases, users set same seed for different library (for convenient?). But, there are two problems:
- If two 3rd party library share same random state algorithm like MT19937, same seed leads to same state sequence. (This can be debatable if it's a good or bad behavior)
- Thanks to @rkern, we notice the 32-bit seed is also [problematic](https://www.pcg-random.org/posts/cpp-seeding-surprises.html). So, higher-quality seed is required for the library like NumPy.

To make random things more random, it's better to provide users a way to generate different seeds for different library within PyTorch. And, it can provide higher quality seed

## Pitch

```py
ss = torch.random.SeedSequence([worker_id, base_seed])

ss1, ss2 = ss.spawn(2)
random.seed(ss1.generate_state(1)[0])
nump.random.seed(ss2.generate_state(4))
```

## Reference

https://www.pcg-random.org/posts/developing-a-seed_seq-alternative.html
https://gist.github.com/imneme/540829265469e673d045
https://github.com/numpy/numpy/blob/main/numpy/random/bit_generator.pyx


cc @pbelevich
Repository: pytorch
Issue: Autograd engine worker thread initialization fails with python 3.9 debug build
Labels: triaged

Repro:
```bash
$ python
Python 3.9.0+ (heads/3.9:c53c3f4000, Nov 18 2020, 12:25:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>> import torch
>> torch.rand(2, requires_grad=True).sum().backward()

python: Python/ceval.c:135: is_tstate_valid: Assertion `!_PyMem_IsPtrFreed(tstate->interp)' failed.
Aborted (core dumped)
```

The stack trace on the failing thread is:
```
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7c68859 in __GI_abort () at abort.c:79
#2  0x00007ffff7c68729 in __assert_fail_base (fmt=0x7ffff7dfe588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x555555864f00 "!_PyMem_IsPtrFreed(tstate->interp)", file=0x5555558648e3 "Python/ceval.c", line=135, 
    function=<optimized out>) at assert.c:92
#3  0x00007ffff7c79f36 in __GI___assert_fail (assertion=assertion@entry=0x555555864f00 "!_PyMem_IsPtrFreed(tstate->interp)", 
    file=file@entry=0x5555558648e3 "Python/ceval.c", line=line@entry=135, 
    function=function@entry=0x555555866760 <__PRETTY_FUNCTION__.16391> "is_tstate_valid") at assert.c:101
#4  0x0000555555679fdc in is_tstate_valid (tstate=tstate@entry=0x7ffe94000b70) at ./Include/internal/pycore_pymem.h:49
#5  0x000055555567eaa1 in take_gil (tstate=tstate@entry=0x7ffe94000b70) at Python/ceval_gil.h:227
#6  0x000055555567f053 in PyEval_AcquireThread (tstate=0x7ffe94000b70) at Python/ceval.c:385
#7  0x00007ffff5d93684 in pybind11::gil_scoped_acquire::gil_scoped_acquire() ()
   from /home/alban/local/pytorch/3.9_debug_source/torch/lib/libtorch_python.so
#8  0x00007ffff5f5dd8a in torch::autograd::python::PythonEngine::thread_init(int, std::shared_ptr<torch::autograd::ReadyQueue> const&, bool) () from /home/alban/local/pytorch/3.9_debug_source/torch/lib/libtorch_python.so
#9  0x00007fffedb95d84 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007ffff7f98609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007ffff7d65103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411