sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.cuda.amp, example with 20% memory increase compared to apex/amp
Labels: triaged,module: amp (automated mixed precision)

## 🐛 Bug

I have here an example where PT1.7.1 + torch.cuda.amp requires about 20% more memory than  T1.4.0+apex/amp. What can I do to reduce the memory requirements to the level of PT1.4.0+apex/amp?

I am using a torchvision densenet121 with memory_efficient=True (gradient checkpointing enabled). 
model=models.densenet121(pretrained=None, memory_efficient=True). This would only run in PT1.7.1 native mixed precision mode with the changes mentioned here:  #40221

This model had a comparable memory footprint (2% higher) during training compared to PT1.4+apex/amp.

However, I see a significantly increased memory demand for **PT1.7.1 + native amp compared to PT1.4+ apex/amp** when I train a version of this densenet where the activation function is replaced by the following implementation of the mish activation function:

```
@torch.jit.script
def _mish_jit_fwd(x): 
    return x.mul(torch.tanh(F.softplus(x)))

@torch.jit.script
def _mish_jit_bwd(x, grad_output):
    x_sigmoid = torch.sigmoid(x)
    x_tanh_sp = F.softplus(x).tanh()
    return grad_output.mul(x_tanh_sp + x * x_sigmoid * (1 - x_tanh_sp * x_tanh_sp))

class MishJitAutoFn(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x):
        ctx.save_for_backward(x)
        return _mish_jit_fwd(x)

    @staticmethod
    def backward(ctx, grad_output):
        x = ctx.saved_variables[0]
        return _mish_jit_bwd(x, grad_output)

def mish(x): return MishJitAutoFn.apply(x)

class MishJit(nn.Module):
    @autocast()
    def forward(self, x): return MishJitAutoFn.apply(x)
```
In this case, PT1.7.1+native amp needs 20% more memory compared to PT1.4+apex/amp. Without the @autocast() in the second last line, the difference is even higher.

## Environment

PyTorch version: 1.7.1+cu101
Is debug build: False
CUDA used to build PyTorch: 10.1
ROCM used to build PyTorch: N/A
OS: SUSE Linux Enterprise Server 12 SP5 (x86_64)
GCC version: (SUSE Linux) 4.8.5
Python version: 3.7 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.1.105
GPU models and configuration:
GPU 0: Tesla V100-SXM2-32GB
Nvidia driver version: 418.39
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip] numpy==1.16.4
[pip] torch==1.7.1+cu101
[pip] torchaudio==0.7.0
[pip] torchtuples==0.2.0
[pip] torchvision==0.8.0



cc @mcarilli
Repository: godot
Issue: Texture settings test failure in glTF2 import
Labels: bug,topic:rendering,topic:import,topic:3d

**Godot version:**
c2e0c6cc2282669017707596c810cde996414131 fork. Should probably test on master.


**OS/device including version:**
win10, nvidia, Vulkan


**Issue description:**

Test doesn't match.

![texture settings](https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/TextureSettingsTest/screenshot/screenshot.png)

![image](https://user-images.githubusercontent.com/32321/102720603-2f472f80-42aa-11eb-8695-5b2537e8ad27.png)

**Steps to reproduce:**
Load gltf and compare screenshots.

**Minimal reproduction project:**
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/TextureSettingsTest
Repository: godot
Issue: ctrl+click not working on preload and yield
Labels: bug,topic:gdscript,topic:editor

**Godot version:** 3.2.3 (custom build from Solus repo)

**OS/device including version:** Solus


**Issue description:** ctrl + click on special functions like `preload` and `yield` is not working.
Repository: vscode
Issue: Silent failure when debug adapter executable is not found
Labels: bug,debug

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.52.2
- OS Version: Arch Linux

Steps to Reproduce:

1. Create a debug extension with a DebugAdapterDescriptorFactory that returns a DebugAdapterExecutable of a binary path that doesn't exist
2. Try using the extension to debug a program.

The debug bar will appear for a second and then disappear without informing the user that the debug adapter executable was not found.

![Peek 2020-12-20 19-55](https://user-images.githubusercontent.com/9395011/102721789-482d0080-42fd-11eb-944a-5afa45f221ec.gif)
Repository: flutter
Issue: [video_player] Get the images of playing video
Labels: p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

## Use case

Hi! I have a video file in my assets folder (like mp4). I want to show the video of the file and get the data of the images when the video is playing. Something like an image stream in the camera package https://pub.dev/documentation/camera/latest/camera/CameraController/startImageStream.html

Basically a callback that gets an image.

I want to pass the image to Tflite model.

I did not find any package that can do this

## Proposal
Something like that, that I can pass the image to the Tflite model
```
_controller = VideoPlayerController.asset('assets/example.mp4')
    ..initialize(
        onImage: (CameraImage img) => { // onImage callback
              Tflite.runPoseNetOnFrame(
                bytesList: img.planes.map((plane) {
                  return plane.bytes;
                }).toList(),
              ).then((recognitions) {
                // ...
              })
            });
```
I think that it is can be very useful for many people in the future, to pass a video as images to an AI model.

How hard it will be to implement this in this package? Does this idea fit this package?

Thanks in advance!
Repository: react
Issue: New JSX runtime advice for package authors?
Labels: Type: Question,Type: Discussion

I'm wondering if you have any advice around using the new JSX runtime in packages with `react` as a peer dependency?

For compatibility reasons it seems like packages shouldn’t use the JSX runtime (at least not yet) because then the package would only be compatible with versions of React that include the new JSX runtime (but in time this compatibility reason will fade).

If a package did use the new JSX runtime, I think it could only be used in the ESM and CJS builds. The UMD build would still need to use `createElement` as the UMD version of React doesn't include the JSX runtime.

Curious if you could provide some insight on the plan for the JSX runtime in peer dependency packages? Will the JSX runtime eventually be part of the React UMD build? Does tooling need to support using the JSX runtime in ESM and CJS builds, while always using `createElement` in the UMD build? Thanks.

I ran into this issue when creating [Rollpkg](https://github.com/rafgraph/rollpkg), a zero config build tool to create packages with Rollup and TypeScript.

Thanks for all your work on React, I've really enjoyed using it the past several years!
Repository: godot
Issue: Pause Scene button doesn't work if a scene contains no scripts
Labels: bug,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
Tested in both the official 3.2.3 Steam build and a local build at fe93f6292f8c547c41de5348827712928618b87a


**OS/device including version:**
Windows 10 64-bit but probably present on all platforms.


**Issue description:**
If a scene contains no scripts, the editor's Pause Scene button fails to pause the scene and instead simply prints an error to the debug console:
```
E 0:00:03:0431   debug: Condition "!script_lang" is true.
  <C++ Source>   core\debugger\remote_debugger.cpp:756 @ debug()
```
This isn't really a major problem for users of the engine, as any real project is likely to have at least one script in every scene, but it is somewhat confusing when trying to debug engine bugs in test projects.


**Steps to reproduce:**
1. Run a scene from the editor with no scripts in it
2. Press the Pause Scene button in the editor
3. Watch the scene continue to run, and read the error in the debug console


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[PauseTest.zip](https://github.com/godotengine/godot/files/5721536/PauseTest.zip)
The above project is for the current `master` branch and contains a single 2D scene containing only a `RigidBody2D` with a `Sprite2D` so you can see it fall while the scene should be paused.
Repository: excalidraw
Issue: Reduce over rendering when loading a room scene
Labels: performance ⚡️

We should be rendering once or twice, not 6 times when loading a scene from a room.

![image](https://user-images.githubusercontent.com/197597/102730350-52dd9a80-42e9-11eb-9e38-7d0d102b6e28.png)
Repository: rust
Issue: 'expected struct `cargo_metadata::Package`, found a different struct `cargo_metadata::Package`' should note that one is a module and one is a crate
Labels: C-enhancement,A-diagnostics,T-compiler,E-medium,D-confusing,D-terse

```
error[E0308]: mismatched types
  --> src/utils/cargo_metadata.rs:50:9
   |
50 |         &self.root
   |         ^^^^^^^^^^ expected struct `cargo_metadata::Package`, found a different struct `cargo_metadata::Package`
   |
   = note: expected reference `&cargo_metadata::Package` (struct `cargo_metadata::Package`)
              found reference `&cargo_metadata::Package` (struct `cargo_metadata::Package`)
```
It's impossible to tell here whether it found the version from the current module, `crate::utils::cargo_metadata`, or the one from the crate, `::cargo_metadata`. It would be nice to at least say why they might be different, the same way the compiler warns about two versions of a crate.

(I feel like I reported this bug already, but I can't seem to find it.)

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"pierwill"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: pytorch
Issue: Use rlibm for faster and more accurate floating point operations
Labels: triaged,enhancement,module: bfloat16

It looks like they are faster and more accurate. Paper describing the approach at https://arxiv.org/pdf/2007.05344.pdf
Repository: rust
Issue: Trait with associated type bounds cannot be made into an object because it uses `Self` as a type parameter
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,T-types,A-trait-objects,A-dyn-compatibility

A simplified example where this shows up is the following trait.

```rust
trait Conversion {
    type Source: Into<Self::Target>;
    type Target;
}
```

([Full code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fa933915af340b6d5597678d6177359b))

If you try to make a trait object, say `&dyn Conversion<Source = String, Target = Box<str>>`, then Rust errors:

```
error[E0038]: the trait `Conversion` cannot be made into an object
  --> src/main.rs:14:12
   |
1  | trait Conversion {
   |       ---------- this trait cannot be made into an object...
2  |     type Source: Into<Self::Target>;
   |                  ------------------ ...because it uses `Self` as a type parameter in this
...
14 |     let b: &dyn Conversion<Source = String, Target = Box<str>> = &a;
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Conversion` cannot be made into an object
```

If the bound was something like `Source: Into<Self>` this error would make sense, but instead the bound references another associated type, which all must be fully specified when making a trait object type anyway.

This problem does not seem to occur when associated types are used to define functions in the trait, as creating a `&dyn Deref<Target = ...>` trait object works.
Repository: youtube-dl
Issue: Any way to download Lynda.com Course Arts / Thumbnails with youtube-dl or otherwise?
Labels: question

Example: 

This is the Thumbnail
https://cdn.lynda.com/course/475456/475456-637437110702790557-16x9.jpg

From this course
https://www.lynda.com/Illustrator-tutorials/Drawing-Vector-Graphics-Laboratory/475456-2.html

Currently I do it manually for every course. It's not super important, just for personal aesthetic reasons.
Anyway to automatically download this while downloading the course? with youtube-dl or otherwise?

Thanks!
Repository: pytorch
Issue: While training the model, GPU util reaches 100% but no progress happends.
Labels: needs reproduction,module: cuda,triaged,module: deadlock

## ❓ While training my model, the GPU util reaches 100% but no progress happends. 
Just as the title says. And the code stucks at "image.to(device)". But when I comment the line "loss.backward()", the problem disappears. 
My environment is as follows:
- cuda 11.0
- pytorch 1.7.1 
- python 3.6.9


cc @ngimel
Repository: pytorch
Issue: Model passed through queue hangs while loading in sub process 
Labels: module: multiprocessing,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1. Instantiate Process inheritted class and run as below:


<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
```
pseudo code
run(self):
    while True:
        wait while self.queue.empty()
    q = queue.get()['model']  # <- passed model from main process
    self.model.load_state_dict(q.state_dict()) # <- this is where it hangs forever
```


## Expected behavior
1. I was using torch 1.15, the code above was working
2. I upgraded to torch 1.18, which causes the above trouble; the process was hung at there forever.

## Environment
1. working: torch 1.15
2. not working: torch 1.18

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0): 1.18
 - OS (e.g., Linux): OSX
 - How you installed PyTorch (`conda`, `pip`, source): pip install torch
 - Build command you used (if compiling from source):
 - Python version: 3.6
 - CUDA/cuDNN version: None
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
Repository: pytorch
Issue: Is there any upper-level API to disable the detection of the weight’s version
Labels: module: autograd,triaged

## Is there any upper-level API to disable the detection of the weight’s version

We are trying to use pipelined model parallelism to speed up model training. This work requires ourselves to manage different versions of weights. This is ok in version 1.4 pytorch, but the following error will be reported after 1.5，
In our scenario, we confirm that the version of the weight is reasonable， so Is there any upper-level API to disable the detection of the weight’s version. 
```
raceback (most recent call last):
  File "bert_main.py", line 294, in <module>
    main()
  File "bert_main.py", line 210, in main
    model_args.model_name_or_path) else None
  File "/workspace/pipedream-1.5BW/lib/runtimecontrol.py", line 521, in train
    self.runtime_control.run_forward_backward()
  File "/workspace/pipedream-1.5BW/lib/runtimecontrol.py", line 194, in run_forward_backward
    data_provider=data_provider)
  File "/workspace/pipedream-1.5BW/lib/callableunit.py", line 157, in backward
    result = self._backward(**kwargs)
  File "/workspace/pipedream-1.5BW/lib/callableunit.py", line 317, in _backward
    result = self._backward_g0(**kwargs)
  File "/workspace/pipedream-1.5BW/lib/callableunit.py", line 392, in _backward_g0
    return self._comm_backward(outputs, kwargs)
  File "/workspace/pipedream-1.5BW/lib/callableunit.py", line 174, in _comm_backward
    torch.autograd.backward(forward_output, backward_gradient)
  File "/opt/conda/lib/python3.7/site-packages/torch/autograd/__init__.py", line 146, in backward
    allow_unreachable=True, accumulate_grad=True)  # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [768]] is at version 9; expected version 4 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
```

Now, we use the following method to change weight version. 
```
def set_params(module, state_dict):
    if isinstance(module, torch.nn.parallel.DistributedDataParallel):
        module = module.module
    cur_state_dict = module.state_dict()
    for key in state_dict:
        # Don't update running_mean and running_var; these should
        # accumulate normally.
        # mask might have a different shape, so don't copy it to
        # the module this way.
        if "running_" in key or "mask" in key:
            state_dict[key] = cur_state_dict[key]
    module.load_state_dict(state_dict)
```


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved
Repository: go
Issue: x/tools/go/analysis/passes/nilness: check pointers inside structs as well
Labels: NeedsInvestigation,Tools,Analysis

`nilness` currently (as of golang/tools@ae774e9781d2 with _Go_ 1.15.6) correctly reports this issue:

```go
if pmax == nil {
        max = *pmax
}
```

But not this one:

```go
if v.max == nil {
        max = *v.max
}
```

[Full reproduction code](https://play.golang.org/p/VqygTuYJfda).
Repository: pytorch
Issue: File "setup.py", line 773:subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 2
Labels: module: build,module: cuda,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is.
Error in Setup File while building 
 -->

## To Reproduce

Steps to reproduce the behavior:

1. clone the pytorch git repo
2. install dependencies
3. run setup.py

<!-- 
[ 29%] Built target libprotoc
gmake: *** [Makefile:160: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 773, in <module>
    build_deps()
  File "setup.py", line 315, in build_deps
    build_caffe2(version=version,
  File "/home/user/Algors/pytorch/tools/build_pytorch_libs.py", line 58, in build_caffe2
    cmake.build(my_env)
  File "/home/user/Algors/pytorch/tools/setup_helpers/cmake.py", line 346, in build
    self.run(build_args, my_env)
  File "/home/user/Algors/pytorch/tools/setup_helpers/cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '8']' returned non-zero exit status 2.

-->

## Expected behavior

<!-- 
Flawless setup.py
 -->

## Environment

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.10 (x86_64)
GCC version: (Ubuntu 10.2.0-13ubuntu1) 10.2.0
Clang version: Could not collect
CMake version: version 3.18.4

Python version: 3.8 (64-bit runtime)
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 660M
Nvidia driver version: 455.32.00
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.4
[conda] # packages in environment at /home/ur/anaconda3/envs/Pytorch_env:

```

 - PyTorch Version (building from current source on predefined pytorch conda env):
 - OS ( Linux):
 - How you installed PyTorch (source):
 - Build command you used (if compiling from source:python3 setup.py install):
 - Python version 3.8:
 - CUDA/cuDNN version 11:
 - GPU models and configuration GTX 630m:
 - Any other relevant information:
Error occured at 5%, 23% and 29 % respectively.
## Additional context

<!-- Add any other context about the problem here. -->


cc @malfet @seemethere @walterddr @ngimel
Repository: ant-design
Issue: Popover/Tooltip with trigger="click" prop does not hide when click to iframe
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-popover-iframe-bug-2vuce)

### Steps to reproduce
1) Click on any of the buttons, a popover or tooltip will appear
2) Click to iframe

### What is expected?
Popover or tooltip will hide

### What is actually happening?
Popover or tooltip is not hiding

| Environment | Info |
|---|---|
| antd | 4.9.4 |
| React | 17.0.1 |
| System | Windows 10 |
| Browser | Google Chrome 87.0.4280.88 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: That define multiple models can influence the convolution parameter update.
Labels: needs reproduction,module: nn,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:
This bug appears when I write a scripts for a GAN model.
1. Define a G net and print the parameters of one of the convolution kernels when G is training.
2. Based on the code in the previous step I just define a new D net without any other change and print the parameters of one of the same convolution kernels as  previous step when G is training.
3. I find that the two results are different.



<!-- 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. -->

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0):1.6.0
 - OS (e.g., Linux):Windows 10
 - How you installed PyTorch (`conda`, `pip`, source):pip
 - Build command you used (if compiling from source):......
 - Python version:3.6.4
 - CUDA/cuDNN version:11.0/7.5.0
 - GPU models and configuration:GeForce RTX 2080，cuda:0, single GPU.
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @albanD @mruberry @jbschlosser
Repository: youtube-dl
Issue: Thumbnail download for Lynda Courses
Labels: request

Example:

This is the Thumbnail
https://cdn.lynda.com/course/475456/475456-637437110702790557-16x9.jpg

From this course
https://www.lynda.com/Illustrator-tutorials/Drawing-Vector-Graphics-Laboratory/475456-2.html

--write-thumbnail doesn't work with Lynda Tutorials. Please add it. It will be very helpful!
Currently I do it manually for every course. It's not super important, just for personal aesthetic reasons.

Thanks!