sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Add scopes to autograd profiler
Labels: triaged

## 🚀 Feature

Add scopes within a torchscript model so you can get profile information per scope for both the forward and backward pass.

## Motivation

For distributed execution (model parallelism) we want to be able to measure the exact CPU time spent on different parts of a torchscript module so we can shard the model in a reasonable manner to different machines. We have high level "components" that represent shardable units of execution and want to use the autograd profiler to profile per component.

## Pitch

We want to add two custom methods into torch so we can describe the scope. Making them in C++ allows us to use them in torchscript as well in python.

TorchScript pseudocode
```py
def forward(self, x):
  handle = torch._profiler_scope_enter("foo")
  x = torch.relu(x)
  ...
  torch._profiler_scope_exit(handle)
  return x
```

Python Sugar
```py
def forward(self, x):
  with profiler.scope("foo"):
    x = torch.relu(x)
    ...
    return x
```

These methods would add scope information to RecordFunction and thus provide it to the autograd Profiler. https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/record_function.h

The current RECORD_FUNCTION implementation appears to track the lineage from backwards functions to the forward pass via sequence_nr so it should be easy to walk the RecordFunction tree and extract scope information. https://github.com/pytorch/pytorch/blob/master/torch/csrc/autograd/function.h#L104-L116 https://github.com/pytorch/pytorch/blob/master/tools/autograd/gen_variable_type.py#L238

One notable thing is that sequence_nr is currently thread_local. From what I've heard, the autograd/backward pass can be multithreaded and thus we will likely need to extend sequence_nr to include a thread ID as well as the current thread_local sequence_nr.

## Alternatives

There's ways to do this when running in the python environment w/ register_backward_hook + a custom nn.Module however there's no equivalent way to do this with torchscript since it doesn't support register_backward_hook. The autograd backward pass can also run multithreaded from my understanding so that would break that approach anyways.
Repository: TypeScript
Issue: Expose TypeScript-specific globbing behavior
Labels: Suggestion,API,Awaiting More Feedback

Today, TypeScript's globber uses a custom strategy that acts differently from other tools. This is an issue for 3rd party users who need to consume TypeScript's APIs, but need to validate that a file belongs to a compilation. #32564 dives into some of the discussion around this.

This API doesn't have to be the same as `matchFiles` - but it needs to compose well with the rest of our API.
Repository: flutter
Issue: "iproxy cannot be opened because the developer cannot be verified"
Labels: c: crash,tool,platform-mac,‎‍platform-catalina,P2,team-tool,triaged-tool

**If you're looking for a quick fix, this should work:** https://github.com/flutter/flutter/issues/42969#issuecomment-568303471

## Steps to Reproduce

1. Going through the macOS install tutorial for Flutter (https://flutter.dev/docs/get-started/install/macos), step-by-step, on a brand new MacBook running 10.15.
2. Any time a `flutter` command is called (eg. `flutter doctor` or `flutter create`), the following warning appears:
<img width="532" alt="Screenshot 2019-10-17 at 23 05 55" src="https://user-images.githubusercontent.com/24899791/67052129-25b9b900-f135-11e9-9fa4-39d5bceea97e.png">


## Logs

The process hangs until I acknowledge the window by clicking "Cancel", but the verbose logs don't actually show anything.
For example, for flutter doctor logs:
```
➜  Developer flutter doctor -v
[✓] Flutter (Channel stable, v1.9.1+hotfix.5, on Mac OS X 10.15 19A582a, locale en-GB)
    • Flutter version 1.9.1+hotfix.5 at /usr/local/flutter
    • Framework revision 1aedbb1835 (7 hours ago), 2019-10-17 08:37:27 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/lucas/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.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_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8580
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.38.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.5.1

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
```
Repository: pytorch
Issue: [jit] TorchScript classes don't work in notebooks
Labels: oncall: jit,triaged

In IPython:

```python
@torch.jit.script
class Container(object):
    def __init__(self):
        pass
```

gives

```
TypeError: <module '__main__'> is a built-in class
```

since the `inspect` module can't get the source of a class inside of a notebook

cc @suo
Repository: vscode
Issue: Minimap: Render overview ruler decorations (for extension support)
Labels: feature-request,editor-minimap

Originally mentioned in the comments here: https://github.com/microsoft/vscode/issues/20934

Rendering overview ruler decorations on the minimap would not only eventually allow the minimap to optionally replace the scrollbar by supporting the same decorations, but would also allow extensions to provide decorations on the minimap.
Repository: pytorch
Issue: Problem with jit TorchScript while copying data between GRUs
Labels: triage review,oncall: jit,triaged

## 🐛 Bug
Not able to create TORCHSCRIPT when copying data between GRU to GRUCell using '.' operator.
It not able to identify `.` operator.
<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

1. [colab](https://colab.research.google.com/drive/1A4IERK4j-veOuunrcO-sytuednfhwSlk)

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
```python
import torch
import torch.nn as nn
class Gru(nn.Module):
    def __init__(self,input_size, hidden_size):
      super().__init__()
      self.gru_cell = nn.GRUCell(input_size, hidden_size)

    def forward(self, gru):
      self.gru_cell.weight_hh.data = gru.weight_hh_l0.data
      self.gru_cell.weight_ih.data = gru.weight_ih_l0.data
      self.gru_cell.bias_hh.data = gru.bias_hh_l0.data
      self.gru_cell.bias_ih.data = gru.bias_ih_l0.data
      return self.gru_cell
      
gru_ = Gru(512,512)
rnn = nn.GRU(512, 512)
gru_cell = gru_(rnn)
s = torch.jit.script(gru_)
```
```
RuntimeError: unknown:0: expecting kind 'variable' but found '.'
at <ipython-input-8-335cd824f51c>:10:7
    def forward(self):
      self.gru_cell.weight_hh.data = self.gru.weight_hh_l0.data
      ~~~~~~~~~~~~~~~~~~~~ <--- HERE
      self.gru_cell.weight_ih.data = self.gru.weight_ih_l0.data
```
## Expected behavior
Run successfully
<!-- A clear and concise description of what you expected to happen. -->

## Environment
 - PyTorch Version (e.g., 1.0): 1.2.0
 - OS (e.g., Linux): Ubuntu 18.04.3 LTS
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.6
 - CUDA/cuDNN version: 10.0.130 / 7.6.3
 - GPU models and configuration:
 - Any other relevant information:
[pip3] numpy==1.16.5
[pip3] torch==1.2.0
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.3.1
[pip3] torchvision==0.4.0
## Additional context

<!-- Add any other context about the problem here. -->


cc @suo
Repository: youtube-dl
Issue: US Commerce Senate Hearing not downloading 
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 **2019.10.16**
- [ 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

https://www.commerce.senate.gov/2017/10/the-commercial-satellite-industry-what-s-up-and-what-s-on-the-horizon



## Description

US Senate Hearing uses Akamai Media Player with a "blob:Https...." javascript local file, not sure what to do, just lots of errors
Repository: go
Issue: crypto/x509: select a certificate store for systemVerify on Windows
Labels: OS-Windows,NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

Windows.

### What did you do?

Attempted to build a set of certificate chains for a certificate:

```Go
var cert *x509.Certificate
...
intermediates := x509.NewCertPool()
intermediates.AddCert(intermediate)
vo := x509.VerifyOptions{
    Roots:         nil, // Use system roots
    Intermediates: intermediates,
}
chains, err := cert.Verify(vo)
```

### What did you expect to see?

Complete chains when running as a user or as the system user.

### What did you see instead?

systemVerify() in crypto.x509.root_windows.go always passes HCCE_CURRENT_USER as the hChainEngine argument to syscall.CertGetCertificateChain() (syscall.Handle(0) in the first argument).  This means that chain lookups as the system user will fail for us, because the required certificates are stored in HCCE_LOCAL_MACHINE (syscall.Handle(1)).

It's possible to pass an additional store as argument 4 to the syscall.  This argument is currently storeCtx.Store, which is nil but it might be possible for createStoreContext to populate it with a HCERTSTORE pointing to HCCE_LOCAL_MACHINE.

Alternately, the store preference could be specified in VerifyOptions.
Repository: flutter
Issue: WebView JavaScriptChannelHandler didReceiveScriptMessage should JSON-encode collections
Labels: platform-ios,p: webview,package,c: proposal,P3,p: requires breaking change,team-ios,triaged-ios

### Problem
Now JavaScriptChannelHandler.m  `- (void)userContentController:didReceiveScriptMessage:` arguments receive Dictionary or Array will got a string that hard to serialized like below.

```json
{
    action = do_somethineg;
    data =     {
        key_1 = some_info;
        key_2 = "some_info";
    };
    timestamp = 1570005270866;
    token = "jwt_token";
}
```

### Suggestion to modify

```objective-c
   NSString *body;
   if ([message.body isKindOfClass:[NSDictionary class]] ||
       [message.body isKindOfClass:[NSArray class]]) {
       NSData *jsonData = [NSJSONSerialization dataWithJSONObject:message.body
                                                          options:NSJSONWritingPrettyPrinted
                                                            error:nil];
       body = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
   }
   if (body.length <= 0) {
       body = [NSString stringWithFormat:@"%@", message.body];
   }

   NSDictionary* arguments = @{
     @"channel" : _javaScriptChannelName,
     @"message" : body
   };
   [_methodChannel invokeMethod:@"javascriptChannelMessage" arguments:arguments];
```

hope it will getting update soon 👍🏼
Repository: pytorch
Issue: nn.parallel.replicate in v1.1+ is much slower than v1.0
Labels: module: performance,triaged,module: data parallel

[https://github.com/pytorch/pytorch/issues/28212#issue-508340762](https://github.com/pytorch/pytorch/issues/28212#issue-508340762)

I run nn.DataParallel with only replicate operation and found that is much slower in v1.3.
For v1.0, the GPU util is 
![image](https://user-images.githubusercontent.com/28811637/67066706-41a97300-f1a6-11e9-86c0-a9c23b49a1ab.png)

and for v1.3 is
![image](https://user-images.githubusercontent.com/28811637/67066761-79b0b600-f1a6-11e9-82da-6b101571c3f3.png)



cc @VitalyFedyunin @ngimel @mruberry
Repository: flutter
Issue: Create end-to-end test for platform brightness on Android
Labels: a: tests,team,engine,P2,team-engine,triaged-engine

Create end-to-end test for platform brightness on Android.

The Android embedding is responsible for reporting Android's platform brightness to Flutter, either light or dark. This ticket is to setup an end-to-end test that verifies that real platform brightness values are correctly reported from the Android embedding to Flutter over the settings channel.
Repository: godot
Issue: Tileset Editor does not support shape transforms
Labels: bug,topic:editor,confirmed

**Godot version:**
3.2 alpha 2

**OS/device including version:**
Windows 10 64 bits

**Issue description:**
Convert to TileSet generates incorrect collision shapes when sprites have ```centered``` set to true. 
It seems to just take the ```polygon``` property inside the CollisionPolygon2D and use those values to generate the collider. 
![image](https://user-images.githubusercontent.com/526829/67071349-a5a54a80-f158-11e9-81a8-0335ee4b1b7b.png)

Disabling ```centered``` and manually redrawing the polygon will generate the correct collision shape when converting to tileset. 
![image](https://user-images.githubusercontent.com/526829/67072450-47c63200-f15b-11e9-91db-3f567b1f0c21.png)


**Steps to reproduce:**
- Open TilesetEdit.tscn and convert to TileSet saving as TileSet.tres
- Try to edit collision shapes using integrated tileset editor
Expected:
- Collision shapes should look as in TilesetEdit.tscn
Actual:
- Collision shapes are offset as if being centered in the top left of the tile

**Minimal reproduction project:**
https://github.com/godotengine/godot-demo-projects/tree/master/2d/platformer
Repository: opencv
Issue: opencv read model file size 2GB error
Labels: feature,priority: low,category: core

train a model file size over 2GB. but use model read fail get message
 "Traceback (most recent call last):
  File "try.py", line 86, in <module>
    face_recognizer.read("mingxing3000.xml")
cv2.error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\core\src\persistence.cpp:1456: error: (-215:Assertion failed) ofs == fs_data_blksz[blockIdx] in function 'cv::FileStorage::Impl::normalizeNodeOfs'"
Repository: scrcpy
Issue: scrcpy white/blank screen (only on second windows desktop)
Labels: display

I have everything working. scrcpy is connected to two windows desktops via wifi.
- on the main desktop I can see and control my android
- the second desktop is also connected and I'm able to control the android. But shows a white screen (so I can't see anything)

I've tried a lower resolution with scrcpy -m 800 -b 2M 
(nokia 7 plus, android version 9)

How can I solve this? Thx in advance :-)
Repository: kubernetes
Issue: OpenAPI definition for AdmissionReview
Labels: sig/api-machinery,kind/feature,lifecycle/frozen

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

I would like an OpenAPI schema definition for admission controllers for the purposes of generating the API types (and potentially servers or server stubs) in multiple languages.

**Why is this needed**:

Now that AdmissionReview is promoted to v1, it would be welcome if we could get an OpenAPI schema on how such an API would look like.

Currently we have a nice OpenAPI schema that is used to programmatically generate API server clients in a multitude of languages. This is great for writing components that interact directly with the API Server.

We do however have the AdmissionReview API where one does not communicate with the component indirectly by watching API resources, but instead the component is called synchronously on API resource changes.

For such use-cases it would be nice to have a separate OpenAPI schema as well, where the types can also be generated for a multitude of languages, and maybe even generate servers from them, where you only need to pass in a request handler for example.

Right now it would be sufficient to simply generate the OpenAPI spec for the AdmissionReview types though.
Repository: node
Issue: fs.chmod behaviour should change to be more expected across platforms
Labels: fs

<!--
Thank you for suggesting an idea to make Node.js better.

Please fill in as much of the template below as you're able.
-->

**Is your feature request related to a problem? Please describe.**
fs.chmod currently behaves a bit odd across different platforms:
On linux and unix like system it behaves as expected if mode<=777.
On windows on the other hand it ignores the group and other permissions, and changes the 'read-only' attribute. This is problematic because:
1. Making file readonly doesn't really prevent anyone from changing its content. one can just undo read-only. So chmod doesn't do what it meant to do; user can change the file if a write permission set elsewhere outside node. Using chmod doesn't restrict its usage.. this might also be a minor security issue. 
2. User might get the false impression that  node is compatible with windows' acl permission policy (regarding group and other permissions). Which currently isn't the case because libuv doesn't support it. Because of that, bugs which are related to other users permissions might happen.
3. User who passes numbers greater than 777 accidentally might experience random platform dependent bugs. As according the docs, "any value larger than 0o777 may result in platform-specific behaviors that are not supported to work consistently".

**Describe the solution you'd like**
1. fs.chmod will throw newly created `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` on windows.
2. Current windows logic of fs.chmod will be separated to different method fs.makeReadonly. related functionality of other platforms should be researched and used. If not found, `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` should be thrown.
3. chmod will no longer support passing modes greater than 777. An exception will be thrown instead. If for some reason in the future a new mode will be added, or will be discovered, this behavior will change.
**Describe alternatives you've considered**
any combination of 1,2,3.
Repository: rust
Issue: Confusing error msg without indication of where the error occured
Labels: A-diagnostics,A-lifetimes,A-macros,T-compiler,D-confusing

Although admittedly pretty new to Rust, the notes in this error message doesn't help me in anything other than general terms:
```
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
  |
note: first, the lifetime cannot outlive the lifetime 'a as defined on the impl at 10:19...
 --> src/msgmgr/mod.rs:10:19
  |
10| pub struct RmbMsg<'a> {
  |                   ^^
  = note: ...so that the types are compatible:
          expected msgmgr::RmbMsg<'a>
             found msgmgr::RmbMsg<'_>
  = note: but, the lifetime must be valid for the static lifetime...
  = note: ...so that the types are compatible:
          expected std::clone::Clone
             found std::clone::Clone
```
My primary issue is I don't know where the `found msgmgr::RmbMsg<'_>` line in the note: is occurring.  The secondary issue revolves around the 
```
  = note: ...so that the types are compatible:
          expected std::clone::Clone
             found std::clone::Clone
```
which I am pretty sure those two types are compatible: :)

## Meta
```
$ rustc --version --verbose
rustc 1.38.0 (625451e37 2019-09-23)
binary: rustc
commit-hash: 625451e376bb2e5283fc4741caa0a3e8a2ca4d54
commit-date: 2019-09-23
host: x86_64-apple-darwin
release: 1.38.0
LLVM version: 9.0
```
Repository: go
Issue: proposal: x/text: provide an option for compact number formatting
Labels: Proposal

The Unicode Technical Standard specifies a list of long and short [Compact Number Formats](http://www.unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats) for use in formatting truncated versions of numbers (e.g. 35K, 2M). For reference, the JSON representation of these formats in English can be viewed [here](https://github.com/unicode-cldr/cldr-numbers-modern/blob/master/main/en-US-POSIX/numbers.json#L35-L88). `x/text` implements a lot of the standard, including currency and number formatting, but there isn't currently a way to get compact formats as described.

I suggest `x/text/number` be given a `Compact` [Option](https://godoc.org/golang.org/x/text/number#Option) which can be created with either a "long" or "short" typed argument. When this option is provided and the number formatted is suitable for compacting in that locale, the compact version should instead be returned.
Repository: terminal
Issue: Conditional settings - i.e. different colors when Administrator
Labels: Issue-Feature,Area-Settings,Product-Terminal

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement
As a user, it would be nice to be able to specify different color schemes based on some conditions.

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->
For decades (ever since an errant recursive remove command executed as root) I have used light cyan on dark blue for normal command windows and bright white on red when I am operating as root or Administrator just to remind myself to be extra careful.

# Proposed technical implementation details (optional)
This notion could be generalized as conditional profiles (or conditional attributes within a profile) to be applied when a specified expression evaluates to true.  Conditional profiles (and/or attributes) would be guaranteed to be applied after all unconditional ones so they would override any default specifications, thus eliminating the need to add "else" or inverted duplicate conditionals.  Order of evaluation/application of conditionals would be undefined (or, if you really want to get wild, they could be prioritized then undefined ordering among equal priorities).

<!-- 
A clear and concise description of what you want to happen.
-->
When invoked as Administrator, any profile or attribute that was tagged as conditional based on having Administrator access would be applied; otherwise not.  In my use case, any window I opened as me would be pleasantly colored while any window opened as Administrator would be "**remember you're _ROOT_, stupid!**" colored.