sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [BUG] Can't Deepcopy module with weightnorm
Labels: module: nn,triaged

## 🐛 Bug

A module with `weight_norm` applied cannot be deep copied.

## To Reproduce

Steps to reproduce the behavior:

Example:

```python
import torch
import torch.nn as nn

from copy import deepcopy

net = nn.Sequential(nn.utils.weight_norm(nn.Linear(2, 3)), nn.Linear(3, 10))
net2 = deepcopy(net) # error out here
````

Result:

```bash
RuntimeError: Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the moment
```

## Expected behavior

Proper deepcopy of nn.Module

## Environment

PyTorch version: 1.3.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.15
GCC version: Could not collect
CMake version: version 3.15.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.17.2
[pip] torch==1.3.0
[pip] torchvision==0.4.1a0+d94043a
[conda] blas                      1.0                         mkl
[conda] mkl                       2019.4                      233
[conda] mkl-service               2.3.0            py37hfbe908c_0
[conda] mkl_fft                   1.0.14           py37h5e564d8_0
[conda] mkl_random                1.1.0            py37ha771720_0
[conda] pytorch                   1.3.0                   py3.7_0    pytorch
[conda] torchvision               0.4.1                  py37_cpu    pytorch

## Additional context

N/A
Repository: terminal
Issue: Tab bar flickers to a large size momentarily when hitting "enter" with zsh
Labels: Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3

# Environment

```none
Windows 10.0.18362.0
```

# Steps to reproduce

1) Launch WSL zsh shell
3) Hit enter

# Expected behavior

Tab size remains consistent

# Actual behavior

Tab size flickers in response to input in shell.

In other shells, the tab resizes frequently in response to a change in the title text to adapt to the size of it. It seems like zsh has some way to detect a maximum size and truncates it, but not before WSL has rendered the update. 

Even in other shells that don't flicker, the "adaptive" behavior seems very strange; e.g. when I change directories it resizes the tab, causing frequent visual distraction as the UX is reorganized each time the shell title changes.

I am not sure if this behavior is intentional, but I think having a fixed, consistent tab size is a much better user experience then trying to adapt to the title as it changes. For example the way Chrome works is pretty sensible; use a larger size until there are too many tabs then shrink them all, but each tab should probably always be the same size -- or at least not change while someone's actively using the shell, as would be common when someone has a title that reflects the current directory which changes often.

![windows-terminal-flicker](https://user-images.githubusercontent.com/573056/67501081-a73baa80-f651-11e9-8aa8-dd37043458d3.gif)
Repository: TypeScript
Issue: Auto-import shouldn't work on `undefined`
Labels: Bug

Via #34666 

**TypeScript Version:** ?

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** auto import undefined

**Code**

Some file
```ts
export undefined = 10;
```
Some other file
```ts
undefin| (tab)
```

**Expected behavior:** Should complete to `undefined`

**Actual behavior:** Auto-imports `undefined`

**Playground Link:** N/A, need modules

**Related Issues:** Nope
Repository: flutter
Issue: paginated_data_table_test.dart large text test times out on the Web
Labels: a: tests,framework,platform-web,has reproducible steps,P2,c: tech-debt,team: skip-test,found in release: 3.3,found in release: 3.7,team-web,triaged-web

`packages/flutter/test/material/paginated_data_table_test.dart` times out and crashes on Cirrus CI. We should fix it.
Repository: terminal
Issue: Add more abstracted VT render tests
Labels: Product-Conpty,Issue-Task,Area-CodeHealth

> I've had a mind to add a test where we just make a Renderer with a Xterm256 engine, then trigger callbacks on the IRenderTarget, and make sure the frame is what we want for a while now that the pieces are tossed apart a bit nicer now, but I've never had the time

The VTRenderTests are _not great_. I think it'd be better if we could have a test that more simulated "something happened in the console, did we render the right thing?". In the past, the render engines, threads and Renderer were all too coupled to make a easy unittest of it, but as the code's gotten, better, this seems more resonable.

I imagine a test suite that's authored like this:

1. Create a `Renderer` with a Xterm256 engine (preferably in the `TEST_METHOD_SETUP`)
2. Grab a handle to it's `IRenderTarget` (preferably in the `TEST_METHOD_SETUP`)
3. Do some stuff to the `IRenderTarget`
4. Call `PaintFrame` on the render
5. Check that the frame painted is what we expected

###### (from conversation with @DHowett-MSFT)
Repository: opencv
Issue: Make window resizable in samples
Labels: feature,category: highgui-gui

Feature request according to https://github.com/opencv/opencv/pull/13289
I've always liked the ability to fullscreen/resize my OpenCV windows (it helps a lot with teaching), so I would be happy to go through and make all the sample windows resizable if that's something others would be interested in.
Repository: vscode
Issue: [folding] Auto re-fold a region after the cursor leaves it.
Labels: feature-request,editor-folding

Feature Request: Option to automatically re-fold a region after the cursor leaves it.

Say if you're skipping through "Find Next" matches, it will unfold all the code it passes through. It's annoying to have to keep refolding stuff manually.
Repository: flutter
Issue:  flutter config --clear-ios-signing-cert does not clear out the cert
Labels: platform-ios,tool,P2,team-ios,triaged-ios

## Steps to Reproduce
I had an iOS cert already set up with `flutter config`, then tried to clear it out.  The next time I ran `flutter build ios` on a newly created app with default (no) signing settings, it still used the old cert.
```
$ flutter config --clear-ios-signing-cert
Removing "ios-signing-cert" value.
$ flutter config                         
Configure Flutter settings.

To remove a setting, configure it to an empty string.
...
Settings:
  No settings have been configured.
$ flutter build ios
Building com.example.testSigning for device (ios-release)...
Signing iOS app for device deployment using developer identity: "iPhone Developer: <My Identity> (ABCDEFG)"
Running Xcode build...
```


## Logs

```
$ flutter doctor -v
[✓] Flutter (Channel unknown, v1.10.15-pre.202, on Mac OS X 10.14.6 18G87, locale en-US)
    • Flutter version 1.10.15-pre.202 at /Users/m/Projects/flutter
    • Framework revision 69066c88b6 (20 hours ago), 2019-10-23 17:14:34 -0700
    • Engine revision 8882bf3c73
    • Dart version 2.6.0 (build 2.6.0-dev.8.0 a61c775db8)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/m/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
    • Xcode at /Users/m/Applications/Xcode-11_2.app/Contents/Developer
    • Xcode 11.2, Build version 11B41
    • CocoaPods version 1.8.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.5.1

[✓] Connected device (2 available)
    • Flutter iOS Device • d83d5bc53967baa0ee18626ba87b6254b2ab5418 • ios        • iOS 13.1.3
    • macOS              • macOS                                    • darwin-x64 • Mac OS X 10.14.6 18G87

• No issues found!
```
Repository: TypeScript
Issue: Probabilistic Types
Labels: Suggestion,In Discussion

## Search Terms

Probabilistic, union, supertypes

## Suggestion

If a union type contains a member which is a supertype of one or more other members, the supertype subsumes those other members, but the information isn't lost. Tooling can then use that information as a hint about the expected distribution of possible values within that type.

```
type MetaSyntacticVar = 'foo' | 'bar' | 'baz' | string;
```

For the purposes of type safety, the above type is simply `string`. However, tools may consider `'foo' | 'bar' | 'baz'` to be the most likely values for `MetaSyntacticVar`. An IDE might use them for autocomplete. A linter (i.e. not tsc) might flag other values as a warning. Etc.

## Use Cases

A backend service offers a range of options, and I want to statically model them as a union type. Sometimes, the service adds a new option. I must either generalize the type to a string, do a type cast and tolerate some type unsafety, or release code updates in sync with all backend updates.

## Examples

```
type MetaSyntacticVar = 'foo' | 'bar' | 'baz' | string;

const name: MetaSyntacticVar = 'qux';
================================^ IDE suggests foo, bar, or baz as I type this
================================^^^ eslint flags this as a warning (if I opt in)
```

## Checklist

My suggestion meets these guidelines:

* [x] 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: godot
Issue: Material used as next pass on multiple objects only affects one at a time
Labels: bug,topic:rendering

**Godot version:** 3.1 and 3.2 alpha1

**OS/device including version:** Windows 10; 10.0.18362 Build 18362

**Issue description:**
![example](https://user-images.githubusercontent.com/52017025/67524472-5f7b4a00-f676-11e9-94e6-742a6d050403.gif)

I have a pair of MeshInstances, each with their own separate material to start with (green sphere, blue cube) and a SpatialMaterial with the color red.
When I put this spatial material into the next pass slot of each MeshInstance's material, only one of them appears red at a time.

Giving multiple objects the same material resource behaves just fine normally, its just using next pass where this behavior appears...

Maybe this is some kind of intentional limitation, but it seems inconsistent to me, and is a hassle to deal with.

For example, I want to apply the same shader material, with the same uniform settings, to several different objects as an additional pass, but can't do so conveniently because of this. I would have to duplicate the material and individually set the uniforms for each of them. 😢 

The example project puts the materials in the material slot of the MeshInstance, but the same thing occurs when placed in the mesh itself's material slot as well.
Only the editor view is necessary to show this, but it does happen when using a camera in the running game as well.

**Minimal reproduction project:** [minimalrepro.zip](https://github.com/godotengine/godot/files/3769425/minimalrepro.zip)
Repository: pytorch
Issue: Channels Last (NHWC) support plan.
Labels: triaged,module: memory format

Release goals:

- Support ResNet50, AlexNet, ResNeXt and proof performance gain on mixed precision models + Volta GPUs.
- Unlock developers to extend channels last operators coverage.

Tasks:

- [x] Change factory functions (`_like` and similars) to optionally preserve format (#28839) and land with docs.
- [x] Switch factory functions to preserve memory format by default (BC breaking) and fix all call sites (link tracking issue).
- [x] Fix TensorIterator to preserve memory format  (#28291).
- [x] Land CudNN changes to support channels last (#23861).
- [x] Land `adaptive_avg_pool2d` (CUDA) changes to support channels last (#24396).
- [x] Add `torch.memory_format` support to the TorchScript (#28544).
- [ ] Add model developer document how to check if model propagates NHWC forward and backward. Add documentation how to debug if model loosing channels last.
- [ ] Add TorchVision transformer and loader PRs (need to avoid additional memory copies on loading).
- [ ] Add developer docs how to write NHWC operators (https://github.com/pytorch/pytorch/wiki/Writing-memory-format-aware-operators)
- [ ] Add dev docs how to check if operator support memory formats.
- [ ] Documentation describing what is channels last, overlapping tensors, dense tensors, contiguous and when tensor can be both.
- [x] Add channels last support to `cuda.comm.scatter` and `cuda.comm.gather` (#28077)
- [x] Add model level .to_channels_last operator to convert weights.
- [x] Fix max_pool2d bug (#28714).
- [x] Revoke mutually exclusive requirement on channels last and contiguous memory formats (#28466).
- [x] Figure out if we can ship binaries with CudNN >= 7.4
- [ ] Update site docs for `*_like`, `clone`, `to`


Stretch goals:

- [ ] 1d and 3d support.

cc @VitalyFedyunin
Repository: flutter
Issue: Allow embedders to specify the AOT dylib path directly.
Labels: engine,platform-mac,e: embedder,a: desktop,P2,team-macos,triaged-macos

Currently, the only stable way to specify the AOT buffers to the engine via the Embedder API is to fetch pointer to the four blobs manually (`vm_snapshot_data`, `vm_snapshot_instructions`, `isolate_snapshot_data` and `isolate_snapshot_instructions`). The tools package these blobs in a single dynamic library. Embedders may find it more convenient if they could specify this single library to the engine during engine initialization.

https://github.com/flutter/engine/pull/13324 is a potential use case.
Repository: flutter
Issue: Linter false negative on a NewAPI warning for Android
Labels: team,platform-android,engine,dependency: android,P2,team-android,triaged-android

When attempting to add a new flag to the Android accessibility bridge (https://github.com/flutter/engine/pull/13262):

```java
// Heading support
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
    result.setHeading(semanticsNode.hasFlag(Flag.IS_HEADER));
}
```

The linter complained that the `setHeading` API required version 28 (Pie). However, there is an if guard that should protect for this case. This is also odd given that there are other similar guards in this same function that don't cause warnings.

To work around the issue, I suppressed the warning with a `@SuppressLint("NewApi") annotation. However, if we can fix this bug we should remove the suppression, as this is a rather large function and I don't want to miss something else  because we turned off the  lint because of this one instance.
Repository: PowerToys
Issue: Move Hidden Windows to active screen
Labels: Idea-New PowerToy,Product-Window Manager

# Move Hidden Windows to active screen

Some applications do not play nicely with multiple monitor scenarios.
They mainly the ones which remember their screen position.

Scenario
Laptop with additional monitor.

Start an affected application when you have two monitors connected and move it to monitor two, shut PC down.

Disconnect the second monitor, then start up PC and run the affected application.

All you see is a task bar icon becuse the application has blisfully unaware thet the second monitor is not preset jumped to the monitor which does not now exist.

I know there is a documented way to move such windows to an available screen, but it requires quite a bit of faffing arround. I invariably end up googling for the required key chord each time I need it becuase it does not happed that often, but often enough to cause irritation.

A hook that allowed the user to right click the task bar icon and "move to screen n" would be very much appreciated.

Some of the code in https://github.com/MikeWilliams-UK/SSMS-Window-Fixer may be of use in this.
Repository: godot
Issue: Mesh gets deformed when running animation
Labels: bug,confirmed,topic:import

**Godot version:**
3.2 Alphas 1,2,3

**OS/device including version:**
WIN 10

**Issue description:**
Mesh gets deformed when running animation

**Steps to reproduce:**
Open attached Godot project
Open scene rat_grey.escn
Run animation 'rat_sits_down_scratchinh'
Mesh is deformed during animation:
![image](https://user-images.githubusercontent.com/7196697/67555230-b181a580-f732-11e9-87cf-edcb84596202.png)

**Minimal reproduction project:**
[test2.zip](https://github.com/godotengine/godot/files/3771086/test2.zip)
Repository: go
Issue: syscall: ReadLink() & Utimes() arguments for access-mode & share-mode are wrong
Labels: OS-Windows,NeedsInvestigation

A search for CreateFile() finds the following read-only functions with a zero share-mode argument. I think their share-mode should be `FILE_SHARE_READ`, and in some cases also `FILE_SHARE_WRITE`.

EDIT: They would also need `FILE_SHARE_DELETE` in apps that expect to rename or remove a file concurrently with any of these ops.

```
readlink()
os/file_windows.go:   h, err := syscall.CreateFile(p, 0, 0, nil,

stat()
os/stat_windows.go:   h, err := syscall.CreateFile(namep, 0, 0, nil,

loadFileId()
os/types_windows.go:  h, err := syscall.CreateFile(pathp, 0, 0, nil,

ReadLink()
syscall/syscall_windows.go: fd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0
```
EDIT: these should probably get `| FILE_SHARE_READ`
```
Utimes()
syscall/syscall_windows.go: h, e := CreateFile(pathp, FILE_WRITE_ATTRIBUTES,
                                               FILE_SHARE_WRITE

UtimesNano()
syscall/syscall_windows.go: h, e := CreateFile(pathp, FILE_WRITE_ATTRIBUTES,
                                               FILE_SHARE_WRITE
```
This simple patch adds `FILE_SHARE_DELETE` in syscall.Open(), but it doesn't help the above cases:
```
diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go
index de05840..e1455d5 100644
--- a/src/syscall/syscall_windows.go
+++ b/src/syscall/syscall_windows.go
@@ -245,6 +245,8 @@ func makeInheritSa() *SecurityAttributes {
 	return &sa
 }
 
+var Open_FileShareDelete = false
+
 func Open(path string, mode int, perm uint32) (fd Handle, err error) {
 	if len(path) == 0 {
 		return InvalidHandle, ERROR_FILE_NOT_FOUND
@@ -270,6 +272,9 @@ func Open(path string, mode int, perm uint32) (fd Handle, err error) {
 		access |= FILE_APPEND_DATA
 	}
 	sharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE)
+	if Open_FileShareDelete {
+		sharemode |= FILE_SHARE_DELETE
+	}
 	var sa *SecurityAttributes
 	if mode&O_CLOEXEC == 0 {
 		sa = makeInheritSa()
```

cc @alexbrainman @zx2c4 @mattn 
@gopherbot add OS-Windows
Repository: rust
Issue: Clarify guarantees for `Vec` and `String` allocation
Labels: C-enhancement,A-allocators,A-collections,T-libs-api

Similar to what https://github.com/rust-lang/rust/pull/58183 did for `Box`, I think we should document a guarantee that `Vec<T>` and `String` are allocated through the standard library’s global allocator.

Namely:

* It is valid (under some conditions) to pass a pointer allocated with `std::alloc::Global` (or corresponding free functions in `std::alloc`) to `Vec::from_raw_parts`.

* It is valid (under some conditions) to deallocate or reallocate with `std::alloc::Global` (or corresponding free functions in `std::alloc`) a pointer from [`Vec::into_raw_parts`](https://github.com/rust-lang/rust/pull/65705) (or from `ManuallyDrop` + `Vec::as_mut_ptr`).

Conditions include using the appropriate `std::alloc::Layout`, properly transferring ownership, etc.

Perhaps the documented guarantees should also extend to using `NonNull<T>::dangling` for zero-size allocations. (And similarly for `Box`.)

@rust-lang/libs, any throughts?
Repository: flutter
Issue: CupertinoAlertDialog has blurry lines
Labels: framework,engine,a: fidelity,f: cupertino,a: quality,has reproducible steps,P2,found in release: 3.7,found in release: 3.8,team-design,triaged-design

The lines to separate the action buttons are blurry.

In `cupertiono/dialog.dart` the `dividerThickness` is callculated this way:
```
dividerThickness: _kDividerThickness / MediaQuery.of(context).devicePixelRatio
```
But do we need the `devicePixelRatio` to do so? When I just use `dividerThickness: _kDividerThickness` the lines are perfect.

 On the left side, you can see the divider with `dividerThickness: _kDividerThickness / MediaQuery.of(context).devicePixelRatio`.
 On the right side, you can see the divider with `dividerThickness: _kDividerThickness`.

![Screen Shot 2019-10-25 at 11 38 54 png 2019-10-25 11-47-29](https://user-images.githubusercontent.com/1191649/67562207-9147eb80-f71e-11e9-9036-3f4c08cb322c.png)
Repository: vscode
Issue: Web: allow to use Fira Code in editor (Safari)
Labels: feature-request,font-rendering,web,safari

Open web in Safari with `"editor.fontFamily": "Fira Code"`. the font is not being loaded it seems. Works fine in other browsers.

![image](https://user-images.githubusercontent.com/900690/67565531-f3581f00-f725-11e9-878f-1b53ad9b4685.png)

The only workaround that helped as to directly import the font into the HTML (https://cdn.rawgit.com/tonsky/FiraCode/1.205/distr/fira_code.css). Maybe related to how they define a `src` for the font and we don't?
Repository: pytorch
Issue: Can't successfully install pytorch with python3.6 on my pi 4 
Labels: module: build,triaged,has workaround

**my pi info:**
Linux raspberrypi 4.19.50-v7l+ #895 SMP Thu Jun 20 16:03:42 BST 2019 armv7l GNU/Linux

It gets to this point in the installation and I get this err:

```
[ 44%] Built target c10_LeftRight_test
/usr/bin/ld: ../../../lib/libprotobuf.a(arena.cc.o): in function `google::protobuf::internal::ArenaImpl::Init()':
arena.cc:(.text+0x24): undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[2]: *** [third_party/protobuf/cmake/CMakeFiles/protoc.dir/build.make:87: bin/protoc] Error 1
make[1]: *** [CMakeFiles/Makefile2:241: third_party/protobuf/cmake/CMakeFiles/protoc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 44%] Built target c10_bfloat16_test
[ 44%] Built target sleefdetpurecfma_scalar
[ 44%] Built target sleefdetpurec_scalar
make: *** [Makefile:141: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 751, in <module>
    build_deps()
  File "setup.py", line 310, in build_deps
    cmake=cmake)
  File "/home/pi/Desktop/pytorch/tools/build_pytorch_libs.py", line 59, in build_caffe2
    cmake.build(my_env)
  File "/home/pi/Desktop/pytorch/tools/setup_helpers/cmake.py", line 334, in build
    self.run(build_args, my_env)
  File "/home/pi/Desktop/pytorch/tools/setup_helpers/cmake.py", line 142, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/home/pi/miniconda3/envs/mimicVoice/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 2.
```
I need it to run on python3.6 
Is this enough info to get some advice?