sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: [folding] Distinctly highlight corresponding `#endregion` for `#region X` comments
Labels: feature-request,editor-folding

That would apply to all supported languages. But I considered it for Python only, and so may be missing something.

In python, standing on a `#region` marker highlights all `#region` tokens in the file, as is normal for other tokens in plain source and in comments.

**Request**: Apply a different highlighting rule (perhaps "line boxes" as is applied to matching brackets/parentheses/braces) to the `#endregion` corresponding to the `#region` under the cursor, to make clear the region's boundary.
Repository: pytorch
Issue: More efficient STFT on CUDA
Labels: module: performance,feature,module: cuda,triaged

## 🚀 Feature

This is a rather difficult project, but I wanted to put down the idea anyway, maybe someone is bold enough to take it up.

`cuFFT` allows callbacks that would allow for some interesting speedups for the STFT. The callback for loading a window could handle:
* optional conversion from int to float
* padding frames that exceed the border
* multiplication with the window function

The callback for writing the result could handle:
* optional computation of magnitudes from real and imaginary part

## Motivation

The current implementation of `torch.stft` does an explicit copy of all the signal if it must be padded, and it does an explicit expansion of all the signal if a window function must be applied. This can eat up lots of memory and time.
Similarly, many use cases will start with 16-bit signals that need to be converted to float before, and are only interested in magnitudes rather than the complex results.

## Pitch

The interface of `torch.stft` would need to be adapted to allow a dtype conversion, and to specify whether to compute the complex result or only the magnitudes. When possible, the implementation would use cuFFT callbacks to perform the operations.

## Alternatives

To reduce the impact of padding, if the signals are large enough to be worth it (or the user requests it), they could be cut into three parts: the beginning that needs to be padded, the main part that doesn't, and the end that needs to be padded. The results would be written into the correct locations in a preallocated buffer.

## Additional context

Pointers to cuFFT callbacks:
* https://devblogs.nvidia.com/cuda-pro-tip-use-cufft-callbacks-custom-data-processing/
* https://stackoverflow.com/questions/39535141/why-does-cufft-performance-suffer-with-overlapping-inputs
Repository: go
Issue: x/text/number, x/text/message: number formatting order of magnitude error
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.1 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
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/leith/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/leith/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build707188231=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
-->
<pre>package main

import (
        "fmt"
        "golang.org/x/text/message"
        "golang.org/x/text/number"
)

func main() {
        p := message.NewPrinter(message.MatchLanguage("en"))
        n1 := 1.99999
        n2 := 0.99999
        n3 := 999.9999
        fmt.Println(p.Sprintf("%v", number.Decimal(n1, number.Precision(4), number.NoSeparator())))
        fmt.Println(p.Sprintf("%v", number.Decimal(n2, number.Precision(4), number.NoSeparator())))
        fmt.Println(p.Sprintf("%v", number.Decimal(n3, number.Precision(4), number.NoSeparator())))
}</pre>


### What did you expect to see?
2
1
1000

### What did you see instead?
2
0.1
100

numbers such as 0.99999 are formatted an order of magnitude too small.
Repository: pytorch
Issue: Allow tracing of models which output `None`
Labels: oncall: jit,feature,triaged

## 🚀 Feature
Allow tracing of models which output tuples with some attributes equal to `None`

## Motivation
In big complex models, the forward pass should be able to output different information, depending on whether the model is being trained or runs in inference (test) mode. In test mode (the one which usually gets traced) some training outputs can be possibly missing. For example, in RL actor-critic methods, during training I want to visualize/plot the output of the critic. However, at test time, I want to be able to perform inference as fast as possible, which requires running the forward pass only of the actor but not of the critic, and return only the actor output.

## Pitch
```python
class ActorCriticModule(torch.nn.Module):
  def __init__(self):
    self.actor = torch.nn.Sequential(...)
    self.critic = torch.nn.Sequential(...)

  def forward(self, x, test_mode: bool) -> tuple:
    if test_mode:
      critic_out  = None
    else:
      critic_out = self.critic(x)
    actor_out = self.actor(x)
    return actor_out, critic_out

module = ActorCriticModule()
torch.jit.trace(module, (torch.zeros(), True))
```

At the moment, `torch.jit.trace(module, (torch.zeros(), True))` will fail, because `critic_out` will be `None` and tracing will fail.

## Alternatives
Return tuples of different size all the time. It's too scary to image the ugliness of the resulting code, especially with large models

## Additional context
Applicable to any deeplearning scenario.

cc @suo
Repository: create-react-app
Issue: Revisit dependency pinning
Labels: issue: proposal,issue: needs investigation

Pinning all of our dependencies causes issues with the preflight check whenever a new version of a nested dependency is released. `babel-jest` is one example of this. When a new version is released and used by another dependency the preflight check fails until we update our version to match.

We should consider unpinning certain dependencies like `babel-jest` and updating the preflight check to work with carrot versions like `^24.7.1`. It currently only works with exact version numbers.
Repository: go
Issue: x/build/cmd/gopherbot: ensure that frozen issues still receive mentions
Labels: Builders,NeedsInvestigation

I believe this didn't use to be the case, but if a locked (FrozenDueToAge) issue is referenced by a commit or by another issue, it does not show up in the UI. That's fairly annoying, because it's nice to see what follow-up discussion or changes happened when investigating an old issue.

I don't really know what the solution is here. Complain to GitHub? They surely had to do this for anti-abuse reasons.

/cc @golang/osp-team
Repository: TypeScript
Issue: Multidimensional readonly arrays
Labels: Suggestion,In Discussion

# Search Terms

readonly array multi multidimensional

## Suggestion

The readonly modifier should work with multidimensional arrays.

## Use Cases

I assumed `readonly number[][]` to be multidimensional array which is readonly, but it translates to `ReadonlyArray<number[]>`, this feels like a footgun.

It is currently also not very intuitive which array is readonly: `ReadonlyArray<number>[]` or `ReadonlyArray<number[]>`, without trying it out.

## Examples

I'd expect `readonly number[][]` to be equal to `ReadonlyArray<ReadonlyArray<number>>`

Explicitely "mixed mutable" arrays could be achieved using parens:
```typescript
(readonly number[])[] == ReadonlyArray<number>[]
readonly (number[])[] == ReadonlyArray<number[]>
```

## Checklist

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: go
Issue: x/build/cmd/coordinator: bound the number of times coordinator can reschedule a failed build due to buildlet disappearing
Labels: OS-Plan9,Builders,NeedsFix

The plan9-386 builders are dying halfway through (buildlet crashing?) and restarting the build forever.

We should bound the number of retries in the coordinator so plan9's flakiness doesn't waste our resources forever.

/cc @0intro @dmitshur
Repository: go
Issue: cmd/compile: intrinsify math/bits.RotateLeft{32,64} on all architectures
Labels: Performance,help wanted,NeedsFix,compiler/runtime

https://github.com/golang/go/issues/21536#issuecomment-480003894 reminded me about this. Currently the intrinsic is only implemented on amd64, arm64, ppc64 and s390x. We should enable it everywhere. It will need tests in `tests/codegen`. Could be a good beginner compiler issue to tackle.

CLs so far:
* amd64: https://go-review.googlesource.com/c/go/+/132435
* arm64: https://go-review.googlesource.com/c/go/+/122542
* ppc64: https://go-review.googlesource.com/c/go/+/163760
* s390x: https://go-review.googlesource.com/c/go/+/133035
Repository: rust
Issue: Improved error message when forgetting to specify default type parameter
Labels: C-enhancement,A-diagnostics,T-compiler

It's kind of hard to put this scenario into words, so let me just show you a short example of what I mean:

```
struct Foo<T=u32>(T);

impl<T> Foo<T> {
    fn get(self) -> T { self.0 }
}

fn bar<T>(foo: Foo) {
    let value: T = foo.get();
}
```
gives the following error:
```
error[E0308]: mismatched types
 --> src/main.rs:9:20
  |
9 |     let value: T = foo.get();
  |                    ^^^^^^^^^ expected type parameter, found u32
  |
  = note: expected type `T`
             found type `u32`
```
This just came up on the nom gitter (in a more complex code sample) and was somewhat confusing to debug. Maybe the error message could hint about adding the generic type parameter to the argument type? I.e. suggest something along the lines of "did you mean Foo<T>" or even "... instead of Foo<T=u32>". Currently u32 just seems to appear out of nowhere.

I am, however, not quite sure how easy this would be to improve or even detect.
Repository: pytorch
Issue: [FR] torch.dist along a dimension
Labels: triaged,function request,module: reductions
Repository: pytorch
Issue: Provide option to use alias method in Categorical.sample()
Labels: module: distributions,triaged

Ref to https://github.com/pytorch/pytorch/issues/4115. The alias method provides a very efficient way to sample from a categorical distribution in cases where the underlying distribution is static with many categories, and we want to sample from it many times. Once the alias table is built, sampling takes constant time w.r.t. the number of categories.

@vishwakftw has exposed the bindings to the sampler via `torch._multinomial_alias_setup` and `torch._multinomial_alias_draw` functions. We should make this available in `torch.distributions.categorical`. Since the `torch._multinomial_alias_setup` function is restricted to 1-D probability table, we cannot use this sampler with batched (and, distinct) `probs` argument.

My proposal would be to have the `Categorical.__init__` method take in an optional keyword argument `use_alias=False`. If the `probs/logits` have the correct shape, then we can construct and store the alias table. If `probs` is batched, we can raise a warning, set `use_alias=False` and use the default sampler. We will also need to make sure that `expand` works fine even if the `probs` tensor is subsequently expanded.

cc. @vishwakftw, @fmassa, @HobbitLong
Repository: TypeScript
Issue: Convert to destructed refactoring not enabled in JavaScript?
Labels: Suggestion,In Discussion,Domain: Refactorings,Domain: JavaScript

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 3.5.0-dev.20190404

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- refactor / refactoring
- convert to destructed parameters 

**Code**
For a simple js file

```js
function doStuff(a, b, c) {
    return a + b + c;
}

doStuff('a', 'b', 1);
doStuff('x', 'y', 2);
```

**Expected behavior:**
A  convert to restructured refactoring is available on `doStuff`

**Actual behavior:**
I'm not seeing any such refactoring show up in js files

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
- #23552
Repository: vscode
Issue: Default formatter selection should write to project specific settings rather than global.
Labels: help wanted,feature-request,formatting

The new Default formatter selection feature, while handy, is unusable for it's stated usecase.

From the [updates page](https://code.visualstudio.com/updates/v1_33) "Many of our users work on different projects and often different projects use different document formatters." Right now, the quick pick will write to the user settings.json, which means every project the particular user works on will share a formatter, and to use it for the usecase of *different* projects using *different* formatters you would have to manually move it to the project local `.vscode/settings.json` directory.

It should also do this for workspace specific settings.
Repository: flutter
Issue: Space between text and underline
Labels: c: new feature,a: typography,customer: crowd,P2,team-engine,triaged-engine

Internal: b/165577829

I'm using Text.rich with underlined option to make underlined text. It works, but it's possible to add space between the word and underline line? Or make the line more bolder ?
Repository: go
Issue: cmd/go: go test ./... gives duplicate reports when no source files availabe
Labels: NeedsInvestigation,GoCommand

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
% go version
go version devel +964fe4b80f Thu Apr 4 00:26:24 2019 +0000 darwin/amd64

</pre>

### Does this issue reproduce with the latest release?

yes

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

```
% mkdir ~/devel/test && cd ~/devel/test
% go mod init github.com/davecheney/test
% go test ./...
```

### What did you expect to see?

```
no packages to test
```
*or*
```
"./..." matched no packages
```
*or*

no output

### What did you see instead?

```
% go test ./...
go: warning: "./..." matched no packages
no packages to test
```

Note the duplicate warning and error message.
Repository: pytorch
Issue: [c10d] CUDA tests for C++ reducer
Labels: oncall: distributed,triaged

This requires a split between multi process tests and single process tests for the c10d tests. We cannot use CUDA in the main process, or it will interfere with the multi process tests (that use multiprocessing and the fork spawn method).

There might be an out where we mix and match by using a different start method, but this is not supported equally well across Python versions and/or platforms (from what I remember there are Python 3 specific changes to multiprocessing start methods).
Repository: pytorch
Issue: Completion of error handling
Labels: module: internals,low priority,module: error checking,triaged

Would you like to [add more error handling](https://github.com/pytorch/pytorch/blob/792cb774f152bab5b968f4ec51da0fc21ff9e895/aten/src/THC/THCGeneral.cpp#L57 "Update candidate: THCudaInit()") for return values from [functions like “calloc”](https://pubs.opengroup.org/onlinepubs/9699919799/functions/calloc.html "Memory allocation")?
Repository: godot
Issue: Loader `ResourceFormatLoaderDynamicFont` actually loads type `DynamicFontData`
Labels: enhancement,discussion,topic:core

**Godot version:**
3.1.stable.official

**OS/device including version:**
All

**Issue description:**

Loader `ResourceFormatLoaderDynamicFont` actually loads type `DynamicFontData`.

This seems like either a naming, documentation or API issue (thus related to #24255):

 * One "fix" option is to rename `ResourceFormatLoaderDynamicFont` to `ResourceFormatLoaderDynamicFontData`.

 * But from my perspective, for a "more useful" API it would be better to change `ResourceFormatLoaderDynamicFont` to actually create a `DynamicFont` instance with a default size using the DynamicFontData loaded from the supplied font path.

   However I realise this may conflict with the existing API/implementation.

   Currently, the most compact correct way to use a `.ttf` file directly via code seems to be:
   ```
   var dynamic_font = DynamicFont.new()
   dynamic_font.font_data = load("res://fonts/barlow/BarlowCondensed-Bold.ttf")
   dynamic_font.size = 64
   $"CenterContainer/Label".set("custom_fonts/font", dynamic_font)
   ```

**Steps to reproduce:**

Example code snippet (assuming the label and `.ttf` font file exist):

```
$"CenterContainer/Label".set("custom_fonts/font", load("res://fonts/barlow/BarlowCondensed-Bold.ttf"))
```

Which results in this error:

```
E 0:00:01:0013   Condition ' p_font.is_null() ' is true.
  <C Source>     scene/gui/control.cpp:1837 @ add_font_override()
  <Stack Trace>  Root.gd:83 @ _ready()
```

The related code for the resource loading is here, where it can be seen that the resource loader name and type name are not equivalent:

https://github.com/godotengine/godot/blob/a18989602b00f2940befa0b780af14efc7603dd8/scene/resources/dynamic_font.cpp#L1114-L1146
Repository: pytorch
Issue: Caffe2 on google colab: 
Labels: caffe2

Dear caffe2 / pytorch afficionados,

I would much appreciate any help on the problem listed below!

I have to add that the script I am providing that can reproduce the error was the result of me trying to get densepose (using caffe2) to work for quite some time in a trial and error style -- because I am very much a greenhorn with python / shell scripting etc. It finally worked, but all of a sudden it stopped to work (some time between the 23rd of March and the 2nd of April).
So if you think that the way I set up densepose in this script intended to be run on google colab is overly complicated and have ideas how to simplify it, that would be very much appreciated as well :) !

I have also found this notebook 
https://github.com/Dene33/Detectron/blob/master/notebooks/detectron(google_colab).ipynb
which is supposed to set up caffe2 on google colab, however, it fails when I try it.

So, here's my bug:

## 🐛 Bug

When I install caffe2 on a colab instance, I get the following error in response to these commands:

!python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
!python2 -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"

WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
/bin/bash: line 1:  1612 Segmentation fault      (core dumped) python2 -c 'from caffe2.python import core' 2> /dev/null
Failure

The very same code used to work, the last time that it ran successfully was on the 23rd of March 2019. 
The runtime has GPU enabled. 

## To Reproduce

You can run my code in a colab instance:
https://github.com/cdaube/dance/blob/master/setUpDensePose.ipynb

## Expected behavior

I expected this line:
!python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'
to not report the missing GPU support,

and I expected this line
!python2 -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
to echo "Success"

Many many thanks,
Christoph
Repository: flutter
Issue: Allow multiline text in AppBar
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

It seems that AppBar does not allow a flexible AppBarHeight depending on its title's content.

In the material guidelines, an AppBar with multiline text is shown as a possible AppBar variant, yet it doesn't seem like Flutter supports this use case. A [question on StackOverflow](https://stackoverflow.com/questions/50764558/expand-the-app-bar-in-flutter-to-allow-multi-line-title) has been asked about this, workarounds are suggested, but each one has drawbacks and uses widgets not really meant for this use case.
Repository: tensorflow
Issue: Unexpected UnicodeDecodeError: invalid continuation byte when reading lines from a file
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.11

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04.5 LTS
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): 1.13.1
- Python version: 3.5.2
- Bazel version (if compiling from source): n/a
- GCC/Compiler version (if compiling from source): n/a
- CUDA/cuDNN version: n/a
- GPU model and memory: n/a

**Describe the current behavior**
Unexpected and undocumented runtime exception/error when handling malformed data.

**Describe the expected behavior**
Expected a "TypeError" or an empty list as a result.

**Code to reproduce the issue**
```
import csv
import sys
import tensorflow as tf

input_file_name = sys.argv[1]

with tf.gfile.Open(input_file_name, "r") as f:
  reader = csv.reader(f, delimiter="\t", quotechar=None)
  for line in reader:
    print(line)
```
Run with the path to the attached file as a command line argument.

**Other info / logs**

Traceback (most recent call last):
  File "tensorflow_bug.py", line 9, in <module>
    for line in reader:
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 220, in \_\_next\_\_
    return self.next()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 214, in next
    retval = self.readline()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 184, in readline
    return self._prepare_value(self._read_buf.ReadLineAsString())
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 100, in _prepare_value
    return compat.as_str_any(val)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 107, in as_str_any
    return as_str(value)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 80, in as_text
    return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte

[corrupted_file1.zip](https://github.com/tensorflow/tensorflow/files/3047460/corrupted_file1.zip)