sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: error in quantization by quantize_fx.prepare_fx
Labels: triaged,module: fx

Hi, for quantization of YOLOv5 as pytorch doc suggest, I used this code:


import torch
model= torch.hub.load('ultralytics/yolov5', 'yolov5s')

import torch.quantization.quantize_fx as quantize_fx
import copy

#
# post training static quantization
#
model_to_quantize = copy.deepcopy(model)
qconfig_dict = {"": torch.quantization.get_default_qconfig('qnnpack')}
model_to_quantize.eval()
# prepare
model_prepared = quantize_fx.prepare_fx(model_to_quantize, qconfig_dict)
# calibrate (not shown)
# quantize
model_quantized = quantize_fx.convert_fx(model_prepared)

but this error was raised:

TraceError                                Traceback (most recent call last)
<ipython-input-8-7eebfc3c96ab> in <module>()
      7 model_to_quantize.eval()
      8 # prepare
----> 9 model_prepared = quantize_fx.prepare_fx(model_to_quantize, qconfig_dict)
     10 # calibrate (not shown)
     11 # quantize

6 frames
/usr/local/lib/python3.7/dist-packages/torch/fx/proxy.py in to_bool(self, obj)
    150         information to the graph node using create_node and can choose to return a value.
    151         """
--> 152         raise TraceError('symbolically traced variables cannot be used as inputs to control flow')
    153 
    154     @compatibility(is_backward_compatible=True)

TraceError: symbolically traced variables cannot be used as inputs to control flow

what's the problem? (I write this code in colab)

cc @ezyang @SherlockNoMad
Repository: rust
Issue: Performance regression since `nightly-2022-03-05`
Labels: I-slow,P-low,T-compiler,regression-from-stable-to-stable,C-bug,E-needs-mcve

Today I checked performance of one of the libraries I am working on and found that its performance has regressed by roughly 50%.

Since there have not been any changes to the code since I checked last time I was confused about this.
I bisected `rustc` versions until I found the version where the regression started: `nightly-2022-03-05`
`nightly-2022-03-03` was still fine.
The problem persists in the most recent Rust nighty: `nightly-2022-03-28`

The project that experiences the severe performance regression is [wasmi: WebAssembly Interpreter](https://github.com/paritytech/wasmi).
I ran benchmarks using:
```
cargo bench
```
In particular (faster results than running the entire suite)
```
cargo bench tiny_keccak/v1
```
Git commits used for my benchmarks:
- `805ff4ef4a7db59d6aa117218a5ca79f672db2c1` (2022-03-28)
- `29110ed2469702b23ea6263e1a936eb2af6701c6` (2022-02-20)

In [a previous issue](https://github.com/rust-lang/rust/issues/93321) I already highlighted that the same project has a fragile performance nature (heavily reacts to slight changes/optimizations/regressions) and was especially fine tuned using the following profile:
```toml
[profile.bench]
lto = "fat"
codegen-units = 1
```
Repository: go
Issue: crypto/x509: "certificate is not standards compliant" on MacOS
Labels: OS-Darwin,NeedsInvestigation

We hit an error with a unit test we had in Kubernetes and started looking at the impact on end users of kubernetes if the problem is not resolved by the time kubernetes 1.24 is released. More context: please see Kubernetes issue - https://github.com/kubernetes/kubernetes/issues/108956

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18 darwin/arm64
</pre>

### Does this issue reproduce with the latest release?
Yes.


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/dims/Library/Caches/go-build"
GOENV="/Users/dims/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/dims/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/dims/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qw/pkzvlrfs7rn7h6r1x7r57_rw0000gn/T/go-build1513460199=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

### What did you do?
Please see https://go.dev/play/p/w4rr43vQv7d

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->



### What did you expect to see?
`success`


### What did you see instead?
`error: x509: “no-sct.badssl.com” certificate is not standards compliant`
Repository: pytorch
Issue: Enable dtype keyword argument for to_dense method
Labels: module: sparse,triaged,enhancement

Native `to_dense` supports dtype keyword argument:

https://github.com/pytorch/pytorch/blob/7bb0133b8cd2793e30341c0c8b9e5202921aece3/aten/src/ATen/native/native_functions.yaml#L5339

that is not [documented](https://pytorch.org/docs/master/generated/torch.Tensor.to_dense.html?highlight=to_dense#torch.Tensor.to_dense) nor supported:
```python
>>> import torch
>>> torch.tensor([1, 0, 2]).to_sparse().to_dense(dtype=float)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: dtype argument is not supported by sparse_to_dense
```

Enabling the `to_dense(dtype)` support should be straightforward, see https://github.com/pytorch/pytorch/pull/74486#discussion_r836439395 .


cc @nikitaved @pearu @cpuhrsch
Repository: youtube-dl
Issue: I can not open YouTube-dl on M1 MacBook Air
Labels: documentation,question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [ ] I'm asking a question
- [ ] I've looked through the README and FAQ for similar questions
- [ ] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

WRITE QUESTION HERE
When I try to run YouTube-dl from the terminal on my M1 MacBook Air, I get the following message:
env: python: No such file or directory.

I have re-installed Python and can use it through the IDLE app.

I have followed suggestions to try:
sudo ln -s /usr/bin/python3 /usr/bin/python

This gives the message:
ln: /usr/bin/python: Operation not permitted
Repository: TypeScript
Issue: New type for tuples which have mutable properties but can't be mutated with array methods
Labels: Suggestion,Awaiting More Feedback

# Suggestion

As the https://github.com/microsoft/TypeScript/issues/6325 has been declined to avoid breaking existing codes; I would suggest that we have a "strictTuple" type that denies those array methods on tuples.
<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms 
<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

tuple methods

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion
```
type StrictTuple<T extends any[]> =
    Omit<T, keyof (any[])> extends infer O ? { [K in keyof O]: O[K] } : never;
```
<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

```
const x: StrictTuple<[number, string]> = [1, ""] // {0: number; 1: string }
x[1] = "okay";
x[0] = 123;
x.push(123); // error!
//~~~~ Property 'push' does not exist on type { 0: number; 1: string; }
```
<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

## 💻 Use Cases

At the moment, we avoid using array methods like push, pop, shift, unshift when using tuples.
The suggestion above will give developers the option to keep the array methods on tuples or not.

Reference: https://stackoverflow.com/a/64070080/1883323
<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->
Repository: flutter
Issue: [autosubmit] upstream package:github for app installation
Labels: team-infra,P2,triaged-infra

Upstream package:github for app installation.
Repository: PowerToys
Issue: [Always on Top] Unable to shift + del file as dialogue box disappears beneath windows explorer
Labels: Idea-Enhancement,Product-Always On Top

### Microsoft PowerToys version

0.56.2

### Running as admin

- [X] Yes

### Area(s) with issue?

Always on Top

### Steps to reproduce

Open windows explorer and navigate to the file that you want to delete.
Press shift+ delete 



### ✔️ Expected Behavior

The "Are you sure you want to delete" dialogue box should appear above the window temporarily till it is deactivated.

### ❌ Actual Behavior

The "Are you sure you want to delete" dialogue box appears below the window making it a hassle to reach.

### Other Software

_No response_
Repository: transformers
Issue: TEAMS: Training ELECTRA Augmented with Multi-word Selection
Labels: New model

Hi,

this [ACL paper](https://arxiv.org/abs/2106.00139) from last year (2021) proposed an ELECTRA extension:

> Pre-trained text encoders such as BERT and its variants have recently achieved state-of-the-art performances on many NLP tasks. While being effective, these pre-training methods typically demand massive computation resources. To accelerate pre-training, ELECTRA trains a discriminator that predicts whether each input token is replaced by a generator. However, this new task, as a binary classification, is less semantically informative. In this study, we present a new text encoder pre-training method that improves ELECTRA based on multi-task learning. Specifically, we train the discriminator to simultaneously detect replaced tokens and select original tokens from candidate sets. We further develop two techniques to effectively combine all pre-training tasks: (1) using attention-based networks for task-specific heads, and (2) sharing bottom layers of the generator and the discriminator. Extensive experiments on GLUE and SQuAD datasets demonstrate both the effectiveness and the efficiency of our proposed method.

Implementation is available in the TensorFlow models repository: https://github.com/tensorflow/models/tree/master/official/projects/teams

I would like to work on that, to see if it can easily be added (e.g. only writing a model conversion script).

Unfortunately, no model weights do exist at the moment. So I would like to pre-train a model and check if conversion can be done without changing the current ELECTRA implementation too much.

This issue tracks the integration into Transformers :hugs:
Repository: flutter
Issue: `flutter analyze` doesn't show correction message
Labels: c: new feature,tool,P3,team-tool,triaged-tool

The analyzer can provide correction message to give users actionable advice about how to go about correcting a reported issue. Example: The lint `experiment_not_enabled` comes with the following actionable correction message:

Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17.0 or higher, and running 'pub get'.

It is surfaced in IDEs and when using `dart analyze`. However, when running `flutter analyze` the correction message is not included in the output. Instead, users are only left with a description of the problem, which is often not super actionable. For the example above, the problem description is just:

This requires the 'super-parameters' language feature to be enabled.
Repository: tensorflow
Issue: Known issues with new RUN_EAGER_OP_AS_FUNCTION feature
Labels: stat:awaiting tensorflower,type:others,comp:tf.function

This refers to the unified eager op/tf.function execution mode available for optional use in 2.9.

Tracking known issues here:

1. With CUDA enabled, unnecessary data transfers to/from the GPU causing additional slowdowns. (already under investigation)
Repository: godot
Issue: Non-static superclass methods are callable from within static child methods
Labels: bug,topic:gdscript

### Godot version

3.4.4.stable.official

### System information

Fedora 31

### Issue description

When calling a superclass method from within a static method, the superclass method may or may not be static but will be called nonetheless.

```
extends Node2D

class Parent:

    func foo():
        print("Parent.foo")

class Child extends Parent:

    static func static_foo():
        .foo()

func _ready():
    Child.static_foo()
```

In `_ready`, I never construct an instance of either `Parent` or `Child`, but I successfully call the non-static function `Parent.foo`, which prints `Parent.foo` to the console. I would expect this situation to issue an error, either at compile-time or at runtime, depending on how early Godot can manage to catch it.

Note that if `func foo()` actually *uses* `self` anywhere (for instance, if we change the implementation in the above snippet to be `print(self)`), then we do get a runtime error when `self` is used in a static context, but if it doesn't directly use `self` then this mistake goes unnoticed.

### Steps to reproduce

Run the scene called `StaticBug` in the attached ZIP project. I expect an error to occur, but the scene runs normally and prints `Parent.foo` at startup, despite no instances of that class existing in the runtime.

### Minimal reproduction project

[static bug.zip](https://github.com/godotengine/godot/files/8367069/static.bug.zip)
Repository: kubernetes
Issue: Clean up audit logging
Labels: kind/cleanup,sig/api-machinery,sig/auth,area/audit,triage/accepted

Problems with audit logging:
1. Information is added to the context in stages, and it's not clear what is available at a given time.
2. 4 separate pieces of audit info are stored on the context (ID, AuditContext, annotations, and mutex with https://github.com/kubernetes/kubernetes/pull/109078)
3. Audit logic is scattered across the code, and often mutates the shared audit event directly.

Proposal:
- [x] Register an AuditContext interface as the very first step (audit ID step)
- [ ] Audit context exposes a series of write-only thread-safe methods for recording information from different points in the request chain
- [ ] Audit stages will be executed against the audit context, instructing it to generate an audit event with the information it has at that point.

This should clean up the code and make it less order dependent.
Repository: pytorch
Issue: Problematic ASGD Optimizer
Labels: module: optimizer,triaged,enhancement,module: LrScheduler

### 🐛 Describe the bug

I saw an "Optimizers documentation tracking issue" https://github.com/pytorch/pytorch/issues/63236. But ASGD is overlooked. Sadly, there is at least three problems in ASGD optimizer:

1. The learning rate of ASGD optimizer cannot be scheduled by lr_scheduler
1. In [document](https://pytorch.org/docs/stable/generated/torch.optim.ASGD.html), "eta" is indeed the "current learning rate".
2. Argument "lambd" and "weight_decay" are almost all the same: "lambd" itself is already the coefficient of L2 regularization. The only difference is that "lambd" is used to update the eta (a.k.a. learning rate) in the ASGD Optimizer built-in lr scheduling strategy. However, ASGD, as an optimizer, should not be coupled with any given lr scheduling strategy (that is why lr scheduler exists). Once the learning rate can be controled by lr scheduler, "lambd" and "weight_decay" will be completely all the same. (See [the first ASGD version](https://github.com/pytorch/pytorch/commit/554a1d83365cf80d8676686e8fcc190c0c95d1a9) and [bottou-sgd](https://github.com/npinto/bottou-sgd/blob/master/README.txt) for the origin of "lambd" and "eta")


### Versions

master

cc @vincentqb @jbschlosser @albanD
Repository: PowerToys
Issue: Configurable timeout to deactivate FancyZones
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

This feature requires that FancyZones be configured to activate zones upon dragging a window.

The feature is to add a setting in FancyZones:
1. Activate zones for only X seconds after which it will self deactivate, e.g. 1 second
2. OR to deactivate zones after a configurable timeout, e.g. 1 second


### Scenario when this would be used?

There are times when we need to move a window to a zone, or just slightly, perhaps to reveal something
How this helps is that, 

1. If we want to move it to a zone, it is a very quick action since no precision is needed, i.e. usually under 1 second
4. If we hold the drag for over 1 second, FancyZones will now deactivate and let us drag a window as per normal

This gives us the best of both worlds, being able to drag a window normally and also move it into a zone with just 1 finger. Furthermore, if the zone is too far from the current monitor, user can easily move it nearer first, and intiate the drag again to drop it into a zone. 

Feel free to engage me on other possible scenarios, but I don't see any downside to this at the moment.

### Supporting information

_No response_
Repository: go
Issue: x/tools/gopls: consider to turn off `buildvcs` inside gopls
Labels: NeedsInvestigation,FeatureRequest,gopls,Tools,gopls/metadata

### gopls version

golang.org/x/tools/gopls v0.8.1
compiled with go1.18 (google-golang)

### What did you do?

We have a project that has a third-party go project as its git submodule.

```
my_project
  +--- go.work
  +--- their_project
               +--- go.mod
               +--- main.go
```

go.work has only `./their_project` in it.

I  opened vscode from `my_project` , so gopls sees `my_project` as the workspace root.

### What did you expect to see?

Working normally.

### What did you see instead?

All go files in the their_project directory get errors with source `go list`.
gopls log:

```
[Trace - 23:38:54.242 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/hakim/projects/my_project/their_project/cmd/tester/main.go",
"diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},
"severity":1,
"source":"go list",
"message":"error obtaining VCS status: main package is in repository 
\"/home/hakim/projects/my_project/their_project\" but current directory is in repository 
\"/home/hakim/projects/my_project\"\n\tUse -buildvcs=false to disable VCS stamping."}]}
```

I understand this is an error message from `go`, and I can work around by disabling the `buildvcs` flag.
 
However, what's puzzling is, if I run `go list` from `their_project`, it runs without an error.

```
$ go list ./triage-party/...
error obtaining VCS status: main package is in repository "/home/hakim/projects/my_project/their_project" but current directory is in repository "/home/hakim/projects/my_project"
        Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: main package is in repository "/home/hakim/projects/my_project/their_project" but current directory is in repository "/home/hakim/projects/my_project"
        Use -buildvcs=false to disable VCS stamping.

$ cd ./triage-party; go list ./...
go list ./...
github.com/they/their_project/cmd/server
...        
```

I don't know what's right default behavior for the go command (this is probably a niche use case) cc @bcmills 

but these confusing error messages make me think `gopls` disable vcs build stamping by default when running go commands. 
(why does gopls have to care about build stamping?)
Repository: storybook
Issue: Testing application routing with play function
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
I would like to test application routing  (I am using next.js) with the new storybook feature: "play function"

**Describe the solution you'd like**
I see the route output from addon-actions panel, maybe I can get what is logged there?
Repository: pytorch
Issue: torch.fx.wrap will not work, when encapsulate the code
Labels: triaged,module: fx

### 🐛 Describe the bug

a.py
```python
import torch
import torch.fx
from math import sqrt

def normalize(x):
    return x / sqrt(len(x))

torch.fx.wrap('len')
torch.fx.wrap('sqrt')
```

setup.py
```python
from distutils.core import setup
from Cython.Build import cythonize

setup(name='a', ext_modules=cythonize(['a.py']))
```

python setup.py build_ext --inplace  // get a.so

b.py
```python
from a import *
normalize(torch.randn(3, 4))
traced = torch.fx.symbolic_trace(normalize)
```

python b.py

a error from _symbolic_trace.py

```
AssertionError
```


### Versions

get a.so file :

python setup.py build_ext --inplace

run b.py file:

pyrhon b.py


cc @ezyang