sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.onnx.export error 
Labels: module: onnx,triaged,onnx-needs-info

## ❓ Questions and Help

Hello, I want to convert torch model to onnx file because of using tensorrt.
But I have one trouble with the torch.onnx.export function.
```
model = init_training_model(conf, paths.output)
model.eval()  
dummy_data = Variable(torch.randn(4, 3, 384, 1280, device="cuda:0"))  
torch.onnx.export(model.module, dummy_data, "output.onnx", export_params=True, verbose=True)  
````

When I run the codes, I have an error with some error messages.
```
Traceback (most recent call last):
  File "scripts/train_rpn_3d.py", line 347, in <module>
    main(args)
  File "scripts/train_rpn_3d.py", line 154, in main
    torch.onnx.export(rpn_net.module, dummy_data, "output.onnx", export_params = True, verbose = True)
  File "/usr/local/lib/python3.6/dist-packages/torch/onnx/__init__.py", line 132, in export
    strip_doc_string, dynamic_axes)
  File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 64, in export
    example_outputs=example_outputs, strip_doc_string=strip_doc_string, dynamic_axes=dynamic_axes)
  File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 329, in _export
    _retain_param_name, do_constant_folding)
  File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 213, in _model_to_graph
    graph, torch_out = _trace_and_get_graph_from_model(model, args, training)
  File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 171, in _trace_and_get_graph_from_model
    trace, torch_out = torch.jit.get_trace_graph(model, args, _force_outplace=True)
  File "/usr/local/lib/python3.6/dist-packages/torch/jit/__init__.py", line 256, in get_trace_graph
    return LegacyTracedModule(f, _force_outplace, return_inputs)(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/jit/__init__.py", line 325, in forward
    torch._C._tracer_exit(tuple(out_vars))
RuntimeError: output of traced region did not have observable data dependence with trace inputs; this probably indicates your program cannot be understood by the tracer.
```

But I don't know how to solve the error "RuntimeError: output of traced region did not have observable data dependence with trace inputs; this probably indicates your program cannot be understood by the tracer". 

Any issues in the torch repository don't solve the error. 
Please help me solve this error. 

Thank you

### Setup
python 3.6
torch==1.2.0
torchvision==0.4.0
cuda 10.0
Ubuntu 18.04


cc @BowenBao @neginraoof
Repository: create-react-app
Issue: How do I test the PWA in realtime which is made with npx create-react-app --template cra-template-pwa?
Labels: stale

### Discussed in https://github.com/facebook/create-react-app/discussions/11484

<div type='discussions-op-text'>

<sup>Originally posted by **akash07k** September 27, 2021</sup>
So as the subject line says, I'm struggling with the PWA made with the create-react-app.
I used the pwa template and when I'm doing npm start, then my service worker is not being executed/started.
However, if I'm building the app and then hosting it via serve (npm run build && serve -s build) then service worker is executing and starting fine.
Here my question is that it is very painful to build the app again and again even after a minor change in the app/service worker.
So it is not practical to test the built app as we won't be able to test our changes to service worker in realtime.
Any solution to this?
I want to continuously develop my app as well continuously test the changes in the service worker without building the app again again.
It becomes very challenging if we are doing some experiment with the service worker and our code requires constant change to the service worker or other related app files.</div>
Repository: pytorch
Issue: Indicate support for more general use of `pos_weight` in binary cross entropy
Labels: module: docs,module: nn,triaged,actionable

## 📚 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 documentation for `torch.nn.BCEWithLogitsLoss` and `torch.nn.functional.binary_cross_entropy_with_logits`, the description for the parameter `pos_weight` says that it needs to be a vector with length equal to the number of classes. This implies that the same weights will be applied to each element in the batch, and that the more general case of using different weights for each batch element isn't supported. However, it turns out that the more general case *is* supported, that is, the following both work correctly:
```python
x = torch.rand(2, 4, requires_grad=True)
y = torch.randint(0, 2, (2, 4)).float()
w = torch.rand(2, 4)

z1 = torch.nn.functional.binary_cross_entropy_with_logits(x, y, pos_weight=w[0])
z1.backward()
print(x.grad)
x.grad.zero_()

z2 = torch.nn.functional.binary_cross_entropy_with_logits(x, y, pos_weight=w[:])
z2.backward()
print(x.grad)
```
In light of this, I feel like the documentation should be updated to reflect the general case of allowing different weights per batch element. (I needed this functionallity and ended up implementing my own BCE function, before realizing during testing that I didn't need to implement my own after all).

cc @brianjo @mruberry @albanD @jbschlosser @walterddr
Repository: go
Issue: x/net/http2: if (*ClientConn).encodeHeaders returns an error, roundTrip doesn't clean up streams map, etc
Labels: NeedsInvestigation

If you send try to RoundTrip a bogus request that trips up `(*ClientConn).encodeHeaders`, the `(*ClientConn).roundTrip` function returns without cleaning up the `cc.streams` map, etc.

/cc @neild
Repository: TypeScript
Issue: Inlay should show at start when use ...arguments parameters
Labels: Suggestion,In Discussion,Domain: Inlay Hints

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version:
Version : 1.60.1 (user setup)
Commit : 83bd43bc519d15e50c4272c6cf5c1479df196a4d
Date : 2021-09-10T17:07:10.714Z
Electron : 13.1.8
Chrome : 91.0.4472.164
Node.js : 14.16.0
V8 : 9.1.269.39-electron.0
OS : Windows_NT x64 10.0.19042
- OS Version:
Win10

Steps to Reproduce:

Inlay should show at start of `(` when use `...arguments` parameters.
Actually, in some specific case, it make hard to read (let say unreadable)

![image](https://user-images.githubusercontent.com/24865815/133942094-2b5d0b63-04c4-4b53-b3ad-9956e2a42ae5.png)

Ideally i want keep the indentation and inlay's should show only on redlines here
![image](https://user-images.githubusercontent.com/24865815/133942204-c279cc5b-9778-4ab0-b6ec-f785d6f3fdf2.png)

thanks
Repository: rust
Issue: Uniquely identify CGU's and accurately track their size and merges
Labels: A-codegen,T-compiler,C-feature-request

## Overview

This issue is in relation to [optimizing codegen scheduling](https://github.com/rust-lang/rust/issues/89281). To better profile codegen and see where/what we need to optimize, we need to get metrics for individual codegen units. We can uniquely identify CGU's using their names, so there is already a mechanism for tracking individual CGU's.

## CGU Size

Tracking CGU size by itself should not be too hard; at some arbitrary point in time we determine the CGU's size and map this quantity to a CGU ID for later lookup. @Mark-Simulacrum mentioned that we should have support for knowing if a CGU is big just because, or because it absorbed other CGU's; and that this is something that should be displayed on perf.r-l.o. my guess is we can do this using a similar structure to what's already in place in `SelfProfiler`:

```rust
pub struct SelfProfiler {
    profiler: Profiler,
    event_filter_mask: EventFilter,

    string_cache: RwLock<FxHashMap<String, StringId>>,

    query_event_kind: StringId,
    generic_activity_event_kind: StringId,
    incremental_load_result_event_kind: StringId,
    incremental_result_hashing_event_kind: StringId,
    query_blocked_event_kind: StringId,
    query_cache_hit_event_kind: StringId,
    /*** NEW ***/
    codegen_unit_merge_event_kind: StringId,
}
```

However, as I understand it, this approach ignores tracking _which_ CGU's have been merged together and just informs
us _when_ and _where_ a merge has occurred; shouldn't we also know _what_ got merged? Or does using a `CodegenUnitId` solve this?

Lastly, it has been mentioned that the size metric is not currently accurate, and that the quantity of LLVM instructions
might not provide enough insight. Until I know more, I plan on using CGU instruction count as the size metric.

## To Do

- [x] identify individual CGU's
- [ ] Change size metric to reflect inst counts of CGU's
- [ ] Add support for tracking which CGU's have been merged; and where and when it happened.


cc @Mark-Simulacrum
Repository: go
Issue: runtime/pprof: TestTimeVDSO is flaky on android builders
Labels: OS-Android,NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- goos == "android" && test == "TestTimeVDSO"
```

CL https://go-review.googlesource.com/c/go/+/337590 added a test TestTimeVDSO. But it is flaky on Android builders. I'll look into it.
Repository: flutter
Issue: Test Engine custom toolchain support on CI
Labels: a: tests,engine,e: embedder,P2,team-engine,triaged-engine

We should test on CI that building the Engine with a custom toolchain and sysroot continue to work (that is, that the gn and ninja steps here https://medium.com/flutter/flutter-on-raspberry-pi-mostly-from-scratch-2824c5e7dcb1 continue to work). One way to do that might be to use the Linux clang toolchain we already pull and use it to build a libflutter_engine.so for armv7.
Repository: godot
Issue: Slow abs() functions could be replaced by standard ones
Labels: enhancement,topic:core,performance

### Godot version

3.x 65ab9130e1e323b43b94f3336a58b6c6e7681c28

### System information

OS: Arch Linux, CPU: Ryzen 5, GUP: RX 480

### Issue description

I have noticed a long time ago that Godot's `abs()` function has a custom definition. This seems to be quite slower than the standard one.

Here is the result of a benchmark before and after replacing those definitions with the standard one.
![Screenshot_20210927_215150](https://user-images.githubusercontent.com/5478365/134988495-bd0e8b62-85f0-41eb-9c58-e3e51d87e362.png)
![Screenshot_20210927_220606](https://user-images.githubusercontent.com/5478365/134988510-6e8e25e7-a45f-447c-ae22-561728ea86d8.png)

So I get ~1% performance gain in that benchmark with the standard abs function from `cmath`. Not bad just for removing a few lines of code.

Note that the difference only shows up when using GodotPhysics and having a lot of bodies, so it's probably not a big deal for Godot 3.x when using Bullet, but given GodotPhysics is being improved for Godot 4 it might be worth making this small change, unless of course there is a reason for these uncommon abs() functions (maybe they were performing better on some old architecture?).

Here is the generated machine code:

Standard abs(): https://godbolt.org/z/5nG635fvE
Godot's abs(): https://godbolt.org/z/dxjj7n397

### Steps to reproduce

Use GodotPhysics with lots of bodies.
Benchmark using `perf`.
Look for the Math::abs() function call.

### Minimal reproduction project

_No response_
Repository: material-ui
Issue: ButtonGroup's grouped min-width css specificity overridden from root
Labels: docs,component: ButtonGroup,ready to take,v5.x migration

Seems like ButtonGroup's `grouped` css specificity is off, overridden by `root` for `min-width`.

## Current Behavior

In style, `minWidth` set to 24px:

```js
buttonGroup: {
  minWidth: 24
}
```

In component using `grouped`:

```jsx
<ButtonGroup classes={{ grouped: classes.buttonGroup }}>
  <Button />
```

My grouped button size is overridden by `.MuiButtonGroup-root .MuiButtonGroup-grouped`

![image](https://user-images.githubusercontent.com/1213591/134988338-1951383d-c295-4456-ad9f-1f47ccdd76e7.png)

The only way I can specify width of buttons in each button group is via `root` with `.MuiButtonGroup-grouped` combination:

```js
buttonGroup: {
  '& .MuiButtonGroup-grouped': {
    minWidth: 24
  }
}
```

In component using `root`:

```jsx
<ButtonGroup classes={{ root: classes.buttonGroup }}>
  <Button />
```

![image](https://user-images.githubusercontent.com/1213591/134990331-382accbb-d1a5-4391-86f5-92ce10d0c3d5.png)

Complex even when `root` and `grouped` combinators try to override this value:
![image](https://user-images.githubusercontent.com/1213591/136285087-ad6188b5-c8e8-4b71-9322-a91cb6792826.png)


## Expected Behavior

I would expect `grouped` specificity to override root's grouped combinator.

Maybe I'm not doing this correctly, but applying css directly to buttons is overridden as well.

## Steps to Reproduce

Steps:

1. Create a button group with buttons
2. Specify `grouped` css property for button group
3. In the `grouped` css, try to reset the `minWidth`

How it worked in v4:
https://codesandbox.io/s/confident-villani-mytyt?file=/src/App.js

No longer working in v5:
https://codesandbox.io/s/funny-lucy-qts3h?file=/src/App.js

## Context

Trying to size (width / height) buttons inside a `ButtonGroup` for visual presentation.

Upgrading from v4 to v5 - this worked previously; although, would have implemented differently starting fresh in MUI 5.

## Your Environment

```yml
  System:
    OS: macOS 10.15.7
  Binaries:
    Node: 15.3.0 - /usr/local/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 7.0.14 - /usr/local/bin/npm
  Browsers:
    Chrome: 93.0.4577.82
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1 
    @emotion/styled: ^11.3.0 => 11.3.0 
    @types/react:  17.0.20 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
```
Repository: flutter
Issue: Use app deltas for prebuilt binaries for faster and smaller incremental iOS app installs
Labels: c: new feature,platform-ios,tool,t: xcode,P3,team-ios,triaged-ios

https://github.com/flutter/flutter/pull/77756 implemented app deltas for newly compiled apps (the common `flutter run` case), but not pre-build binaries via `flutter run --use-application-binary`.

The biggest piece of this is deciding where to store the app delta directory.

Supersedes https://github.com/flutter/flutter/issues/67580.
Repository: godot
Issue: Using duplicate(true) on resource has different behavior in editor and in exported project with scripts set to Compiled mode
Labels: bug,topic:gdscript,topic:export

### Godot version

3.3.2 stable

### System information

Windows 10 64-bit

### Issue description

I'm using the duplicate function to duplicate a resource, I need a temporary copy to delete and mess with, while keeping the original so I can restore it when needed:

`dialogue.DialogueResource = DialogueResource.duplicate(true)`

The resource is a custom resource with two arrays and one dictionary.

This works fine in-editor or when exported with export mode set to "text", but when exported with export mode set to "compiled," suddenly it isn't copying over correctly and throws an error when I try to access the dictionary (DialogueTree):

`SCRIPT ERROR: start_dialogue: Invalid get index 'DialogueTree' (on base: 'Resource ()').`

The resource path and name are preserved but somehow this extra data is being lost.

Setting it equal like this: `dialogue.DialogueResource = DialogueResource` works but for my purposes it isn't useful, since it means changing one will change the other. Using false instead of true in the parameter also works, but again has the same problem.

### Steps to reproduce

- Create a custom resource with a variable (Tested with Array and Dictionary)
- Copy the resource to a variable using .duplicate()
- Try to access the dictionary from the copied resource

### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: [Keyboard Manager] Add an option for remapped keys to return to default when a modifier key is pressed
Labels: Idea-Enhancement,Help Wanted,Product-Keyboard Shortcut Manager

### Description of the new feature / enhancement

When keys have been remapped, it throws off remapped shortcuts that use those keys. For example, if you remap <kbd>S</kbd> to <kbd>D</kbd> and <kbd>D</kbd> to <kbd>S</kbd>, when clicked they oddly enough do not remap in an infinite loop to each other, but they do remap all associated shortcuts ("save" becomes physical keys <kbd>Ctl</kbd>+<kbd>D</kbd>). Another example, if I have <kbd>VolDown</kbd> mapped to <kbd>Mute</kbd> and want <kbd>Alt</kbd>+<kbd>VolDown</kbd> to do <kbd>VolUp</kbd>, then I would have to change the remapped shortcut to <kbd>Alt</kbd>+<kbd>Mute</kbd>. It creates a big mess because a simple key remapping changes common default shortcuts (like the above illustration, "save" turns into <kbd>Ctl</kbd>+<kbd>D</kbd>) meaning simple shortcuts have to be remapped to stay default from key changes, and then custom remapped shortcuts don't work because the keys they use are remapped, so you have to remap your remapped shortcuts to the included remapped keys.

### Scenario when this would be used?

Beyond the illustrations given above, I run into issues with this scenario because I want to remap <kbd>PrtScn</kbd> to be <kbd>Win</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> [Screen Snip] and <kbd>Win</kbd>+<kbd>PrtScn</kbd> to be <kbd>PrtScn</kbd> [Screenshot]. Because remapped shortcuts act on the remapping of the key involved, when I press <kbd>Win</kbd>+<kbd>PrtScn</kbd>, Windows receives <kbd>Win</kbd>+{<kbd>Win</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>}. Trying to bypass this creates another problem because a shortcut cannot contain more than two modifiers/3 keys, so I couldn't even create my <kbd>PrtScn</kbd> shortcut since <kbd>Win</kbd>+<kbd>Win</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> is not allowed. But that wouldn't work anyway because the key that whole thing is remapped to is <kbd>PrtScn</kbd> making it again output <kbd>Win</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> [Screen Snip]. So, the only way to solve these problems is if there is an option to disable key remappings (or return remapped keys to default) when a modifier key is pressed so that I could have <kbd>PrtScn</kbd> remapped AND be able to remap <kbd>Win</kbd>+<kbd>PrtScn</kbd> without running into a problem. This would also fix problems with nonremapped shortcuts unintentionally changing like <kbd>Ctl</kbd>+<kbd>S</kbd> in the case of <kbd>S</kbd> being remapped.

Read about the whole thing in the issue and comments over at #13341 to see get more insight and see how other default shortcuts like <kbd>Alt</kbd>+<kbd>PrtScn</kbd> are affected in the whole mess.

### Supporting information

I laid my issues out in #13341 thinking that it was a bug when it is just the normal behavior.
Repository: TypeScript
Issue: generic inferred from `keyof` has value of implicit `any` when `noImplicitAny` is `true`
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

keyof generic noImplicitAny

### 🕗 Version & Regression Information
4.5.0-dev.20210927

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.5.0-dev.20210927#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVAPgAoA3KCZEALngGsQBPHReEgSiZIBQAsHgDOGeACNY8ALwEcFAORRRwREp7wA9NoxsADgiyj4Ab3ir1TKKjbwAvkA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
declare function foo<T>(value: keyof T): T

const bar = foo('asdf') //type is { asdf: any }
```

### 🙁 Actual behavior

type is inferred as `{ asdf: any }`

### 🙂 Expected behavior

type is inferred as `{ asdf: unknown }`, or a `noImplicitAny` error occurs
Repository: vscode
Issue: SCM - Add an `actionButton` property to the SourceControl api
Labels: feature-request,api,scm,api-finalization

Refs: #110882

This proposal adds a new `actionButton` property to the `SourceControl` object, to allow SCM extensions to contribute a large "cta" style button to a repository.

Here is the proposed api addition:
```ts
export interface SourceControl {
	actionButton?: Command;
}
```

This is currenty being used by the built-in Git extension to provide the "Publish Changes" or "Sync Changes" button when there are unpublished or unpushed commits.
Repository: go
Issue: x/net/http2: conn_PROTOCOL_ERROR_reset_idle_stream
Labels: NeedsInvestigation

I have a Go HTTP/2 client & server load balancer front-end, talking to an HTTP/2 server backend.

6 days ago, running code from x/net HEAD at the time, I saw a few instances of the server backend's error counter `conn_PROTOCOL_ERROR_reset_idle_stream`.

That is, a Transport (also x/net/http2 at same rev) sent a RSTStream frame to the server for a stream that was "idle" as far as the server was concerned, so the server hung up on the client.

/cc @neild
Repository: pytorch
Issue: pytorch mobile: some quant models on android cause memory leak
Labels: module: android,oncall: mobile

I'm using pytorch 1.9.0, build mobile static libs by using script/build_pytorch_android.sh and use those libs in my android native project.