sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Backward for sparse tensor item select does not work
Labels: module: sparse,module: autograd,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

Computing a backward of sparse tensor item selection fails.

## To Reproduce

Steps to reproduce the behavior:

```
>>> a = torch.sparse_coo_tensor([[0]], [1.0], (1,), requires_grad=True)
>>> a[0]
tensor(1., grad_fn=<SelectBackward>)
>>> a[0].backward()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pearu/git/Quansight/pytorch/torch/tensor.py", line 221, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/pearu/git/Quansight/pytorch/torch/autograd/__init__.py", line 130, in backward
    Variable._execution_engine.run_backward(
RuntimeError: Function SelectBackward returned an invalid gradient at index 0 - expected type TensorOptions(dtype=float, device=cpu, layout=Sparse, requires_grad=false (default), pinned_memory=false (default), memory_format=(nullopt)) but got TensorOptions(dtype=float, device=cpu, layout=Strided, requires_grad=false (default), pinned_memory=false (default), memory_format=(nullopt))

```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

Backward for a strided tensor item selection works:
```
>>> a = torch.tensor([1.], requires_grad=True)
>>> a[0].backward()
>>> a.grad
tensor([1.])
```

Hence, for a sparse tensor, this should happen:
```
>>> a = torch.sparse_coo_tensor([[0]], [1.0], (1,), requires_grad=True)
>>> a[0].backward()
>>> a.grad
tensor(indices=tensor([[0]]),
       values=tensor([1.]),
       size=(1,), nnz=1, layout=torch.sparse_coo)
```

## Environment

 - PyTorch Version: 1.7.0 (current master)



cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @vincentqb @aocsa
Repository: go
Issue: spec: surprising rules for inheriting methods when declaring named types
Labels: NeedsInvestigation,Analysis

First, a piece of code that's minimized from a real bug we hit at work. What do you think this code does? https://play.golang.org/p/-FkcWvJzLZS

`json.Unmarshal` on `Embedding` uses the method we declared directly on that named type, which just does nothing, so we end up with a nil error. All as expected so far.

It gets trickier with the equivalent unmarshaling with `type NewNamed Embedding`. We get a nil pointer dereference panic, but that's not really important; what matters is that, as one can see in the panic stack trace, we call `math/big.(*Int).UnmarshalJSON`.

`type Embedding` is overriding the promoted `UnmarshalJSON`, so it's troublesome that one can sidestep that entirely by simply doing `type T Embedding`.

The other part about this behavior that surprises me is that, if we have a non-interface named type `Bar`, there's no way to tell if `type Foo Bar` will result in `Foo` having an empty method set or not. I always thought that the only way to define a type which inherited methods was via either `type T SomeInterface` or `type T struct { Bar }`. The following playground link further shows this inconsistency: https://play.golang.org/p/5uV8obYY8aR

The spec says:

>  A defined type may have methods associated with it. It does not inherit any methods bound to the given type, but the method set of an interface type or of elements of a composite type remains unchanged

From that text, I understand that `of an interface type` means our `type T SomeInterface` example above, and `of a composite type` means `type T struct { Bar }`.

I'm not sure whether to call this a spec bug or a request that it be clarified, but at the very least I find the behavior very unexpected, to the point that it can cause real bugs like the one I first showed in the issue. So I lean towards thinking that this is something we should fix in the implementation, not just clarifying the spec, because it feels like an unnecessary footgun.

I should note that I've checked both `encoding/json` and `reflect` for bugs, but haven't found any; they seem to both follow what the compiler does.

cc @griesemer @ianlancetaylor
Repository: godot
Issue: View Z-Far distance above 5000 causes SSAO banding in GLES3
Labels: bug,topic:rendering,confirmed,topic:3d

Godot Version 3.2.2 Stable
Windows 10 Pro, AMD Ryzen, RTX 2070


Description:
When you increase the view distance of the main viewport (view z-far distance setting) beyond about 5000, objects close-up appear to have lines all over them in a weird pattern, see image attachment for example. This is an issue in every project I've tested so far.


![editor_screenshot_2020-09-28T135700-0800](https://user-images.githubusercontent.com/70781564/94485930-86e66b00-0193-11eb-81b0-91a3d5dda6c0.png)
Repository: pytorch
Issue: torchscript model size increases when loading and saving it again
Labels: oncall: jit

## 🐛 Bug

For the same jit model file, if I load and save it again, the size increases from 1.8 MB to 3.1 MB. 

## To Reproduce

Steps to reproduce the behavior:

1. Please note that the model link provided below is an internal link
`cp /mnt/vol/gfsai-oregon/aml/mobile-vision/body_tracking/ts_f179073222_300_10_3_opt_09162020/detectandtrack.jit ~/models/.
` 
2. Python
```
m = torch.jit.load("/Users/myuan/models/detectandtrack.jit")
m.save("/Users/myuan/models/detectandtrack_save_again.jit")

```

## Expected behavior

detectandtrack_save_again.jit is 3 MB in size, which is larger than the original detectandtrack.jit.

## Environment



 - PyTorch Version (1.6):
 - OS (Mac, CentOS):
 - How you installed PyTorch (Install, internal build):
 - Build command you used (if compiling from source):
 - Python version: 3.7
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information:
The data folder in detectandtrack_save_again.jit is larger (from 1.7 MB to 3.8 MB) with more items (from 243 to 296 files).

## Additional context
The model was generated with this script which takes in a trained model, runs optimize_for_mobile and saves the mobile model: https://www.internalfb.com/intern/diffusion/FBS/browse/master/fbcode/mobile-vision/projects/detectron2go/tools/generate_tracker.py?commit=1b05890d965b84d9390bcd55dfbd625073537392&lines=83-104
The model generation can be reproduced with the test plan in: D23739593


cc @gmagogsfm
Repository: godot
Issue: Raycast debug gizmo casts shadows in editor
Labels: bug,topic:rendering

**Godot version:**
3.2.3.stable


**OS/device including version:**
Windows 10 Pro 2004/19041.508. AMD RX 5700, Radeon version 20.7.2. Using GLES3.


**Issue description:**
Was testing something unrelated and noticed that in Play mode a Raycast child of the player node was casting a shadow on my test level. Could not find a combination of settings that corrects it. Issue disappears in a compiled game.


**Steps to reproduce:**
Put a Raycast between a surface that receives shadows and a light source, enable Debug > View Collision Shapes, and enter Play mode.


**Minimal reproduction project:**
[raycast-editorshadow.zip](https://github.com/godotengine/godot/files/5295374/raycast-editorshadow.zip)
Repository: node
Issue: fs.realpathSync('') returns CWD
Labels: fs

```
$ node -v
v12.18.4
```
### What steps will reproduce the bug?
```
$ cd /tmp
$ node -e "console.log(fs.realpathSync(''))"
/tmp
```
### What is the expected behavior?

```
$ node -e "fs.realpath.native('', (e) => void console.log(e))"
[Error: ENOENT: no such file or directory, realpath ''] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'realpath',
  path: ''
}
```
Repository: flutter
Issue: flutter devices reporting physical device is busy
Labels: platform-ios,tool,customer: crowd,e: OS-version specific,P2,team-ios,triaged-ios

## Steps to Reproduce

1.  Connect a physical iPhone device to laptop
2.  run `flutter devices`

## Logs

```
1 connected device:

Anthony's iPhone X (mobile) • ddXXXXXXXXXX...XXXXXX4 • ios • iOS 14.0

• Error: Anthony's iPhone X is busy: Copying cache files from device. Xcode will continue when Anthony's iPhone X is finished. (code -10)
```

I think I have been plenty patient (~1 hour), but the _busy_ state is persistent.  Disconnected and reconnected, but same symptom.

<!-- If possible, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-US)
    • Flutter version 1.20.4 at /Users/anthony/flutter
    • Framework revision fba99f6cf9 (2 weeks ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/anthony/Library/Android/sdk
    • Platform android-R, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

 
[✓] Connected device (1 available)            
    • Anthony's iPhone X (mobile) • dd65390247333fb75a3729579a8410e5c02268d4 • ios • iOS 14.0

• No issues found!
```
Repository: flutter
Issue: Add a way to record video 
Labels: c: new feature,platform-android,engine,c: proposal,P3,team-android,triaged-android

<!-- 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

Flutter has no way to record video of the Flutter App.

### Using repaintBoundary
This method has 2 major drawbacks:
1. It draws blank white boxes on PlatformViews and WebViews
2. Bitmaps need to be sent back to the Native platform for encoding into mp4. (Using OpenGL)

### Using platform channel

Flutter exposes the [getBitmap](https://github.com/flutter/engine/blob/master/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java#L963
) API but this has 2 major drawbacks

1. It must run on UIThread so the FlutterApp is blocked, so the video is recording a blocked UI
2. This method is very slow. Sometimes up to 100 ms depending on the screen content.


### Recording the entire screen?
Using MediaRecorder that's possible but we want to:
1. Record the app only, not the entire screen
2. Recording the entire screen requires special permission from user


### Drawing a canvas from FlutterView? 
This draws black screen because FlutterView is a SurfaceView and bitmap cannot be obtained as it was drawn on the different thread.

### Use PixelCopy? 
1. This API is only availabe on >= API 24

<!--
     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?
-->


And this feature has been requested several times https://github.com/flutter/flutter/issues/34632 #34226
## Proposal

Expose an API to record Bitmaps continuously in the background **not** on the Main UI thread . (Or a video recording API but that's too much to ask)

<!--
     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.
-->
Keywords: getBitmap, screenshot, bitmap, uithread, background, record, recording, screen shot, main thread, flutterview, surfaceview, video, mp4, mediarecorder, opengl, mediamuxer, mediaencoder
Repository: PowerToys
Issue: [Run] Multi monitor: calling the application to the current display
Labels: Idea-Enhancement,Product-PowerToys Run

Having many displays, it happens that one of them is not at the main workplace (eg TV).
When we work on it and it is in extended desktop mode, new applications that we open do not appear on it, but on the main display. We then have to blindly try to summon them, e.g. via win + shift + arrows.

Can we somehow improve such work?
For example by:

- PT Run + parameter - opens applications in the current display
- Something like Win + Tab - brings up the already selected application on the current display
Repository: youtube-dl
Issue: site support/feature request: puls24.at
Labels: site-support-request

## Checklist
- [X] I'm reporting a new site support request
- [X] I've verified that I'm running youtube-dl version **2020.09.20**
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that none of provided URLs violate any copyrights
- [X] I've searched the bugtracker for similar site support requests including closed ones

## Example URLs
- Single video: https://www.puls24.at/video/milborn-zur-wien-wahl-leonore-gewessler

## Description
- New news site (subsidiary of already supported puls4 -> might be very similar!!!)
Repository: go
Issue: cmd/go: 'go get -d' does not report line numbers in errors for bad import statements
Labels: NeedsFix,GoCommand

The fix for #41315 has revealed another variant of issue #34393.

Adding the following test case to [`mod_build_info_err.txt`](https://github.com/golang/go/blob/master/src/cmd/go/testdata/script/mod_build_info_err.txt)
```
+go get -d ./main
+stderr 'bad[/\\]bad.go:3:8: malformed module path "🐧.example.com/string": invalid char ''🐧'''
```

gives the failure mode of #41315 at `release-branch.go1.15`. At head, it gives a different, but still not quite right, failure mode:
```
+ go test cmd/go '-run=TestScript/^mod_build_info_err$'
go test proxy running at GOPROXY=http://127.0.0.1:44957/mod
--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/mod_build_info_err (0.05s)
        script_test.go:211:
            # This test verifies that line numbers are included in module import errors.
            # Verifies golang.org/issue/34393. (0.036s)
            > go list -e -deps -f '{{with .Error}}{{.Pos}}: {{.Err}}{{end}}' ./main
            [stdout]
            bad/bad.go:3:8: malformed import path "🐧.example.com/string": invalid char '🐧'
            > stdout 'bad[/\\]bad.go:3:8: malformed import path "🐧.example.com/string": invalid char ''🐧'''
            > go get -d ./main
            [stderr]
            m/main imports
                m/bad imports
                🐧.example.com/string: import missing
            [exit status 1]
            FAIL: testdata/script/mod_build_info_err.txt:7: unexpected command failure

FAIL
```

Notably, the import stack for this error message is again bereft of line numbers (as in #34393).

CC @jayconrod @matloob @rogpeppe
Repository: youtube-dl
Issue: Request support for BitTube
Labels: request

## Checklist

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2020.09.20**
- [x] I've searched the bugtracker for similar feature requests including closed ones

## Description

This is a request for support of <bittube.tv> and <bittube.video>.
Repository: godot
Issue: Unable to establish WebRTC peer connection outside local network when using C#
Labels: bug,topic:network,topic:dotnet

**Godot version:**
3.2.3-stable_mono_win64

**OS/device including version:**
Windows

**Issue description:**
When attempting to establish a webrtc peer connection if local or inside the current network all works as expected. But if outside, if file containing the `WebRTCMultiplayer` and PeerConnection was written in C# it cannot join, but the same file written in gdscript works great (even if host is C#).

Can view debug logs for webrtc here:
[C# Host](https://pastebin.com/utQ8wyzs) - [C# Join](https://pastebin.com/GPxjEgCD)
[GDScript Host](https://pastebin.com/NWQKdaPU) - [GDScript Join](https://pastebin.com/88tZPB00)

Some minor observations from looking over the debug logs when connecting:
The gdscript version contains this line fairly early on
`(basicportallocator.cc:1355): AllocationSequence: UDPPort will be handling the STUN candidate generation.`
And while I don't know where exactly that's coming from, searching around for that file seems to indicate that potentially its absence in the C# version might be coming from the "PORTALLOCATOR_ENABLE_SHARED_SOCKET" flag somehow not being set?

Second observation is that the C# log for the joining client won't contain any instances of `Received STUN ping response`.


**Steps to reproduce:**
1. Download full setup: https://www.filedropper.com/simplewebrtc (includes webrtc_debug and both builds already) OR  Download [SimpleWebRTC.zip](https://github.com/godotengine/godot/files/5296082/SimpleWebRTC.zip), add webrtc_debug, set AutoLoad to MultiplayerClient.cs and export, then set to MultiplayerClientGD (but keep name as MultiplayerClient) then build and export as well.

2. From the Server directory `npm install` followed by `node server.js`

3. Launch two instances locally of either version and play. In one instance click `Host`, copy down the room number from the upper left and enter it into the other client's "Game" input and click `Join`. Feel free to mix and match, 2 x gds, 2 x C#,  or either type can host for the other, just verify that everything works great.

4. Get the server setup outside your current network as well as a copy of the builds. The gdscript builds will still be able to connect and play, but the C# builds will no longer be able to join. They can host, and the gds build can still actually join and play with a C# build, but a C# build cannot be the joining player.


**Minimal reproduction project:**
[SimpleWebRTC.zip](https://github.com/godotengine/godot/files/5296082/SimpleWebRTC.zip)


Credit to [u/Slyka ](https://www.reddit.com/r/godot/comments/efuazd/i_made_a_small_game_with_the_new_webrtc/)whose minimal project I used for this
Repository: pytorch
Issue: Combining add_scalar with add_hparams with different frequencey 
Labels: triaged,module: tensorboard

## ❓ Questions and Help
How do I combine add_scalar done for each epoch and add_hparams with performance values computed after all training is done?

Currently adding the hparams removes the training curves with loss values and either replace them with single values (if contained in hparams) or just removes them if not provided in hparams.
Repository: flutter
Issue: Can we help apps identify widgets that are causing crashes?
Labels: framework,customer: dream (g3),a: debugging,customer: google,a: error message,P3,team-framework,triaged-framework

Issues like https://github.com/flutter/flutter/issues/47086 pop up from now and then for many clients. When such an exception occurs, application logs are typically the only resource available to debug the problem. From these logs, there's no way trivial way to trace the exception back to the widget that caused it.

I recall certain types of exceptions having widget information like this (taken from https://www.gitmemory.com/issue/flutter/flutter/47516/571278639):

```
════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following NoSuchMethodError was thrown during performLayout():
The method 'copyWith' was called on null.
Receiver: null
Tried calling: copyWith(maxWidth: Infinity)

The relevant error-causing widget was: 
  Theme file:///Users/apurva/Documents/Apurva%20Dabade/demo_app/lib/screens/pole_reports_page_new.dart:915:20
```

- Could we do this for all types of errors? like the `ArgumentError` when malformed utf is detected?
- Is this always enabled? Would release mode exceptions contain this information?

@GaryQian @hixie FYI
Repository: godot
Issue: Collision shape extents, radius don't get reset when get_tree().reload_current_scene() is called
Labels: discussion,topic:core,confirmed,documentation

Note: I apologize for any issues with the format of my writing. This is my first time using GitHub and reporting a bug

**Godot version:**
Godot v3.2.3-stable-win64


**OS/device including version:**
 Intel i3 with integrated graphics. Windows 10


**Issue description:**
Restarting a scene by using get_tree().reload_current_scene() or get_tree(),change_scene("current scene name") doesn't reset collision shape extents or radius that have changed during runtime of the game. Ideally, when a scene is restarted, all the radius and extents should be reset to the radius and extents in that have been configured in the editor. 


**Steps to reproduce:**
1. Make a simple scene with only a StaticBody2D and give it a CollisionShape2D of circle shape
2. Reduce the radius of the collision shape every few seconds in code
3. Print the radius of the shape onto the screen
4. Make the scene restart after some time, maybe 10 seconds and when the scene restarts, the collision shape radius doesn't get reset as well

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[Collision shape issue.zip](https://github.com/godotengine/godot/files/5296286/Collision.shape.issue.zip)
Repository: pytorch
Issue: Extra arguments included in the doc where they are not actually presented in the source code
Labels: module: docs,module: optimizer,triaged

## 📚 Documentation

<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->
In the doc, it says multiple LR schedulers have an argument `verbose` for the __init__ method, but they actually don't have it.

For example, check here https://pytorch.org/docs/stable/_modules/torch/optim/lr_scheduler.html#MultiStepLR
![image](https://user-images.githubusercontent.com/14886380/94512520-70630280-01d9-11eb-9559-f66d423408d5.png)

But if you look at the documentation, it says

![image](https://user-images.githubusercontent.com/14886380/94512497-66410400-01d9-11eb-9d22-4c714d1c0a5b.png)

Actually, none of these LR schedulers seem to accept `verbose`.


cc @jlin27 @vincentqb
Repository: go
Issue: crypto: document that the GCM AEADs are safe for concurrent use if the underlying cipher.Block is
Labels: Documentation,NeedsFix

This is a follow-on to #25882.

That issue is about documenting which cipher.Block implementations are safe for concurrent use.

Similarly, the cipher.AEAD created by NewGCM and friends ought to be documented as safe for concurrent use if the underlying cipher.Block is. In particular, AES-GCM should be safe.

/cc @FiloSottile