sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: New c10 constants
Labels: module: internals,triaged

### 🚀 The feature, motivation and pitch

It would be extremely helpful if c10 exposed constants beyond `c10::pi` for all the PyTorch dtypes. Minimally, the GNU predefined constants would suffice but I would advocate for something _slightly_ more expansive like NumPy or Boost. It would also provide the benefit of having consistent representations (e.g., implementors using different representations of constants).

### Alternatives

Continue to inline constants.

### Additional context

I use a lot of constants when implementing PyTorch functions (e.g., special functions)!

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh
Repository: pytorch
Issue: [primTorch] Sensible Error Messages
Labels: triaged,module: primTorch

In PyTorch today we typically write error messages as follows:

```
torch.foo expected X, but saw Y!
```

When an operator is implemented as a composite of other operations this often causes a choice to be made:

- either the operator has to redundantly implement error checks to produce a reasonable error message
- it has to rely on its constituent operators to throw errors appropriately, and for users to understand that the error generated from `torch.bar` is happening because `torch.foo` calls `torch.bar`

Neither of these solutions is great, of course, and we should decide which approach we want to pursue and how to improve it.

**Option 1: Each operator implements its own error checks.**

This would allow most error messages to be high quality, but...

- we'd want a mechanism to avoid redundant error checks (because they could be expensive)
- internal assertions (which usually involve obscure derived computations that operators shouldn't expect to emulate) will still produce odd error messages
- this approach also requires operators using another operator update whenever the error checks for the used operator update, too. For example, if torch.foo uses torch.bar, and torch.bar changes the input it accepts, then torch.foo will have to be explicitly updated, too, which is a potential maintenance headache

**Option 2: Operators rely on their constituents to generate errors wherever possible.**

This avoids redundant error checks and allows operators to inherit behavior updates, but...

- we'd want a mechanism to improve error message quality

**Proposal**

The second option seems preferable to me, but it requires developing a mechanism to improve error message quality (likely some kind of error context), and we need to be sure that it doesn't have a performance impact.

I can't imagine any mechanism that will correct all error message oddities, however. While it's straightforward to do things like cite the original operation the user called, messages with derived values seem very hard to improve. For example, let's say `torch.foo` has a parameter `height` that it passes to `torch.bar`'s `width` parameter as `width=(height/2)`. Then if that `width` is invalid the user will see an error about `width`, even though they specified `height`!

For those cases we can continue to add additional, redundant error messages,

cc @ezyang @mruberry @ngimel
Repository: pytorch
Issue: Test approximation and numerical stability of numerical operators 
Labels: module: numerical-stability,triaged,module: testing

### 🚀 The feature, motivation and pitch

It would be nice if there was an automated way for us to report the approximate error of our numerical operators and a way to annotate the OpInfo for the operator with the expected error bounds. It’d be even nicer if there was a way to annotate error bounds for specific intervals (e.g., -1.0 and 1.0).

### Alternatives

We’ve made it this far!

### Additional context

_No response_
Repository: pytorch
Issue: Add a gallery of examples with sphinx-gallery
Labels: module: docs,triaged

### 📚 The doc issue

A cornerstone of numeric and scientific Python libraries is a gallery of concise, straightforward examples that are longer than per-function examples but shorter than our current [tutorials](https://pytorch.org/tutorials/index.html). They usually have an entirely visual navigation (extremely useful for pattern matching). It would be nice if we could also provide this functionality.

Here are some examples:

[scikit-image](https://scikit-image.org/docs/stable/auto_examples/)
[scikit-learn](https://scikit-learn.org/stable/auto_examples/index.html)
[statsmodels](https://www.statsmodels.org/devel/examples/index.html)
[matplotlib](https://matplotlib.org/stable/gallery/index.html)
[seaborn](https://seaborn.pydata.org/examples/index.html)

cc @svekars @holly1238
Repository: pytorch
Issue: Expose docs from the yaml for each torch.Tag in Python 
Labels: module: docs,triaged,module: dispatch,module: library

### 📚 The doc issue

the docs for each tag exist in `tags.yaml`

### Suggest a potential alternative/fix

_No response_

cc @svekars @holly1238 @anjali411
Repository: go
Issue: cmd/api: run api check on all ports
Labels: NeedsDecision

cmd/api runs only on a [fixed set of ports](https://cs.opensource.google/go/go/+/master:src/cmd/api/goapi.go;l=59;drc=d922c0a8f5035b0533eb6e912ffd7b85487e3942). The list is strange, excluding some first-class ports (linux/arm64, darwin/arm64), but including several secondary ports. Any ports excluded from this list get no checking at all.

Inspired by a suggestion from @bcmills, I think we should adjust behavior:

* cmd/api should always include the current `GOOS`/`GOARCH`(/`CGO_ENABLED`).
* The default context set should include all first-class ports.
* cmd/dist should perhaps tell cmd/api to _only_ check the current `GOOS`/`GOARCH`, to avoid duplicate work in builders.

These changes should make all first-class and secondary ports covered by api checks, in each of their respective builders (pre-submit or post-submit depending on which ports are included in TryBots, as usual).

cc @golang/release
Repository: PowerToys
Issue: Draw border around windows that are on top by themselves
Labels: Idea-Enhancement

### Description of the new feature / enhancement

Draw border for a window that is on top by itself.

### Scenario when this would be used?

A window is on top by itself or using another software but there is no border around it.

### Supporting information

It's rare that some programs open some of their dialogs on top by default. In this case Power Toys doesn't draw a border around them but it can unpin them and after repining that window using Power Toys a border will be drawn around it. 

Also if there is another software installed for making windows always on top, and I pin a window using that software, Power Toys doesn't draw border for them. I see this because I was using [PowerMenu](https://powermenu.en.softonic.com) software before installing Power Toys. When I had both of them on my PC, I tried pining a window using Power Menu.
Repository: flutter
Issue: [Web] Refactor TextEditingDelta implementation 
Labels: a: text input,platform-web,P2,team-web,triaged-web

The TextEditingDelta implementation on web currently continually updates an `editingDeltaState` during the process of text-input (beforeInput, onInput, compositionupdate), until we have arrived at a final `editingDeltaState`. Having it spread across many handlers can make it difficult to make updates to the `DefaultTextEditingStrategy` without breaking TextEditingDeltas. An example of this is flutter/engine#33590 which adds composing region tracking, but broke TextEditingDeltas at first (later resolved).

Proposal:
Use the lastEditingState and the newEditingState to determine the state of a TextEditingDelta, and centralize the logic into `inferDeltaState`.
Repository: flutter
Issue: [Firefox] Composing down to a single character from multiple characters does not replace the composing text until a new event fires.
Labels: a: text input,engine,platform-web,browser: firefox,P2,team-web,triaged-web

Composing region on web for firefox using delta model. This issue is very specific and a little hard to pin down.

If the amount of text inputted during composing is more than one character, and it composes down to one character, the text inputting does not replace until the next keypress. Here is a list of "triagable" cases:

- Type 'ni' into the composing keyboard, then select the composition. This will _not_ replace properly, as it is more than one character (ni.length == 2) and composes down into a single symbol.
- Type 'n' into the composing keyboard, then select the composition. This _will_ replace properly, as it is one character composing down into one character.
- Type 'ni ho' into the composing keyboard, then select the composition. This _will_ replace properly, as it is more than one character composing down into more than one character.


## Steps to Reproduce

1. Execute `flutter run` on the delta model sample [found here ](https://github.com/flutter/samples/tree/main/simplistic_editor)
2. Activate the Chinese composing keyboard "Pinyin - simplified" on Mac
3. Run the above examples

**Expected results:** <!-- what did you want to see? -->

Compose the characters "ni -> 霓" see that text replacement works properly, and the entirely of "ni" is replaced with the composed symbol. 

**Actual results:**

'ni' is not replaced with '霓' until a new event is fired after the composition - see that 'ni' stays in the text field along with it's composing output, 霓: something like 'ni霓'. Then when you type a new character such as n, you get '霓n'.

no MVP for this, since setting a delta keyboard up is pretty involved. It is better to just use the Delta Model example linked above and [here](https://github.com/flutter/samples/tree/main/simplistic_editor).

Examples:

working case: 
https://user-images.githubusercontent.com/48811365/171703331-59953541-5c50-4352-9394-aea94a582370.mov
See that 'n' composes to one character and fully replaces. The same is true for 'ni ho', which composes down into two characters (maybe it is another bug that 'ho' is not being displayed onto the text field) and also replaces fine.

not working case:
https://user-images.githubusercontent.com/48811365/171703788-ebb65486-61d5-4e04-b187-cfb29bed41cb.mov
See that 'ni' is not replaced by it's composed text '你‘ until a new character is placed. The same is true for longer composing text like 'song' which composes down into one symbol.
Repository: PowerToys
Issue: change window size with hot key and mouse
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

hold a hot-key while anywhere within a window and drag window size/ position
example: alt + left mouse drag expand window size left, right, up and down based on initial drag direction. alt + right mouse will change window position like just like moving window by clicking and hold on the top bar. 
A similar feature is available in DesktopOK, a windows environment tweaking tool. but is buggy with newer releases of Windows.

I can provide video of functionality if requested.


### Scenario when this would be used?

This feature would allow for easier environment manipulation with multiple displays and in scenarios when the top bar is hidden or not available in some views. For the window sizing, no cursor position target would be required

### Supporting information

_No response_
Repository: godot
Issue: MeshInstance with Mesh Material Billboard Mode bug on web export (GLES3)
Labels: bug,platform:web,topic:rendering,topic:3d

### Godot version

3.4.4

### System information

ubuntu-20.04 (in which Github Actions is using to build), Firefox (to run deployed project)

### Issue description

My Github Action Web Export present problems on collectables objects that I have in the game that are MeshInstances with QuadMeshes of which the material's texture is a 2D image and Billboard Mode Enabled.  

- [The Repo](https://github.com/jayypluss/BreezyWave)
- [The Game](https://jayypluss.com/BreezyWave/)
- [The Issue](https://github.com/jayypluss/BreezyWave/issues/24)

I can't reproduce this locally on localhost webserver, not with my project and not with Minimal reproduction project attached. I am only reproducing and testing it after deploying (to Game link above). Haven't tried deploying Minimal reproduction project yet.

## Build actions:

- https://github.com/jayypluss/BreezyWave/blob/main/.github/workflows/push-export.yml
- https://github.com/jayypluss/BreezyWave/actions/runs/2425815227
- https://github.com/jayypluss/BreezyWave/runs/6701741938?check_suite_focus=true

## Evidences:

https://user-images.githubusercontent.com/17395606/171698978-7763a589-6220-4b95-b617-c55c711306b9.mp4

https://user-images.githubusercontent.com/17395606/171698971-06218b3b-2e46-4164-8491-ce34198c0194.mp4


### Steps to reproduce

- Create MeshInstance
- Add Quad Mesh as Mesh
- Add new Material
- Enable Billboard Mode for this material (under Parameters)
- Enable Use Alpha Scissor
- Add an image with transparent background as texture of the Material 

![image](https://user-images.githubusercontent.com/17395606/171714397-1ab88aec-5fd8-4388-b248-6888f844833c.png)


### Minimal reproduction project

I did this minimal project below but I can't reproduce this problem with it.

[debug_project.zip](https://github.com/godotengine/godot/files/8827549/debug_project.zip)
Repository: deno
Issue: Atomics.waitAsync bug
Labels: bug,deno_core

According to the `Atomics.waitAsync` documentation, it:
> verifies that a given position in an [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) still contains a given value and if so sleeps, awaiting a wakeup or a timeout.

However, in my testing it seems like the `waitAsync` doesn't wake (even after calling `Atomics.notify`).

Moreover, I think that the event loop might be stuck (`setTimeout` didn't work  and the test gets stuck) but I don't have any way to verify that.

Below are the POC files I used to verify that there is a problem.

**poc_test.ts**
```ts
Deno.test(async function poc() {
  const ia = new Int32Array(
    new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT),
  );

  const p = Promise.allSettled(
    Array(2).fill(0).map((_, i) => {
      const name = `poc_worker#${i}`;
      const w = new Worker(
        new URL("testdata/poc_worker.ts", import.meta.url),
        {
          type: "module",
          name,
        },
      );
      return new Promise<void>((res, rej) => {
        w.onmessage = (ev) => {
          if (ev.data.ok) res(ev.data);
          else rej(ev.data);
        };
        setTimeout(w.postMessage.bind(w), undefined, ia);
      }).finally(w.terminate.bind(w));
    }),
  );

  console.log(await p);
});
```

**testdata/poc_worker.ts**
```ts
export const sleep = (duration: number) => {
  return new Promise<void>((res) => {
    setTimeout(() => res(), duration);
  });
};

self.onmessage = async (ev) => {
  const ia = ev.data;
  console.log(self.name, ia);
  try {
    const actual = Atomics.compareExchange(ia, 0, 0, 1);

    if (actual === 0) {
      await sleep(0);
      const notified = Atomics.notify(ia, 0);
      console.log(self.name, { actual, notified });
      self.postMessage({ ok: true });
    } else {
      // @ts-expect-error see https://github.com/microsoft/TypeScript/issues/49198
      let { async, value } = Atomics.waitAsync(ia, 0, 1);
      console.log(self.name, { actual, async, value });
      value = await value;
      self.postMessage({ ok: true });
    }
  } catch (err) {
    self.postMessage({ ok: false, err });
  }
};
```

**output**
```
------- output -------
poc_worker#1 Int32Array(1) [ 0 ]
poc_worker#1 { actual: 0, notified: 0 }
poc_worker#0 Int32Array(1) [ 1 ]
poc_worker#0 { actual: 1, async: true, value: Promise { <pending> } }
```

**My Setup**
WSL2 - Ubuntu
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

$ deno --version
deno 1.22.1 (release, x86_64-unknown-linux-gnu)
v8 10.3.174.6
typescript 4.6.2
```
Repository: go
Issue: net/http: add support for SETTINGS_ENABLE_CONNECT_PROTOCOL
Labels: Proposal,Proposal-Accepted

# Overview

I propose extending the x/net/http2 and net/http packages to support the extended CONNECT protocol described in [RFC 8441](https://datatracker.ietf.org/doc/html/rfc8441#section-3). Support for this will be always-on in the http server, and the http client will automatically detect the presence of support based on the settings flag and adjust the checks it applies to outgoing requests to allow the for the extended CONNECT protocol. `http.Request` will be extended with a new `Protocol` member to allow users to set the `:protocol` psudoheader.

# Public Interface Changes

`http.Request` will gain a new member, `Protocol` of type string.

All other functionality can be achieved with existing interfaces.

# Implementation

An example implementation of SETTINGS_ENABLE_CONNECT_PROTOCOL support for both the client and the server can be found [on gerrit](https://go-review.googlesource.com/c/net/+/408835). This is just meant to be a proof of concept, not a fully production ready implementation. Rather than using a field on `http.Request` it uses a magic header called `HACK-HTTP2-Protocol`, but the intention is that this would be switched out for `req.Protocol` for real code.

The implementation is pretty non-invasive. It consists of extending the code to allow the use of a new `:protocol` psudo header, sending the new settings flag during the initial handshake, and loosening some checks when the extended CONNECT protocol is in use.

Probably the most complex thing about the implementation I was able to come up with is the fact that a CONNECT request coming from the client can now trigger a ping HTTP/2 frame if the server has not yet sent headers. This is required for an extended CONNECT to work if is the very first request on a given http2.Transport object.

# Related Issues

[#49918](https://github.com/golang/go/issues/49918) contains some discussion about some of my initial implementation work and links to further context.
Repository: go
Issue: proposal: x/net/websocket: implement support for websockets over HTTP/2
Labels: Proposal

# Overview

I propose extending the x/net/websocket package to support connections made over HTTP/2. This will require no external changes for the server, but the client will need to expose a new mechanism for allowing users to request that HTTP/2 is used to make a connection.

# Public Interface Changes

`websocket.Config` will gain a new `HTTP2Transport` member of type `*http2.Transport`
`x/net/websocket` will gain two new public error types: `ErrBadpath` and `ErrBadHandshake`

Having `http2` in the name/type of a public member feels a little strange, but storing a generic `http.RoundTripper` makes it impossible to make sure that we use `config.TlsConfig` if the user provides one but the transport they provide does not have a TLSClientConfig, and additionally opens up the question of what happens if we are passed a http.Transport rather than a http2.Transport. If someone has even modernly strong opinions about a different color to paint this particular shed, I would love to hear them.

# Implementation Notes

A strawman implementation based on the changes I'm proposing in https://github.com/golang/go/issues/53208 can be found at https://github.com/ethanpailes/golang-org-x-net/tree/ep/websocket-http2-try3. The main commit is https://github.com/ethanpailes/golang-org-x-net/commit/df38e5d6ac95add5640e29389b50d380277ed1f0, but I may push little tweaks on top of it.

Enough about the handshake has changed from HTTP/1.1 that the implementation I came up rolls entirely new handshake subroutines for the new transport version. Once the handshake is done, the framing mechanisms are all the same so we can just reuse all the existing infrastructure for that by wrapping out HTTP/2 streams in the right interfaces.

# Related Issues

https://github.com/golang/go/issues/49918 contains initial discussion about HTTP/2 websocket support

https://github.com/golang/go/issues/53208 contains a proposal for adding SETTINGS_ENABLE_CONNECT_PROTOCOL support to x/net/http2, which is required to implement websocket HTTP/2 support.
Repository: vscode
Issue: Image stays broken when re-executing Markdown cell
Labels: bug,help wanted,good first issue,notebook

### Applies To

- [X] Notebooks (.ipynb files)
- [ ] Interactive Window and\/or Cell Scripts (.py files with \#%% markers)

### What happened?

1. Create a Markdown cell with an <img> tag referring to a non-existing path, e.g. `<img src="myimg.png">`.
2. Execute the cell. A "broken image" icon appears.
3. Create the image at the specified path.
4. Click the cell to edit. Re-execute it (without making any changes).

Expected result: the image is now shown.

Actual result: still shows a broken image icon. (The image is only shown after making a change to the cell itself.)

### VS Code Version

1.67.2

### Jupyter Extension Version

v2022.4.1021342353

### Jupyter logs

_No response_

### Coding Language and Runtime Version

Markdown

### Language Extension Version (if applicable)

_No response_

### Anaconda Version (if applicable)

_No response_

### Running Jupyter locally or remotely?

Local
Repository: flutter
Issue: Edit variable value with debugger on break point
Labels: c: new feature,framework,a: debugging,c: proposal,P3,team-framework,triaged-framework

## Use case

When debugging sometimes it is really handy to be able to change the value of a variable. At the current time, this does not seem possible. 

## Proposal

I'd like to be able to edit the value of the variables when a break point is hit, for example from the watch list in android studio. Right click with the mouse and be able to choose set value.
Repository: pytorch
Issue: Add `inplace_view` tag for `resize_`
Labels: triaged,module: viewing and reshaping

### 🐛 Describe the bug

as per the title 

### Versions

master
Repository: pytorch
Issue: Extend tag testing for aliases
Labels: triaged,module: testing

### 🐛 Describe the bug

Currently tags are only tested for the op whose OpInfo we are looking at. We should also look into the aliases db for the OpInfo and run the tests for aliases as well.

### Versions

master
Repository: vscode
Issue: Exported notebook files don't show up in VS Code explorer
Labels: bug,verification-found

Testing microsoft/vscode-jupyter#10183

Exported notebook files don't show up in the VS Code explorer. An explicit refresh is needed.